Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 6 #1112

Merged
merged 48 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9e308e1
Migrate to .NET 6
Aug 22, 2022
827f9ee
Ignore serialize bug
Oct 20, 2022
4ff33bc
Don't need the backup
Oct 20, 2022
6d42fee
Merge branch 'main' into anfog/20220822_net_6
AFFogarty Oct 24, 2022
db31cba
Add TODO for BinaryFormatter
Oct 25, 2022
40c2c74
Only target .NET 6
Oct 25, 2022
8c724ee
Fixed: Remove upgrade-assistant.clef
Oct 26, 2022
3baa15d
Merge branch 'main' of https://github.com/dotnet/spark into anfog/202…
Nov 1, 2022
61b7d2d
Fixed: Use latest windows image for .NET 6
Nov 1, 2022
8b40e1a
AfterSolutionBuild.targets
Nov 2, 2022
1f3dd3f
Update arcade
Nov 2, 2022
0bc78c3
Update Arcade to latest version
Nov 2, 2022
ac1df52
Update global.json to dotnet 6 SDK
alastairs Nov 15, 2022
eacc5bd
Find-and-replace netcoreapp3.1 -> net6.0
alastairs Nov 15, 2022
7f09045
Merge pull request #1 from alastairs/patch-1
AFFogarty Nov 15, 2022
25faee9
Revert "Update Arcade to latest version"
Nov 15, 2022
ba3da68
Revert "Update arcade"
Nov 15, 2022
738a3bd
Don't compile examples with 4.6.1
Nov 15, 2022
5a6bdb3
Worker is self-contained
Nov 15, 2022
a4c7697
Selfcontained false
Nov 15, 2022
ad49093
Fixed: UseDotNet 6.x
Nov 15, 2022
a94e011
Use netcoreapp3.1 for backward-compatible testing
alastairs Nov 17, 2022
8dbf50b
Merge pull request #2 from alastairs/patch-2
AFFogarty Nov 29, 2022
723bafb
Worker is self-contained
Nov 29, 2022
94df255
Address comments on worker
Dec 6, 2022
c70d6a7
Fix typo
Dec 6, 2022
c7029e0
Switch back to self-contained for now
Dec 7, 2022
fc30c95
Revert "Switch back to self-contained for now"
ericstj Dec 8, 2022
7720a85
Specify --self-contained when publishing worker
ericstj Dec 8, 2022
00ba010
Merge pull request #3 from ericstj/anfog/20220822_net_6
AFFogarty Dec 8, 2022
ceedec1
Disable backwards compatibility for now
Dec 8, 2022
e0c7a6d
Revert backwardscompatibleframework
Dec 8, 2022
7dc36b3
Merge branch 'anfog/20220822_net_6' of https://github.com/AFFogarty/s…
Dec 8, 2022
c92cdbb
Update docs to reference .NET 6
Dec 8, 2022
f145223
Disable forwards compatibility tests for ow
Dec 8, 2022
ca64c80
Fix markdown link
Dec 9, 2022
d845910
Fix CLI name
Dec 9, 2022
9c8fbde
Merge branch 'main' into anfog/20220822_net_6
AFFogarty Jan 6, 2023
e7de72a
Merge branch 'main' into anfog/20220822_net_6
AFFogarty Jan 23, 2023
83ad587
Merge branch 'main' into anfog/20220822_net_6
AFFogarty Jan 25, 2023
e72afd5
Fixed: Disable backwards compat on new versions
Jan 25, 2023
324c454
Docs updates
Jan 25, 2023
385d923
Update AfterSolutionBuild.targets
AFFogarty Feb 17, 2023
d17b671
Update .gitignore
AFFogarty Feb 17, 2023
f8299c8
Add TODO
AFFogarty Feb 17, 2023
e13ac50
Add TODO
AFFogarty Feb 17, 2023
3319e0b
Add TODO
AFFogarty Feb 17, 2023
5e99a8f
PR responses
Feb 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.NET for Apache Spark is compliant with .NET Standard - a formal specification of .NET APIs that are common across .NET implementations. This means you can use .NET for Apache Spark anywhere you write .NET code allowing you to reuse all the knowledge, skills, code, and libraries you already have as a .NET developer.

