Once you've installed, open a new command prompt and run the following command:
Once you've installed, open a new terminal and run the following command:
Command prompt
dotnet
If the command runs, printing out information about how to use dotnet, you're good to go.
Got an error?
If you receive a 'dotnet' is not recognized as an internal or external command error, make sure you opened a new command prompt. If you can't resolve the issue, use the I ran into an issue button to get help fixing the problem.
Install Prerequisites
Install Java
Apache Spark requires the Java SE Development Kit (JDK) 8.1.
Once you've installed, open a new command prompt and run the following command:
Command prompt
%SPARK_HOME%\bin\spark-submit --version
If the command runs, printing our version information, you're good to go.
If you receive a 'spark-submit' is not recognized as an internal or external command error, make sure you opened a new command prompt. If you can't resolve the issue, use the I ran into an issue button to get help fixing the problem.
In your command prompt, run the following commands:
In your terminal, run the following commands:
Command prompt
dotnet new console -o mySparkAppcd mySparkApp
The dotnet command creates a new application of type console for you. The -o parameter creates a directory named mySparkApp where your app is stored, and populates it with the required files. The cd mySparkApp command puts you into the newly created app directory.
Install NuGet package
To use .NET for Apache Spark in an app, you need to install the Microsoft.Spark package.
In your command prompt, run the following command:
You may encounter an error that Spark failed to delete a jar file from a temporary directory. This is a known error and won't affect the output of your app.
Congratulations, you've created your first .NET for Apache Spark application!