An open API service indexing awesome lists of open source software.

https://github.com/affogarty/niccolo

Easy-to-use orchestration framework for .NET for Apache Spark applications.
https://github.com/affogarty/niccolo

apache-spark csharp dotnet easy-to-use orchestration poco prototyping simple

Last synced: 3 months ago
JSON representation

Easy-to-use orchestration framework for .NET for Apache Spark applications.

Awesome Lists containing this project

README

          

# Niccolo

Niccolo is an easy-to-use orchestration framework for
[.NET for Apache Spark](https://github.com/dotnet/spark) applications. Niccolo makes it quick and
easy to write .NET applications and submit them to Apache Spark clusters.

## Use cases

Niccolo can be used for:

1. Rapid development and prototyping of applications.
2. [POCO](https://en.wikipedia.org/wiki/Plain_old_CLR_object) code-first approach to application
scheduling and management.

## Sample

The following example shows how to use Niccolo to write a simple .Net for Apache Spark application
and submit it to a local cluster.

```csharp
using Microsoft.Spark.Sql;
using Niccolo.Cluster.Local;
using Niccolo.Interfaces;

namespace Niccolo.Example
{
///
/// Example Spark batch application.
///
class TestSparkApp : ISparkBatchApplication
{
public SparkSession BuildSparkSession()
{
return SparkSession.Builder().GetOrCreate();
}

public void Run(SparkSession spark)
{
var data = spark.Range(25);
data.Show();
}
}

class Program
{
static void Main(string[] args)
{
// Reference to the local Spark cluster.
var cluster = new LocalSparkCluster();

// Start the batch application on the local cluster.
ISparkJob job = cluster.RunBatchApplication(typeof(TestSparkApp));

// Wait for the batch application to finish.
job.RunningTask.Wait();
}
}
}

```