.NET for Apache Spark runs on Windows, Linux, and macOS using .NET Core, or Windows using .NET Framework. It also runs on all major cloud providers including [Azure HDInsight Spark](deployment/README.md#azure-hdinsight-spark), [Amazon EMR Spark](deployment/README.md#amazon-emr-spark), [AWS](deployment/README.md#databricks) & [Azure](deployment/README.md#databricks) Databricks.
.NET for Apache Spark runs on Windows, Linux, and macOS using .NET 6, or Windows using .NET Framework. It also runs on all major cloud providers including [Azure HDInsight Spark](deployment/README.md#azure-hdinsight-spark), [Amazon EMR Spark](deployment/README.md#amazon-emr-spark), [AWS](deployment/README.md#databricks) & [Azure](deployment/README.md#databricks) Databricks.

**Note**: We currently have a Spark Project Improvement Proposal JIRA at [SPIP: .NET bindings for Apache Spark](https://issues.apache.org/jira/browse/SPARK-27006) to work with the community towards getting .NET support by default into Apache Spark. We highly encourage you to participate in the discussion.

Expand Down Expand Up @@ -61,7 +61,7 @@
.NET for Apache Spark releases are available [here](https://github.com/dotnet/spark/releases) and NuGet packages are available [here](https://www.nuget.org/packages/Microsoft.Spark).

## Get Started
These instructions will show you how to run a .NET for Apache Spark app using .NET Core.
These instructions will show you how to run a .NET for Apache Spark app using .NET 6.
- [Windows Instructions](docs/getting-started/windows-instructions.md)
- [Ubuntu Instructions](docs/getting-started/ubuntu-instructions.md)
- [MacOs Instructions](docs/getting-started/macos-instructions.md)
Expand All @@ -79,8 +79,8 @@ Building from source is very easy and the whole process (from cloning to being a

| | | Instructions |
| :---: | :--- | :--- |
| ![Windows icon](docs/img/windows-icon-32.png) | **Windows** | <ul><li>Local - [.NET Framework 4.6.1](docs/building/windows-instructions.md#using-visual-studio-for-net-framework-461)</li><li>Local - [.NET Core 3.1](docs/building/windows-instructions.md#using-net-core-cli-for-net-core)</li><ul> |
| ![Ubuntu icon](docs/img/ubuntu-icon-32.png) | **Ubuntu** | <ul><li>Local - [.NET Core 3.1](docs/building/ubuntu-instructions.md)</li><li>[Azure HDInsight Spark - .NET Core 3.1](deployment/README.md)</li></ul> |
| ![Windows icon](docs/img/windows-icon-32.png) | **Windows** | <ul><li>Local - [.NET Framework 4.6.1](docs/building/windows-instructions.md#using-visual-studio-for-net-framework-461)</li><li>Local - [.NET 6](docs/building/windows-instructions.md#using-net-core-cli-for-net-core)</li><ul> |
| ![Ubuntu icon](docs/img/ubuntu-icon-32.png) | **Ubuntu** | <ul><li>Local - [.NET 6](docs/building/ubuntu-instructions.md)</li><li>[Azure HDInsight Spark - .NET 6](deployment/README.md)</li></ul> |

<a name="samples"></a>
## Samples
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The goal of the .NET for Apache Spark project is to provide an easy to use, .NET
### Performance Optimizations
* Improvements to C# Pickling Library
* Improvements to Arrow .NET Library
* Exploiting .NET Core 3.0 Vectorization (*)
* Exploiting .NET Vectorization (*)
* Micro-benchmarking framework for Interop

### Benchmarks
Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines-e2e-tests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ stages:
- job: Run_${{ replace(option.pool, ' ', '_') }}
${{ if eq(lower(option.pool), 'windows') }}:
pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'
${{ else }}:
pool:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -58,10 +58,10 @@ stages:
mvn -version

- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
displayName: 'Use .NET 6 sdk'
inputs:
packageType: sdk
version: 3.1.x
version: 6.x
installationPath: $(Agent.ToolsDirectory)/dotnet

- task: DownloadBuildArtifacts@0
Expand All @@ -71,7 +71,7 @@ stages:
downloadPath: $(Build.ArtifactStagingDirectory)

- pwsh: |
$framework = "netcoreapp3.1"
$framework = "net6.0"
AFFogarty marked this conversation as resolved.
Show resolved Hide resolved

if ($env:AGENT_OS -eq 'Windows_NT') {
$runtimeIdentifier = "win-x64"
Expand Down
72 changes: 36 additions & 36 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stages:
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'

variables:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -171,7 +171,7 @@ stages:
- Sign
displayName: Publish Artifacts
pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'

variables:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -210,8 +210,8 @@ stages:
forwardCompatibleRelease: $(forwardCompatibleRelease)
tests:
- version: '2.4.0'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -222,8 +222,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.1'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -234,8 +234,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.3'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -246,8 +246,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.4'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -258,8 +258,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.5'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -270,8 +270,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.6'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -282,8 +282,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.7'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
Niharikadutta marked this conversation as resolved.
Show resolved Hide resolved
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -294,8 +294,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '2.4.8'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -306,8 +306,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_2_4)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_2_4)
- version: '3.0.0'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -318,8 +318,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_0)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_0)
- version: '3.0.1'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -330,8 +330,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_0)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_0)
- version: '3.0.2'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -342,8 +342,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_0)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_0)
- version: '3.1.1'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -354,8 +354,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_1)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_1)
- version: '3.1.2'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -366,8 +366,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_1)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_1)
- version: '3.2.0'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -378,8 +378,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_2)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_2)
- version: '3.2.1'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -390,8 +390,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_2)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_2)
- version: '3.2.2'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand All @@ -402,8 +402,8 @@ stages:
backwardCompatibleTestOptions: $(backwardCompatibleTestOptions_Linux_3_2)
forwardCompatibleTestOptions: $(forwardCompatibleTestOptions_Linux_3_2)
- version: '3.2.3'
enableForwardCompatibleTests: true
enableBackwardCompatibleTests: true
enableForwardCompatibleTests: false
enableBackwardCompatibleTests: false
jobOptions:
- pool: 'Windows'
testOptions: ""
Expand Down
3 changes: 1 addition & 2 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ TPCH timing results is written to stdout in the following form: `TPCH_Result,<la
<true for sql tests, false for functional tests>
```

