This is a simple example project to start coding with H2O Pojo.
- Spark 1.5
For more details see build.gradle.
├─ gradle/ - Gradle definition files
├─ lib/ - Location for h2o-genmodel.jar
├─ src/ - Source code
│ ├─ main/ - Main implementation code
│ │ ├─ scala/
│ │ ├─ pojo/ - Pojo code
├─ build.gradle - Build file for this project
├─ gradlew - Gradle wrapper
For building, please, use provided gradlew
command:
./gradlew build
For running a simple application:
./gradlew run
There are two ways to open this project in Idea
- Using Gradle build file directly
- Open project's
build.gradle
in Idea via File > Open
- Open project's
or
Using Gradle generated project files
1. Generate Idea configuration files via
./gradlew idea
2. and open project in Idea via File > Open
Note: To clean up Idea project files please launch
./gradlew cleanIdea
- Generate Eclipse project files via
./gradlew eclipse
- Open project in Eclipse via File > Import > Existing Projects into Workspace
To run tests, please, run:
./gradlew test
Create application assembly which can be directly submitted to Spark cluster:
./gradlew shadowJar
The command creates jar file build/libs/cap1-assembler-all.jar
containing all necessary classes to run application on top of Spark cluster.
Submit application to Spark cluster (in this case, local cluster of 6nodes is used):
export MASTER='local-cluster[6,2,1024]'
$SPARK_HOME/bin/spark-submit --class examples.PojoExample build/libs/cap1-assembler-all.jar