**Note**: Ensure that you build the worker and application with .NET Core 3.0 in order to run hardware acceleration queries.
AFFogarty marked this conversation as resolved.
Show resolved Hide resolved

**Note**: Ensure that you build the worker and application with .NET 6 in order to run hardware acceleration queries.
AFFogarty marked this conversation as resolved.
Show resolved Hide resolved

## Python
1. Upload [run_python_benchmark.sh](run_python_benchmark.sh) and all [python tpch benchmark](python/) files to the cluster.
Expand Down
6 changes: 3 additions & 3 deletions benchmark/csharp/Tpch/Tpch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net461;net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">net6.0</TargetFrameworks>
<RootNamespace>Tpch</RootNamespace>
<AssemblyName>Tpch</AssemblyName>
</PropertyGroup>
Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<Choose>
<When Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<When Condition="'$(TargetFramework)' == 'net6.0'">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Microsoft.Spark.Worker is a backend component that lives on the individual worke
## Azure HDInsight Spark
[Azure HDInsight Spark](https://docs.microsoft.com/en-us/azure/hdinsight/spark/apache-spark-overview) is the Microsoft implementation of Apache Spark in the cloud that allows users to launch and configure Spark clusters in Azure. You can use HDInsight Spark clusters to process your data stored in Azure (e.g., [Azure Storage](https://azure.microsoft.com/en-us/services/storage/) and [Azure Data Lake Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction)).

> **Note:** Azure HDInsight Spark is Linux-based. Therefore, if you are interested in deploying your app to Azure HDInsight Spark, make sure your app is .NET Standard compatible and that you use [.NET Core compiler](https://dotnet.microsoft.com/download) to compile your app.
> **Note:** Azure HDInsight Spark is Linux-based. Therefore, if you are interested in deploying your app to Azure HDInsight Spark, make sure your app is .NET Standard compatible and that you use [.NET 6 compiler](https://dotnet.microsoft.com/download) to compile your app.

### Deploy Microsoft.Spark.Worker
*Note that this step is required only once*
Expand Down Expand Up @@ -115,7 +115,7 @@ EOF
## Amazon EMR Spark
[Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html) is a managed cluster platform that simplifies running big data frameworks on AWS.

> **Note:** AWS EMR Spark is Linux-based. Therefore, if you are interested in deploying your app to AWS EMR Spark, make sure your app is .NET Standard compatible and that you use [.NET Core compiler](https://dotnet.microsoft.com/download) to compile your app.
> **Note:** AWS EMR Spark is Linux-based. Therefore, if you are interested in deploying your app to AWS EMR Spark, make sure your app is .NET Standard compatible and that you use [.NET 6 compiler](https://dotnet.microsoft.com/download) to compile your app.

### Deploy Microsoft.Spark.Worker
*Note that this step is only required at cluster creation*
Expand Down Expand Up @@ -160,7 +160,7 @@ foo@bar:~$ aws emr add-steps \
## Databricks
[Databricks](http://databricks.com) is a platform that provides cloud-based big data processing using Apache Spark.

> **Note:** [Azure](https://azure.microsoft.com/en-us/services/databricks/) and [AWS](https://databricks.com/aws) Databricks is Linux-based. Therefore, if you are interested in deploying your app to Databricks, make sure your app is .NET Standard compatible and that you use [.NET Core compiler](https://dotnet.microsoft.com/download) to compile your app.
> **Note:** [Azure](https://azure.microsoft.com/en-us/services/databricks/) and [AWS](https://databricks.com/aws) Databricks is Linux-based. Therefore, if you are interested in deploying your app to Databricks, make sure your app is .NET Standard compatible and that you use [.NET 6 compiler](https://dotnet.microsoft.com/download) to compile your app.

Databricks allows you to submit Spark .NET apps to an existing active cluster or create a new cluster everytime you launch a job. This requires the **Microsoft.Spark.Worker** to be installed **first** before you submit a Spark .NET app.

Expand Down
Loading