├── .gitignore
├── sparkling-water-mojo-scorer-droplet
├── data
│ ├── prostate
│ │ ├── _SUCCESS
│ │ ├── ._SUCCESS.crc
│ │ ├── part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet
│ │ └── .part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet.crc
│ └── prostate.mojo
├── runme.sh
├── README.md
├── .gitignore
├── src
│ └── main
│ │ └── scala
│ │ └── water
│ │ └── droplets
│ │ └── SparklingWaterScorerDroplet.scala
└── pom.xml
├── h2o-java-droplet
├── gradle.properties
├── settings.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── src
│ ├── test
│ │ └── java
│ │ │ └── water
│ │ │ └── droplets
│ │ │ └── H2OJavaDropletTest.java
│ └── main
│ │ └── java
│ │ └── water
│ │ └── droplets
│ │ └── H2OJavaDroplet.java
├── build.gradle
├── gradlew.bat
├── data
│ └── iris.csv
└── gradlew
├── sparkling-water-droplet
├── gradle.properties
├── project
│ ├── build.properties
│ ├── Resolvers.scala
│ └── Dependencies.scala
├── settings.gradle
├── gradle
│ ├── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── scalastyle.gradle
│ └── conf
│ │ └── scalastyle-config.xml
├── .gitignore
├── README.md
├── src
│ └── main
│ │ └── scala
│ │ └── water
│ │ └── droplets
│ │ └── SparklingWaterDroplet.scala
├── gradlew.bat
├── build.gradle
├── data
│ └── iris.csv
└── gradlew
├── h2o-sw-mixed-api-droplet
├── gradle.properties
├── project
│ ├── build.properties
│ ├── Resolvers.scala
│ └── Dependencies.scala
├── settings.gradle
├── data
│ └── smsData.txt
├── gradle
│ ├── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── scalastyle.gradle
│ └── conf
│ │ └── scalastyle-config.xml
├── .gitignore
├── README.md
├── gradlew.bat
├── build.gradle
├── gradlew
└── src
│ └── main
│ └── scala
│ └── water
│ └── droplets
│ └── H2OSWMixedAPIDroplet.scala
├── h2o-pojo-on-spark-droplet
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── README.md
├── src
│ └── main
│ │ └── scala
│ │ └── water
│ │ └── droplets
│ │ └── UsePojoDroplet.scala
├── gradlew.bat
├── data
│ └── iris.csv
└── gradlew
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/data/prostate/_SUCCESS:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/h2o-java-droplet/gradle.properties:
--------------------------------------------------------------------------------
1 | version=0.1.0-SNAPSHOT
2 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradle.properties:
--------------------------------------------------------------------------------
1 | version=0.1.0-SNAPSHOT
2 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradle.properties:
--------------------------------------------------------------------------------
1 | version=0.1.0-SNAPSHOT
2 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/data/prostate/._SUCCESS.crc:
--------------------------------------------------------------------------------
1 | crc
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.13.11
2 |
3 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.13.11
2 |
3 |
--------------------------------------------------------------------------------
/h2o-java-droplet/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'h2o-java-droplet'
2 |
3 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'sparkling-water-droplet'
2 |
3 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'h2o-sw-mixed-api-droplet'
2 |
3 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/runme.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | mvn -q clean package exec:java
4 |
5 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/data/smsData.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/h2o-sw-mixed-api-droplet/data/smsData.txt
--------------------------------------------------------------------------------
/h2o-java-droplet/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/h2o-java-droplet/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/data/prostate.mojo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/sparkling-water-mojo-scorer-droplet/data/prostate.mojo
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/sparkling-water-droplet/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/h2o-pojo-on-spark-droplet/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/h2o-sw-mixed-api-droplet/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/h2o-java-droplet/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/data/prostate/part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/sparkling-water-mojo-scorer-droplet/data/prostate/part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradle/scalastyle.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'scalaStyle'
2 |
3 | scalaStyle {
4 | configLocation = "$rootDir/gradle/conf/scalastyle-config.xml"
5 | includeTestSourceDirectory = true
6 | source = "src/main/scala"
7 | testSource = "src/test/scala"
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/data/prostate/.part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet.crc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/h2oai/h2o-droplets/HEAD/sparkling-water-mojo-scorer-droplet/data/prostate/.part-00000-6de06b85-753f-45c3-8396-1dbe35e60904-c000.snappy.parquet.crc
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradle/scalastyle.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'scalaStyle'
2 |
3 | scalaStyle {
4 | configLocation = "$rootDir/gradle/conf/scalastyle-config.xml"
5 | includeTestSourceDirectory = true
6 | source = "src/main/scala"
7 | testSource = "src/test/scala"
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/README.md:
--------------------------------------------------------------------------------
1 | # Sparkling Water MOJO Scoring Example
2 |
3 | The example demonstrates using MOJO model as Spark transformer.
4 | It loads MOJO from `data/prostate.mojo` and transform data represented
5 | as Spark DataFrame.
6 |
7 | ## Build
8 |
9 | ```
10 | mvn package
11 | ```
12 |
13 | ## Run
14 |
15 | ```
16 | mvn exec:java
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/h2o-java-droplet/.gitignore:
--------------------------------------------------------------------------------
1 | // Ignore gradle cache
2 | .gradle/
3 |
4 | // Ignore Idea settings
5 | .idea/
6 | *.iml
7 | *.ipr
8 | *.iws
9 |
10 | // Ignore class file
11 | *.class
12 |
13 | // Ignore private and temps by default
14 | private/
15 | tmp/
16 |
17 | // Ignore vim swap
18 | *.swp
19 |
20 | // Ignore build dirs
21 | out/
22 | build/
23 |
24 | // Ignore Eclipse project files
25 | .classpath
26 | .project
27 | .settings/
28 |
29 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/.gitignore:
--------------------------------------------------------------------------------
1 | // Ignore gradle cache
2 | .gradle/
3 |
4 | // Ignore Idea settings
5 | .idea/
6 | *.iml
7 | *.ipr
8 | *.iws
9 |
10 | // Ignore class file
11 | *.class
12 |
13 | // Ignore private and temps by default
14 | private/
15 | tmp/
16 |
17 | // Ignore vim swap
18 | *.swp
19 |
20 | // Ignore build dirs
21 | out/
22 | build/
23 |
24 | // Ignore Eclipse project files
25 | .classpath
26 | .project
27 | .settings/
28 |
29 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/project/Resolvers.scala:
--------------------------------------------------------------------------------
1 | import sbt._
2 |
3 | object Resolvers {
4 | // Add common Maven repositories:
5 | //val sunrepo = "Sun Maven2 Repo" at "http://download.java.net/maven/2"
6 | //val sunrepoGF = "Sun GF Maven2 Repo" at "http://download.java.net/maven/glassfish"
7 | //val oraclerepo = "Oracle Maven2 Repo" at "http://download.oracle.com/maven"
8 |
9 | //val oracleResolvers = Seq(sunrepo, sunrepoGF, oraclerepo)
10 | }
11 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/project/Resolvers.scala:
--------------------------------------------------------------------------------
1 | import sbt._
2 |
3 | object Resolvers {
4 | // Add common Maven repositories:
5 | //val sunrepo = "Sun Maven2 Repo" at "http://download.java.net/maven/2"
6 | //val sunrepoGF = "Sun GF Maven2 Repo" at "http://download.java.net/maven/glassfish"
7 | //val oraclerepo = "Oracle Maven2 Repo" at "http://download.oracle.com/maven"
8 |
9 | //val oracleResolvers = Seq(sunrepo, sunrepoGF, oraclerepo)
10 | }
11 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/.gitignore:
--------------------------------------------------------------------------------
1 | // Ignore gradle cache
2 | .gradle/
3 |
4 | // Ignore Idea settings
5 | .idea/
6 | *.iml
7 | *.ipr
8 | *.iws
9 |
10 | // Ignore class file
11 | *.class
12 |
13 | // Ignore private and temps by default
14 | private/
15 | tmp/
16 |
17 | // Ignore vim swap
18 | *.swp
19 |
20 | // Ignore build dirs
21 | out/
22 | build/
23 |
24 | // Ignore Eclipse project files
25 | .classpath
26 | .project
27 | .settings/
28 |
29 | // Ignore h2ologs
30 | h2ologs/
31 |
32 | // SBT target
33 | target/
34 |
35 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/.gitignore:
--------------------------------------------------------------------------------
1 | // Ignore gradle cache
2 | .gradle/
3 |
4 | // Ignore Idea settings
5 | .idea/
6 | *.iml
7 | *.ipr
8 | *.iws
9 |
10 | // Ignore class file
11 | *.class
12 |
13 | // Ignore private and temps by default
14 | private/
15 | tmp/
16 |
17 | // Ignore vim swap
18 | *.swp
19 |
20 | // Ignore build dirs
21 | out/
22 | build/
23 |
24 | // Ignore Eclipse project files
25 | .classpath
26 | .project
27 | .settings/
28 |
29 | // Ignore h2ologs
30 | h2ologs/
31 |
32 | // SBT target
33 | target/
34 |
35 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/.gitignore:
--------------------------------------------------------------------------------
1 | // Ignore gradle cache
2 | .gradle/
3 |
4 | // Ignore Idea settings
5 | .idea/
6 | *.iml
7 | *.ipr
8 | *.iws
9 |
10 | // Ignore class file
11 | *.class
12 |
13 | // Ignore private and temps by default
14 | private/
15 | tmp/
16 |
17 | // Ignore vim swap
18 | *.swp
19 |
20 | // Ignore build dirs
21 | out/
22 | build/
23 |
24 | // Ignore Eclipse project files
25 | .classpath
26 | .project
27 | .settings/
28 |
29 | // Ignore h2ologs
30 | h2ologs/
31 |
32 | // SBT target
33 | target/
34 |
35 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/project/Dependencies.scala:
--------------------------------------------------------------------------------
1 | import sbt._
2 | import Keys._
3 |
4 | object Dependencies {
5 | val sparkVersion = "2.4"
6 | val sparklingWaterVersion = s"${sparkVersion}.7"
7 |
8 | val sparklinwatercore = "ai.h2o" %% "sparkling-water-core" % sparklingWaterVersion
9 | val sparklingwaterexamples = "ai.h2o" %% "sparkling-water-examples" % sparklingWaterVersion
10 | val sparklinwatercore = "ai.h2o" %% "sparkling-water-repl" % sparklingWaterVersion
11 | val sparklingwaterexamples = "ai.h2o" %% "sparkling-water-ml" % sparklingWaterVersion
12 |
13 | val scalatest = "org.scalatest" %% "scalatest" % "2.2.1"
14 | }
15 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/project/Dependencies.scala:
--------------------------------------------------------------------------------
1 | import sbt._
2 | import Keys._
3 |
4 | object Dependencies {
5 | val sparkVersion = "2.4"
6 | val sparklingWaterVersion = s"${sparkVersion}.7"
7 |
8 | val sparklinwatercore = "ai.h2o" %% "sparkling-water-core" % sparklingWaterVersion
9 | val sparklingwaterexamples = "ai.h2o" %% "sparkling-water-examples" % sparklingWaterVersion
10 | val sparklinwatercore = "ai.h2o" %% "sparkling-water-repl" % sparklingWaterVersion
11 | val sparklingwaterexamples = "ai.h2o" %% "sparkling-water-ml" % sparklingWaterVersion
12 |
13 | val scalatest = "org.scalatest" %% "scalatest" % "2.2.1"
14 | }
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | H2O Project Templates
2 | =====================
3 |
4 | This project provides templates for different kind of projects.
5 |
6 | Currently it provides:
7 | * _h2o-java-droplet_ - a template for Java-based H2O project
8 | * _h2o-pojo-on-spark-droplet_ - a template for doing predictions with POJO on Spark (Without Sparkling Water)
9 | * _h2o-sw-mixed-api-droplet_ - a template for mixing Sparkling Water API with the internal H2O-3 API
10 | * _sparkling-water-droplet_ - a template for Sparkling Water project
11 | * _sparkling-water-mojo-scorer-droplet_ - a template for scoring project in Sparkling Water
12 |
13 |
14 | For more information see `README.md` files of individual projects.
15 |
16 |
--------------------------------------------------------------------------------
/h2o-java-droplet/README.md:
--------------------------------------------------------------------------------
1 | # H2O Example Project
2 |
3 | This is a simple example project to start with H2O.
4 |
5 | ## Project dependencies
6 |
7 | The project is built on top of:
8 | - H2O 3.30.0.7 release
9 |
10 | For more details, please, see [build file](build.gradle).
11 |
12 | ## Project structure
13 |
14 | ```
15 | ├─ gradle/ - Gradle definition files
16 | ├─ src/ - Source code
17 | │ ├─ main/ - Main implementation code
18 | │ │ ├─ java/
19 | │ ├─ test/ - Test code
20 | │ │ ├─ java/
21 | ├─ build.gradle - Build file for this project
22 | ├─ gradlew - Gradle wrapper
23 | ```
24 |
25 | ## Starting with Idea
26 |
27 | To open this project in InteliJ, import it as a Gradle project
28 | via _New > Project From Existing Sources > and select Gradle_
29 |
30 | > Note: To clean up Idea project files please launch `./gradlew cleanIdea`
31 |
32 | ## Starting with Eclipse
33 | 1. Generate Eclipse project files via `./gradlew eclipse`
34 | 2. Open project in Eclipse via _File > Import > Existing Projects into Workspace_
35 |
36 | > Note: To clean up Eclipse project files please launch `./gradlew cleanEclipse`
37 |
38 | ## Project building
39 |
40 | For building, please, use encapsulated `gradlew` command:
41 | ```
42 | ./gradlew build
43 | ```
44 |
45 | ### Run demo
46 | For running a simple application:
47 | ```
48 | ./gradlew run
49 | ```
50 |
51 | ## Run tests
52 |
53 | To run tests, please, run:
54 | ```
55 | ./gradlew test
56 | ```
57 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
9 | }
10 | }
11 |
12 | apply plugin: 'java-library'
13 | apply plugin: 'scala'
14 | apply plugin: 'com.github.johnrengelman.shadow'
15 | // Support local launch of application
16 | apply plugin: 'application'
17 | mainClassName = 'water.droplets.UsePojoDroplet'
18 |
19 | ext {
20 | scalaBaseVersion = "2.12"
21 | scalaVersion = "2.12.10"
22 | sparkVersion = "3.0.0"
23 | }
24 |
25 | repositories {
26 | mavenCentral()
27 | }
28 |
29 | dependencies {
30 | api "ai.h2o:h2o-genmodel:3.30.0.7"
31 | // Spark dependencies
32 | // - core
33 | api "org.apache.spark:spark-core_${scalaBaseVersion}:${sparkVersion}"
34 | // - SQL component
35 | api "org.apache.spark:spark-sql_${scalaBaseVersion}:${sparkVersion}"
36 | // Add joda optional convert library which is required in Scala environment
37 | api "org.joda:joda-convert:1.7"
38 | // And Scala library
39 | api "org.scala-lang:scala-library:${scalaVersion}"
40 | }
41 |
42 | // Setup resources
43 | sourceSets {
44 | main {
45 | java {
46 | srcDirs += "src/main/pojo"
47 | }
48 | }
49 | }
50 |
51 | configurations {
52 | shadowApi {
53 | extendsFrom api
54 | }
55 | }
56 |
57 | shadowJar {
58 | // Configure name of output jar as sparkling-water-droplet-app.jar
59 | archiveAppendix = 'app'
60 | configurations = [project.configurations.shadowApi]
61 | mergeServiceFiles()
62 | archiveBaseName = "${archiveBaseName}_${scalaBaseVersion}"
63 | zip64 = true
64 | }
65 |
66 | artifacts {
67 | api shadowJar
68 | }
69 |
--------------------------------------------------------------------------------
/h2o-java-droplet/src/test/java/water/droplets/H2OJavaDropletTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package water.droplets;
18 |
19 | import org.junit.Before;
20 | import org.junit.Test;
21 | import water.DKV;
22 | import water.H2O;
23 | import water.Key;
24 |
25 | import static org.junit.Assert.*;
26 |
27 | /**
28 | * The test verify implementation of
29 | * {@link water.droplets.H2OJavaDroplet} class.
30 | */
31 | public class H2OJavaDropletTest {
32 |
33 | @Before public void initCloud() {
34 | // Setup cloud name
35 | String[] args = new String[] { "-name", "h2o_test_cloud"};
36 | // Build a cloud of 1
37 | H2O.main(args);
38 | H2O.waitForCloudSize(1, 10*1000 /* ms */);
39 | }
40 |
41 | @Test public void testHello() {
42 | // Generate hello message and store it in K/V
43 | Key vkey = H2OJavaDroplet.hello();
44 |
45 | // Get POJO holding hello message
46 | H2OJavaDroplet.StringHolder helloHolder = DKV.get(vkey).get();
47 |
48 | // Verify the message
49 | assertEquals("Hello message does not match!", "Hello H2O!", helloHolder.hello("H2O"));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/README.md:
--------------------------------------------------------------------------------
1 | # Sparkling Water Example Project
2 |
3 | This is a simple example project to start coding with Sparkling Water.
4 |
5 | ## Dependencies
6 | This droplet uses Sparkling Water 3.30.0.7-1-3.0 which integrates:
7 | - Spark 3.0
8 | - H2O 3.30.0.7
9 |
10 | For more details see [build.gradle](build.gradle).
11 |
12 | ## Project structure
13 |
14 | ```
15 | ├─ gradle/ - Gradle definition files
16 | ├─ src/ - Source code
17 | │ ├─ main/ - Main implementation code
18 | │ │ ├─ scala/
19 | │ ├─ test/ - Test code
20 | │ │ ├─ scala/
21 | ├─ build.gradle - Build file for this project
22 | ├─ gradlew - Gradle wrapper
23 | ```
24 |
25 | ## Project building
26 |
27 | For building, please, use provided `gradlew` command:
28 | ```
29 | ./gradlew build
30 | ```
31 |
32 | ### Run demo
33 | For running a simple application:
34 | ```
35 | ./gradlew run
36 | ```
37 |
38 | ## Starting with Idea
39 |
40 | To open this project in InteliJ, import it as a Gradle project
41 | via _New > Project From Existing Sources > and select Gradle_
42 |
43 | ## Starting with Eclipse
44 | 1. Generate Eclipse project files via `./gradlew eclipse`
45 | 2. Open project in Eclipse via _File > Import > Existing Projects into Workspace_
46 |
47 |
48 | ## Running tests
49 |
50 | To run tests, please, run:
51 | ```
52 | ./gradlew test
53 | ```
54 |
55 | # Checking code style
56 |
57 | To check codestyle:
58 | ```
59 | ./gradlew scalaStyle
60 | ```
61 |
62 | ## Creating and Running Spark Application
63 |
64 | Create application assembly which can be directly submitted to Spark cluster:
65 | ```
66 | ./gradlew shadowJar
67 | ```
68 | The command creates jar file `build/libs/sparkling-water-droplet-app.jar` containing all necessary classes to run application on top of Spark cluster.
69 |
70 | Submit application to Spark cluster (in this case, local cluster is used):
71 | ```
72 | export MASTER="local[*]"
73 | $SPARK_HOME/bin/spark-submit --class water.droplets.SparklingWaterDroplet build/libs/sparkling-water-droplet-app.jar
74 | ```
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/README.md:
--------------------------------------------------------------------------------
1 | # Example Project Mixing Sparkling Water and H2O-3 API
2 |
3 | This is a simple Scala project that demonstrates how to combine Sparkling Water API with H20-3 internal Java API.
4 |
5 | ## Dependencies
6 | This droplet uses Sparkling Water 3.30.0.7-1-3.0 which integrates:
7 | - Spark 3.0
8 | - H2O 3.30.0.7
9 |
10 | For more details see [build.gradle](build.gradle).
11 |
12 | ## Project structure
13 |
14 | ```
15 | ├─ gradle/ - Gradle definition files
16 | ├─ src/ - Source code
17 | │ ├─ main/ - Main implementation code
18 | │ │ ├─ scala/
19 | ├─ build.gradle - Build file for this project
20 | ├─ gradlew - Gradle wrapper
21 | ```
22 |
23 | ## Project building
24 |
25 | For building, please, use provided `gradlew` command:
26 | ```
27 | ./gradlew build
28 | ```
29 |
30 | ### Run demo
31 | For running a simple application:
32 | ```
33 | ./gradlew run
34 | ```
35 |
36 | ## Starting with Idea
37 |
38 | To open this project in InteliJ, import it as a Gradle project
39 | via _New > Project From Existing Sources > and select Gradle_
40 |
41 | ## Starting with Eclipse
42 | 1. Generate Eclipse project files via `./gradlew eclipse`
43 | 2. Open project in Eclipse via _File > Import > Existing Projects into Workspace_
44 |
45 |
46 | ## Running tests
47 |
48 | To run tests, please, run:
49 | ```
50 | ./gradlew test
51 | ```
52 |
53 | # Checking code style
54 |
55 | To check codestyle:
56 | ```
57 | ./gradlew scalaStyle
58 | ```
59 |
60 | ## Creating and Running Spark Application
61 |
62 | Create application assembly which can be directly submitted to Spark cluster:
63 | ```
64 | ./gradlew shadowJar
65 | ```
66 | The command creates jar file `build/libs/h2o-sw-mixed-api-droplet-app.jar` containing all necessary classes to run application on top of Spark cluster.
67 |
68 | Submit application to Spark cluster (in this case, local cluster is used):
69 | ```
70 | export MASTER="local[*]"
71 | $SPARK_HOME/bin/spark-submit --class water.droplets.H2OSWMixedAPIDroplet build/libs/h2o-sw-mixed-api-droplet-app.jar
72 | ```
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/README.md:
--------------------------------------------------------------------------------
1 | # Spark and H2O Pojo
2 |
3 | This is a simple example project to start with H2O Pojo.
4 |
5 | Recommendation: If you plan to use H2O POJO/MOJO in Spark environment, we suggest to have a look at Sparkling Water
6 | project.
7 |
8 | ## Dependencies
9 | - Spark 3.0
10 |
11 | For more details see [build.gradle](build.gradle).
12 |
13 | ## Project structure
14 |
15 | ```
16 | ├─ gradle/ - Gradle definition files
17 | ├─ lib/ - Location for h2o-genmodel.jar
18 | ├─ src/ - Source code
19 | │ ├─ main/ - Main implementation code
20 | │ │ ├─ scala/
21 | │ │ ├─ pojo/ - Pojo code
22 | ├─ build.gradle - Build file for this project
23 | ├─ gradlew - Gradle wrapper
24 | ```
25 |
26 | ## Starting with Idea
27 |
28 | To open this project in InteliJ, import it as a Gradle project
29 | via _New > Project From Existing Sources > and select Gradle_
30 |
31 | > Note: To clean up Idea project files please launch `./gradlew cleanIdea`
32 |
33 | ## Starting with Eclipse
34 | 1. Generate Eclipse project files via `./gradlew eclipse`
35 | 2. Open project in Eclipse via _File > Import > Existing Projects into Workspace_
36 |
37 | > Note: To clean up Eclipse project files please launch `./gradlew cleanEclipse`
38 |
39 | ## Project building
40 |
41 | For building, please, use encapsulated `gradlew` command:
42 | ```
43 | ./gradlew build
44 | ```
45 |
46 | ### Run demo
47 | For running a simple application on top of Spark:
48 | ```
49 | ./gradlew run
50 | ```
51 |
52 | ## Run tests
53 |
54 | To run tests, please, run:
55 | ```
56 | ./gradlew test
57 | ```
58 |
59 |
60 | ## Creating and Running Spark Application
61 |
62 | Create application assembly which can be directly submitted to Spark cluster:
63 | ```
64 | ./gradlew shadowJar
65 | ```
66 |
67 | The command creates jar file `build/libs/cap1-assembler-all.jar` containing all necessary classes to run application on top of Spark cluster.
68 |
69 | Submit application to a local Spark cluster:
70 | ```
71 | export MASTER='local[*]'
72 | $SPARK_HOME/bin/spark-submit --class examples.PojoExample build/libs/cap1-assembler-all.jar
73 | ```
74 |
--------------------------------------------------------------------------------
/h2o-java-droplet/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a simple build file for building H2O applications.
3 | *
4 | * For more details please follow README.md
5 | */
6 |
7 | // Apply the java plugin to add support for Java
8 | apply plugin: 'java-library'
9 | // Support local launch of application
10 | apply plugin: 'application'
11 | mainClassName = 'water.droplets.H2OJavaDroplet'
12 | //
13 | // Configure project properties
14 | //
15 | ext {
16 | // Configure h2o-dev dependency information
17 | h2oBranch = 'rel-zahradnik'
18 | h2oBuildNumber = '7'
19 | h2oProjectVersion = "3.30.0.${h2oBuildNumber}"
20 | }
21 |
22 | // In this section you declare where to find the dependencies of your project
23 | repositories {
24 | // Use 'maven central' for resolving your dependencies.
25 | // You can declare any Maven/Ivy/file repository here.
26 | mavenCentral()
27 |
28 | // Cloudera dependencies
29 | maven {
30 | url "https://repository.cloudera.com/artifactory/cloudera-repos/"
31 | }
32 |
33 | // Hortonworks dependencies
34 | maven {
35 | url "https://repo.hortonworks.com/content/repositories/releases/"
36 | }
37 |
38 | // Include build h2o-dev dependencies if branch if pulling from master
39 | if (h2oBranch == 'master') {
40 | maven {
41 | url "https://s3.amazonaws.com/h2o-release/h2o/${h2oBranch}/${h2oBuildNumber}/maven/repo/"
42 | }
43 | }
44 |
45 | // Enable 'maven local' for resolving your locally cached dependencies
46 | // Useful for cross development for example with h2o-dev
47 | if (h2oBuildNumber == '99999') mavenLocal()
48 | }
49 |
50 | // In this section you declare the dependencies for your production and test code
51 | dependencies {
52 | // Define dependency on core of H2O
53 | api "ai.h2o:h2o-core:${h2oProjectVersion}"
54 | // Define dependency on H2O algorithm
55 | api "ai.h2o:h2o-algos:${h2oProjectVersion}"
56 | // Demands web support
57 | api "ai.h2o:h2o-web:${h2oProjectVersion}"
58 | // Contains H2O entry points
59 | api "ai.h2o:h2o-app:${h2oProjectVersion}"
60 |
61 | // H2O uses jUnit for testing
62 | testImplementation 'junit:junit:4.11'
63 | }
64 |
65 | //
66 | // Project specific settings
67 | //
68 |
69 | // Setup group ID for this project
70 | group = "ai.h2o"
71 |
72 | //
73 | // Setup Java plugin
74 | //
75 | sourceCompatibility = 1.8
76 | targetCompatibility = 1.8
77 | compileJava {
78 | options.debug = true
79 | }
80 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/src/main/scala/water/droplets/UsePojoDroplet.scala:
--------------------------------------------------------------------------------
1 | package water.droplets
2 |
3 | import hex.genmodel.GenModel
4 | import hex.genmodel.easy.{EasyPredictModelWrapper, RowData}
5 | import org.apache.spark.SparkConf
6 | import org.apache.spark.internal.Logging
7 | import org.apache.spark.sql.SparkSession
8 |
9 | /**
10 | * Simple example showing how to use POJO directly from Spark.
11 | */
12 | object UsePojoDroplet extends Logging {
13 |
14 | def main(args: Array[String]): Unit = {
15 | logInfo("Starting Spark Session")
16 | val conf = new SparkConf().setAppName("Sparkling Water Droplet").setMaster("local")
17 | val spark = SparkSession.builder().config(conf).getOrCreate()
18 |
19 | logInfo(s"Loading data from data/iris.csv into DataFrame")
20 | val testData = spark.read.option("header", "true").option("inferSchema", "true").csv("data/iris.csv")
21 |
22 | logInfo("Loading POJO by its class name: 'gbm_aa57ff38_927d_40ba_973b_4b0f5e281d03'")
23 | // We use classloading here instead of referencing pojo directly.
24 | // In normal case, you should use here a dedicated URI classloader to load
25 | // POJO from given URI.
26 | val genModel: GenModel = Class.forName("gbm_aa57ff38_927d_40ba_973b_4b0f5e281d03")
27 | .newInstance().asInstanceOf[GenModel]
28 | // Create EasyWrapper for generated model
29 | val easyModel = new EasyPredictModelWrapper(genModel)
30 | val header = genModel.getNames
31 |
32 | logInfo("Making prediction using loaded POJO...")
33 | // Now we hava pojo ready and can generate prediction for each row
34 | // It is a categorical model with 3 output categories
35 | logInfo(" - pojo type: " + easyModel.getModelCategory)
36 | logInfo(" - pojo input columns: " + header.mkString(","))
37 | logInfo(" - pojo prediction categories: " + easyModel.getResponseDomainValues.mkString(","))
38 |
39 | val predictionRdd = testData.rdd.map(row => {
40 | val r = new RowData
41 | // This is simple use that header of POJO is matching
42 | header.indices.foreach(idx => r.put(header(idx), row.getDouble(idx).asInstanceOf[AnyRef]))
43 | val prediction = easyModel.predictMultinomial(r)
44 | prediction
45 | })
46 |
47 | // Collect predictions and print them
48 | predictionRdd.collect().foreach { prediction =>
49 | logInfo(s"Prediction: ${prediction.label}: ${prediction.classProbabilities.mkString(",")}")
50 | }
51 |
52 | spark.stop()
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/h2o-java-droplet/src/main/java/water/droplets/H2OJavaDroplet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package water.droplets;
18 |
19 | import water.*;
20 | import water.fvec.Frame;
21 | import water.fvec.NFSFileVec;
22 | import water.fvec.Vec;
23 | import water.parser.ParseDataset;
24 |
25 | import java.io.IOException;
26 | import java.util.concurrent.TimeUnit;
27 |
28 | /**
29 | * H2O bootstrap example.
30 | *
31 | * The example implements a library which provides a
32 | * method putting given greetings message into K/V store.
33 | */
34 | public class H2OJavaDroplet {
35 |
36 | public static final String MSG = "Hello %s!";
37 |
38 | /** Simple Iced-object which will be serialized over network */
39 | public static final class StringHolder extends Iced {
40 | final String msg;
41 |
42 | public StringHolder(String msg) {
43 | this.msg = msg;
44 | }
45 |
46 | public String hello(String name) {
47 | return String.format(msg, name);
48 | }
49 | }
50 |
51 | /**
52 | * Creates a key and value holding a simple message in {@link water.droplets.H2OJavaDroplet.StringHolder}.
53 | *
54 | * @return key referencing stored value.
55 | */
56 | public static final Key hello() {
57 | Key vkey = Key.make("hello.key");
58 | StringHolder value = new StringHolder(MSG);
59 | DKV.put(vkey, value);
60 | return vkey;
61 | }
62 |
63 | /** Application Entry Point */
64 | public static void main(String[] args) {
65 | // Run H2O and build a cloud of 1 member
66 | H2OApp.main(args);
67 |
68 | if (H2O.ARGS.client) {
69 | H2O.waitForCloudSize(1, TimeUnit.SECONDS.toMillis(10));
70 | final Key key = Key.make("fromJava");
71 | try {
72 | final NFSFileVec lazy = NFSFileVec.make("data/iris.csv");
73 | final Frame fr = ParseDataset.parse(key, lazy._key);
74 |
75 | final Value removed = DKV.get(fr._key);
76 | System.out.println("Retrieve after removal " + removed);
77 |
78 | } catch (IOException e) {
79 | e.printStackTrace();
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/src/main/scala/water/droplets/SparklingWaterDroplet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package water.droplets
19 |
20 | import ai.h2o.sparkling.ml.algos.H2OGBM
21 | import org.apache.spark.SparkConf
22 | import org.apache.spark.h2o._
23 | import org.apache.spark.sql.SparkSession
24 | import org.apache.spark.sql.functions._
25 |
26 | /**
27 | * Example of Sparkling Water based application.
28 | */
29 | object SparklingWaterDroplet {
30 |
31 | def main(args: Array[String]) {
32 | // Create Spark Session
33 | val conf = new SparkConf()
34 | .setAppName("Sparkling Water Droplet")
35 | .setMaster("local")
36 | val spark = SparkSession
37 | .builder
38 | .config(conf)
39 | .getOrCreate()
40 |
41 | // Create H2O Context
42 | val h2oContext = H2OContext.getOrCreate()
43 |
44 | val irisTable = spark.read.option("header", "true").option("inferSchema", "true").csv("data/iris.csv")
45 |
46 | // Build GBM model
47 | val model = new H2OGBM()
48 | .setLabelCol("class")
49 | .setNtrees(5)
50 | .fit(irisTable)
51 |
52 | // Make prediction on train data
53 | val predictions = model.transform(irisTable)
54 |
55 | // Compute number of miss-predictions with help of Spark API
56 |
57 | // Make sure that both DataFrames has the same number of elements
58 | assert(irisTable.count() == predictions.count)
59 | val irisTableWithId = irisTable.select("class").withColumn("id", monotonically_increasing_id())
60 | val predictionsWithId = predictions.select("prediction").withColumn("id", monotonically_increasing_id())
61 | val df = irisTableWithId.join(predictionsWithId, "id").drop("id")
62 | val missPredictions = df.filter(df("class")=!=df("prediction"))
63 | val numMissPredictions = missPredictions.count()
64 |
65 | println(
66 | s"""
67 | |Number of miss-predictions: $numMissPredictions
68 | |
69 | |Miss-predictions:
70 | |
71 | |actual X predicted
72 | |------------------
73 | |${missPredictions.collect().mkString("\n")}
74 | """.stripMargin)
75 |
76 | // Shutdown application
77 | h2oContext.stop(true)
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/src/main/scala/water/droplets/SparklingWaterScorerDroplet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package water.droplets
19 |
20 | import ai.h2o.sparkling.ml.models.H2OMOJOModel
21 | import org.apache.spark.SparkConf
22 | import org.apache.spark.sql.SparkSession
23 |
24 |
25 | /**
26 | * Example of Sparkling Water based application.
27 | */
28 | object SparklingWaterScorerDroplet {
29 |
30 | // This can be HDFS URI
31 | val DATA_FILE = "data/prostate"
32 |
33 | // This can be HDFS URI
34 | val MOJO_MODEL = "data/prostate.mojo"
35 |
36 | def main(args: Array[String]) {
37 |
38 | val inputFile = if (args.length > 0) args(0) else DATA_FILE
39 | val mojoFile = if (args.length > 1) args(1) else MOJO_MODEL
40 |
41 | println(
42 | s"""
43 | |Using:
44 | | input file: ${inputFile}
45 | | mojo file : ${mojoFile}
46 | """.stripMargin)
47 |
48 | // Create Spark Session
49 | banner("Starting Spark Session")
50 | val conf = new SparkConf()
51 | .setAppName("Sparkling Water Scorer Droplet")
52 | .setMaster("local")
53 | val spark = SparkSession.builder.config(conf).getOrCreate()
54 | spark.sparkContext.setLogLevel("WARN")
55 |
56 | // Load data to spark DataFrame
57 | banner(s"Loading input data from '${inputFile}'")
58 | val prostateDf = spark.read.parquet(DATA_FILE)
59 | banner(s"Input data schema")
60 | prostateDf.printSchema()
61 |
62 | // Load H2O MOJO
63 | banner(s"Loading MOJO from '$inputFile'")
64 | val mojo = H2OMOJOModel.createFromMojo(mojoFile)
65 |
66 | // Make prediction
67 | banner(s"Making prediction with MOJO")
68 | val prediction = mojo.transform(prostateDf)
69 | banner("Prediction data frame has the following schema")
70 | prediction.printSchema()
71 |
72 | // Show prediction in pretty form
73 | banner("Actual content of prediction data frame")
74 | import org.apache.spark.sql.functions.{col, udf}
75 | val prettyFunc = (pred: Double) => {
76 | f"$pred%.4f"
77 | }
78 | val prettyUdf = udf(prettyFunc)
79 | prediction.withColumn("prediction", prettyUdf(col("prediction"))).show()
80 |
81 | // Shutdown application
82 | spark.stop()
83 | }
84 |
85 | def banner(msg:String): Unit = println(s"\n*** $msg ****")
86 | }
87 |
--------------------------------------------------------------------------------
/h2o-java-droplet/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a simple build file for building Sparkling Water applications.
3 | *
4 | * For more details please follow README.md.
5 | */
6 |
7 | // Apply the java plugin to add support for Java
8 | apply plugin: 'java-library'
9 | apply plugin: 'scala'
10 |
11 | // Support local launch of application
12 | apply plugin: 'application'
13 | mainClassName = 'water.droplets.H2OSWMixedAPIDroplet'
14 | //
15 | // The build script settings to fetch plugins and put them on
16 | // classpath
17 | buildscript {
18 | repositories {
19 | mavenCentral()
20 | jcenter()
21 | }
22 |
23 | dependencies {
24 | classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
25 | classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1'
26 | }
27 | }
28 |
29 | //
30 | // Configure project properties
31 | //
32 | ext {
33 | // Spark version
34 | sparkVersion = "3.0.0"
35 | // Latest stable version for the specified version of Spark
36 | spWaterVersion = "3.30.0.7-1-3.0"
37 |
38 | // Scala binary version
39 | scalaBaseVersion = '2.12'
40 | scalaVersion = '2.12.10'
41 | }
42 |
43 | java {
44 | sourceCompatibility = JavaVersion.VERSION_1_8
45 | targetCompatibility = JavaVersion.VERSION_1_8
46 | }
47 |
48 |
49 | // In this section you declare where to find the dependencies of your project
50 | repositories {
51 | // Use 'maven central' for resolving your dependencies.
52 | // You can declare any Maven/Ivy/file repository here.
53 | mavenCentral()
54 |
55 | // Cloudera dependencies
56 | maven {
57 | url "https://repository.cloudera.com/artifactory/cloudera-repos/"
58 | }
59 |
60 | // Hortonworks dependencies
61 | maven {
62 | url "https://repo.hortonworks.com/content/repositories/releases/"
63 | }
64 |
65 | // Public sonatype repository
66 | maven {
67 | url "https://oss.sonatype.org/content/repositories/releases/"
68 | }
69 |
70 | // Enable 'maven local' for resolving your locally cached dependencies
71 | // Useful for cross development for example with h2o-dev
72 | if (spWaterVersion.endsWith("SNAPSHOT")) mavenLocal()
73 | }
74 |
75 | // This section declares the dependencies for your production and test code
76 | dependencies {
77 | // Spark Core
78 | api("org.apache.spark:spark-core_${scalaBaseVersion}:${sparkVersion}")
79 | // Spark REPL
80 | api("org.apache.spark:spark-repl_${scalaBaseVersion}:${sparkVersion}")
81 | // Spark SQL
82 | api("org.apache.spark:spark-sql_${scalaBaseVersion}:${sparkVersion}")
83 | // Spark MLLib
84 | api("org.apache.spark:spark-mllib_${scalaBaseVersion}:${sparkVersion}")
85 | // Spark Streaming
86 | api("org.apache.spark:spark-streaming_${scalaBaseVersion}:${sparkVersion}")
87 |
88 | // Sparkling Water
89 | api("ai.h2o:sparkling-water-package_${scalaBaseVersion}:${spWaterVersion}")
90 |
91 | // Scala project needs dependency on Scala library
92 | api("org.scala-lang:scala-library:$scalaVersion")
93 |
94 | // And use scalatest for Scala testing
95 | testImplementation "org.scalatest:scalatest_${scalaBaseVersion}:3.2.0"
96 | }
97 |
98 | //
99 | // Project specific settings
100 | //
101 |
102 | // Setup group ID for this project
103 | group = "ai.h2o"
104 |
105 | //
106 | // Setup Scala plugin
107 | //
108 |
109 | // Activate Zinc compiler and configure scalac
110 | tasks.withType(ScalaCompile) {
111 | scalaCompileOptions.additionalParameters = [
112 | "-target:jvm-1.8",
113 | "-feature",
114 | // enable several optional scala features so Scala knows we use them on purpose
115 | "-language:reflectiveCalls",
116 | "-language:postfixOps",
117 | "-language:existentials",
118 | "-language:implicitConversions",
119 | ]
120 | }
121 |
122 | // In resulting jar include Scala binary version
123 | jar {
124 | archiveBaseName = "${project.name}_${scalaBaseVersion}"
125 | }
126 |
127 | // Check Scala coding conventions
128 | apply from: 'gradle/scalastyle.gradle'
129 |
130 | //
131 | // Configure assembly to create Spark application
132 | //
133 |
134 | // Support for application assembly
135 | apply plugin: 'com.github.johnrengelman.shadow'
136 |
137 | configurations {
138 | shadowApi {
139 | extendsFrom api
140 | }
141 | }
142 |
143 | shadowJar {
144 | // Configure name of output jar as sparkling-water-droplet-app.jar
145 | archiveAppendix = 'app'
146 | configurations = [project.configurations.shadowApi]
147 | mergeServiceFiles()
148 | archiveBaseName = "${archiveBaseName}_${scalaBaseVersion}"
149 | zip64 = true
150 | }
151 |
152 | artifacts {
153 | api shadowJar
154 | }
155 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a simple build file for building Sparkling Water applications.
3 | *
4 | * For more details please follow README.md.
5 | */
6 |
7 | // Apply the java plugin to add support for Java
8 | apply plugin: 'scala'
9 | apply plugin: 'java-library'
10 | // Support local launch of application
11 | apply plugin: 'application'
12 | mainClassName = 'water.droplets.SparklingWaterDroplet'
13 | //
14 | // The build script settings to fetch plugins and put them on
15 | // classpath
16 | buildscript {
17 | repositories {
18 | mavenCentral()
19 | jcenter()
20 | }
21 |
22 | dependencies {
23 | classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
24 | classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1'
25 | }
26 | }
27 |
28 | //
29 | // Configure project properties
30 | //
31 | ext {
32 | // Spark version
33 | sparkVersion = "3.0.0"
34 | // Latest stable version for the specified version of Spark
35 | spWaterVersion = "3.30.0.7-1-3.0"
36 |
37 | // Scala binary version
38 | scalaBaseVersion = '2.12'
39 | scalaVersion = '2.12.10'
40 | }
41 |
42 | java {
43 | sourceCompatibility = JavaVersion.VERSION_1_8
44 | targetCompatibility = JavaVersion.VERSION_1_8
45 | }
46 |
47 |
48 | // In this section you declare where to find the dependencies of your project
49 | repositories {
50 | // Use 'maven central' for resolving your dependencies.
51 | // You can declare any Maven/Ivy/file repository here.
52 | mavenCentral()
53 |
54 | // Cloudera dependencies
55 | maven {
56 | url "https://repository.cloudera.com/artifactory/cloudera-repos/"
57 | }
58 |
59 | // Hortonworks dependencies
60 | maven {
61 | url "https://repo.hortonworks.com/content/repositories/releases/"
62 | }
63 |
64 | // Public sonatype repository
65 | maven {
66 | url "https://oss.sonatype.org/content/repositories/releases/"
67 | }
68 |
69 | // Enable 'maven local' for resolving your locally cached dependencies
70 | // Useful for cross development for example with h2o-dev
71 | if (spWaterVersion.endsWith("SNAPSHOT")) mavenLocal()
72 | }
73 |
74 | // This section declares the dependencies for your production and test code
75 | dependencies {
76 | // Spark Core
77 | api("org.apache.spark:spark-core_${scalaBaseVersion}:${sparkVersion}")
78 | // Spark Core
79 | api("org.apache.spark:spark-repl_${scalaBaseVersion}:${sparkVersion}")
80 | // Spark SQL
81 | api("org.apache.spark:spark-sql_${scalaBaseVersion}:${sparkVersion}")
82 | // Spark MLLib
83 | api("org.apache.spark:spark-mllib_${scalaBaseVersion}:${sparkVersion}")
84 | // Spark Streaming
85 | api("org.apache.spark:spark-streaming_${scalaBaseVersion}:${sparkVersion}")
86 |
87 | // Sparkling Water
88 | api("ai.h2o:sparkling-water-package_${scalaBaseVersion}:${spWaterVersion}")
89 |
90 | // Scala project needs dependency on Scala library
91 | api("org.scala-lang:scala-library:$scalaVersion")
92 |
93 | // And use scalatest for Scala testing
94 | testImplementation("org.scalatest:scalatest_${scalaBaseVersion}:3.2.0")
95 | }
96 |
97 | //
98 | // Project specific settings
99 | //
100 |
101 | // Setup group ID for this project
102 | group = "ai.h2o"
103 |
104 | //
105 | // Setup Scala plugin
106 | //
107 |
108 | // Activate Zinc compiler and configure scalac
109 | tasks.withType(ScalaCompile) {
110 | scalaCompileOptions.additionalParameters = [
111 | "-target:jvm-1.8",
112 | "-feature",
113 | // enable several optional scala features so Scala knows we use them on purpose
114 | "-language:reflectiveCalls",
115 | "-language:postfixOps",
116 | "-language:existentials",
117 | "-language:implicitConversions",
118 | ]
119 | }
120 |
121 | // In resulting jar include Scala binary version
122 | jar {
123 | archivesBaseName = "${project.name}_${scalaBaseVersion}"
124 | }
125 |
126 | // Check Scala coding conventions
127 | apply from: 'gradle/scalastyle.gradle'
128 |
129 | //
130 | // Configure assembly to create Spark application
131 | //
132 |
133 | // Support for application assembly
134 | apply plugin: 'com.github.johnrengelman.shadow'
135 |
136 |
137 | configurations {
138 | shadowApi {
139 | extendsFrom api
140 | }
141 | }
142 |
143 | shadowJar {
144 | // Configure name of output jar as sparkling-water-droplet-app.jar
145 | archiveAppendix = 'app'
146 | configurations = [project.configurations.shadowApi]
147 | mergeServiceFiles()
148 | archiveBaseName = "${archiveBaseName}_${scalaBaseVersion}"
149 | zip64 = true
150 | }
151 |
152 | artifacts {
153 | api shadowJar
154 | }
155 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/data/iris.csv:
--------------------------------------------------------------------------------
1 | 7.7,3.8,6.7,2.2,Iris-virginica
2 | 6.5,3.0,5.2,2.0,Iris-virginica
3 | 5.6,3.0,4.5,1.5,Iris-versicolor
4 | 5.2,4.1,1.5,0.1,Iris-setosa
5 | 6.5,2.8,4.6,1.5,Iris-versicolor
6 | 5.8,2.8,5.1,2.4,Iris-virginica
7 | 4.9,3.0,1.4,0.2,Iris-setosa
8 | 5.6,2.5,3.9,1.1,Iris-versicolor
9 | 6.1,2.8,4.7,1.2,Iris-versicolor
10 | 6.3,2.7,4.9,1.8,Iris-virginica
11 | 4.6,3.6,1.0,0.2,Iris-setosa
12 | 5.7,4.4,1.5,0.4,Iris-setosa
13 | 7.6,3.0,6.6,2.1,Iris-virginica
14 | 5.9,3.0,4.2,1.5,Iris-versicolor
15 | 6.4,2.8,5.6,2.2,Iris-virginica
16 | 5.1,3.8,1.5,0.3,Iris-setosa
17 | 4.3,3.0,1.1,0.1,Iris-setosa
18 | 5.5,3.5,1.3,0.2,Iris-setosa
19 | 4.9,3.1,1.5,0.1,Iris-setosa
20 | 4.8,3.4,1.6,0.2,Iris-setosa
21 | 5.0,3.4,1.5,0.2,Iris-setosa
22 | 6.7,3.1,5.6,2.4,Iris-virginica
23 | 5.0,3.5,1.3,0.3,Iris-setosa
24 | 6.8,3.0,5.5,2.1,Iris-virginica
25 | 6.9,3.1,5.4,2.1,Iris-virginica
26 | 6.3,3.4,5.6,2.4,Iris-virginica
27 | 4.9,3.1,1.5,0.1,Iris-setosa
28 | 4.5,2.3,1.3,0.3,Iris-setosa
29 | 4.4,3.2,1.3,0.2,Iris-setosa
30 | 6.4,2.9,4.3,1.3,Iris-versicolor
31 | 6.6,2.9,4.6,1.3,Iris-versicolor
32 | 6.3,2.3,4.4,1.3,Iris-versicolor
33 | 6.4,2.7,5.3,1.9,Iris-virginica
34 | 5.5,2.4,3.7,1.0,Iris-versicolor
35 | 5.5,2.4,3.8,1.1,Iris-versicolor
36 | 4.6,3.1,1.5,0.2,Iris-setosa
37 | 5.9,3.0,5.1,1.8,Iris-virginica
38 | 6.1,3.0,4.9,1.8,Iris-virginica
39 | 7.2,3.2,6.0,1.8,Iris-virginica
40 | 4.4,3.0,1.3,0.2,Iris-setosa
41 | 5.7,2.8,4.1,1.3,Iris-versicolor
42 | 7.7,2.8,6.7,2.0,Iris-virginica
43 | 5.8,2.7,4.1,1.0,Iris-versicolor
44 | 6.5,3.0,5.8,2.2,Iris-virginica
45 | 5.2,3.4,1.4,0.2,Iris-setosa
46 | 4.8,3.4,1.9,0.2,Iris-setosa
47 | 7.7,3.0,6.1,2.3,Iris-virginica
48 | 5.4,3.7,1.5,0.2,Iris-setosa
49 | 7.9,3.8,6.4,2.0,Iris-virginica
50 | 5.7,3.8,1.7,0.3,Iris-setosa
51 | 5.7,2.9,4.2,1.3,Iris-versicolor
52 | 6.1,3.0,4.6,1.4,Iris-versicolor
53 | 5.7,2.6,3.5,1.0,Iris-versicolor
54 | 6.8,3.2,5.9,2.3,Iris-virginica
55 | 4.7,3.2,1.3,0.2,Iris-setosa
56 | 5.4,3.4,1.5,0.4,Iris-setosa
57 | 5.1,3.3,1.7,0.5,Iris-setosa
58 | 5.0,3.4,1.6,0.4,Iris-setosa
59 | 5.1,3.8,1.6,0.2,Iris-setosa
60 | 6.8,2.8,4.8,1.4,Iris-versicolor
61 | 5.0,3.6,1.4,0.2,Iris-setosa
62 | 4.8,3.1,1.6,0.2,Iris-setosa
63 | 5.0,2.3,3.3,1.0,Iris-versicolor
64 | 5.0,2.0,3.5,1.0,Iris-versicolor
65 | 4.6,3.2,1.4,0.2,Iris-setosa
66 | 5.4,3.9,1.7,0.4,Iris-setosa
67 | 6.9,3.1,5.1,2.3,Iris-virginica
68 | 6.4,3.2,5.3,2.3,Iris-virginica
69 | 5.8,2.7,5.1,1.9,Iris-virginica
70 | 5.7,2.5,5.0,2.0,Iris-virginica
71 | 5.8,2.7,5.1,1.9,Iris-virginica
72 | 6.3,2.5,4.9,1.5,Iris-versicolor
73 | 5.6,2.8,4.9,2.0,Iris-virginica
74 | 4.9,3.1,1.5,0.1,Iris-setosa
75 | 6.5,3.2,5.1,2.0,Iris-virginica
76 | 6.9,3.1,4.9,1.5,Iris-versicolor
77 | 5.0,3.3,1.4,0.2,Iris-setosa
78 | 6.6,3.0,4.4,1.4,Iris-versicolor
79 | 5.1,3.8,1.9,0.4,Iris-setosa
80 | 5.8,2.6,4.0,1.2,Iris-versicolor
81 | 7.0,3.2,4.7,1.4,Iris-versicolor
82 | 5.0,3.0,1.6,0.2,Iris-setosa
83 | 5.8,4.0,1.2,0.2,Iris-setosa
84 | 6.5,3.0,5.5,1.8,Iris-virginica
85 | 5.4,3.9,1.3,0.4,Iris-setosa
86 | 4.7,3.2,1.6,0.2,Iris-setosa
87 | 5.5,2.3,4.0,1.3,Iris-versicolor
88 | 6.3,2.5,5.0,1.9,Iris-virginica
89 | 5.8,2.7,3.9,1.2,Iris-versicolor
90 | 5.1,3.4,1.5,0.2,Iris-setosa
91 | 5.5,2.6,4.4,1.2,Iris-versicolor
92 | 5.7,2.8,4.5,1.3,Iris-versicolor
93 | 4.6,3.4,1.4,0.3,Iris-setosa
94 | 5.5,2.5,4.0,1.3,Iris-versicolor
95 | 6.7,3.0,5.0,1.7,Iris-versicolor
96 | 6.0,3.4,4.5,1.6,Iris-versicolor
97 | 6.7,2.5,5.8,1.8,Iris-virginica
98 | 5.6,2.9,3.6,1.3,Iris-versicolor
99 | 7.1,3.0,5.9,2.1,Iris-virginica
100 | 6.4,3.2,4.5,1.5,Iris-versicolor
101 | 6.7,3.1,4.4,1.4,Iris-versicolor
102 | 6.2,2.2,4.5,1.5,Iris-versicolor
103 | 5.2,3.5,1.5,0.2,Iris-setosa
104 | 6.2,2.9,4.3,1.3,Iris-versicolor
105 | 4.9,2.5,4.5,1.7,Iris-virginica
106 | 6.3,2.9,5.6,1.8,Iris-virginica
107 | 5.1,2.5,3.0,1.1,Iris-versicolor
108 | 4.4,2.9,1.4,0.2,Iris-setosa
109 | 5.6,3.0,4.1,1.3,Iris-versicolor
110 | 4.8,3.0,1.4,0.3,Iris-setosa
111 | 6.0,2.2,5.0,1.5,Iris-virginica
112 | 6.7,3.1,4.7,1.5,Iris-versicolor
113 | 6.3,2.8,5.1,1.5,Iris-virginica
114 | 4.8,3.0,1.4,0.1,Iris-setosa
115 | 7.2,3.0,5.8,1.6,Iris-virginica
116 | 6.3,3.3,4.7,1.6,Iris-versicolor
117 | 5.7,3.0,4.2,1.2,Iris-versicolor
118 | 5.2,2.7,3.9,1.4,Iris-versicolor
119 | 6.9,3.2,5.7,2.3,Iris-virginica
120 | 6.1,2.8,4.0,1.3,Iris-versicolor
121 | 7.2,3.6,6.1,2.5,Iris-virginica
122 | 7.3,2.9,6.3,1.8,Iris-virginica
123 | 6.7,3.0,5.2,2.3,Iris-virginica
124 | 6.7,3.3,5.7,2.1,Iris-virginica
125 | 5.6,2.7,4.2,1.3,Iris-versicolor
126 | 5.4,3.0,4.5,1.5,Iris-versicolor
127 | 6.0,3.0,4.8,1.8,Iris-virginica
128 | 4.9,2.4,3.3,1.0,Iris-versicolor
129 | 5.1,3.5,1.4,0.3,Iris-setosa
130 | 6.1,2.9,4.7,1.4,Iris-versicolor
131 | 6.4,2.8,5.6,2.1,Iris-virginica
132 | 5.3,3.7,1.5,0.2,Iris-setosa
133 | 6.0,2.2,4.0,1.0,Iris-versicolor
134 | 6.2,2.8,4.8,1.8,Iris-virginica
135 | 5.1,3.7,1.5,0.4,Iris-setosa
136 | 5.0,3.2,1.2,0.2,Iris-setosa
137 | 6.0,2.9,4.5,1.5,Iris-versicolor
138 | 6.0,2.7,5.1,1.6,Iris-versicolor
139 | 6.2,3.4,5.4,2.3,Iris-virginica
140 | 5.1,3.5,1.4,0.2,Iris-setosa
141 |
142 | 6.7,3.3,5.7,2.5,Iris-virginica
143 | 7.4,2.8,6.1,1.9,Iris-virginica
144 | 6.4,3.1,5.5,1.8,Iris-virginica
145 | 6.1,2.6,5.6,1.4,Iris-virginica
146 | 5.9,3.2,4.8,1.8,Iris-versicolor
147 | 5.5,4.2,1.4,0.2,Iris-setosa
148 | 5.0,3.5,1.6,0.6,Iris-setosa
149 | 6.3,3.3,6.0,2.5,Iris-virginica
150 | 5.4,3.4,1.7,0.2,Iris-setosa
151 | 7.7,2.6,6.9,2.3,Iris-virginica
152 |
--------------------------------------------------------------------------------
/h2o-java-droplet/data/iris.csv:
--------------------------------------------------------------------------------
1 | sepal_len,sepal_wid,petal_len,petal_wid,class
2 | 5.1,3.5,1.4,0.2,Iris-setosa
3 | 4.9,3.0,1.4,0.2,Iris-setosa
4 | 4.7,3.2,1.3,0.2,Iris-setosa
5 | 4.6,3.1,1.5,0.2,Iris-setosa
6 | 5.0,3.6,1.4,0.2,Iris-setosa
7 | 5.4,3.9,1.7,0.4,Iris-setosa
8 | 4.6,3.4,1.4,0.3,Iris-setosa
9 | 5.0,3.4,1.5,0.2,Iris-setosa
10 | 4.4,2.9,1.4,0.2,Iris-setosa
11 | 4.9,3.1,1.5,0.1,Iris-setosa
12 | 5.4,3.7,1.5,0.2,Iris-setosa
13 | 4.8,3.4,1.6,0.2,Iris-setosa
14 | 4.8,3.0,1.4,0.1,Iris-setosa
15 | 4.3,3.0,1.1,0.1,Iris-setosa
16 | 5.8,4.0,1.2,0.2,Iris-setosa
17 | 5.7,4.4,1.5,0.4,Iris-setosa
18 | 5.4,3.9,1.3,0.4,Iris-setosa
19 | 5.1,3.5,1.4,0.3,Iris-setosa
20 | 5.7,3.8,1.7,0.3,Iris-setosa
21 | 5.1,3.8,1.5,0.3,Iris-setosa
22 | 5.4,3.4,1.7,0.2,Iris-setosa
23 | 5.1,3.7,1.5,0.4,Iris-setosa
24 | 4.6,3.6,1.0,0.2,Iris-setosa
25 | 5.1,3.3,1.7,0.5,Iris-setosa
26 | 4.8,3.4,1.9,0.2,Iris-setosa
27 | 5.0,3.0,1.6,0.2,Iris-setosa
28 | 5.0,3.4,1.6,0.4,Iris-setosa
29 | 5.2,3.5,1.5,0.2,Iris-setosa
30 | 5.2,3.4,1.4,0.2,Iris-setosa
31 | 4.7,3.2,1.6,0.2,Iris-setosa
32 | 4.8,3.1,1.6,0.2,Iris-setosa
33 | 5.4,3.4,1.5,0.4,Iris-setosa
34 | 5.2,4.1,1.5,0.1,Iris-setosa
35 | 5.5,4.2,1.4,0.2,Iris-setosa
36 | 4.9,3.1,1.5,0.1,Iris-setosa
37 | 5.0,3.2,1.2,0.2,Iris-setosa
38 | 5.5,3.5,1.3,0.2,Iris-setosa
39 | 4.9,3.1,1.5,0.1,Iris-setosa
40 | 4.4,3.0,1.3,0.2,Iris-setosa
41 | 5.1,3.4,1.5,0.2,Iris-setosa
42 | 5.0,3.5,1.3,0.3,Iris-setosa
43 | 4.5,2.3,1.3,0.3,Iris-setosa
44 | 4.4,3.2,1.3,0.2,Iris-setosa
45 | 5.0,3.5,1.6,0.6,Iris-setosa
46 | 5.1,3.8,1.9,0.4,Iris-setosa
47 | 4.8,3.0,1.4,0.3,Iris-setosa
48 | 5.1,3.8,1.6,0.2,Iris-setosa
49 | 4.6,3.2,1.4,0.2,Iris-setosa
50 | 5.3,3.7,1.5,0.2,Iris-setosa
51 | 5.0,3.3,1.4,0.2,Iris-setosa
52 | 7.0,3.2,4.7,1.4,Iris-versicolor
53 | 6.4,3.2,4.5,1.5,Iris-versicolor
54 | 6.9,3.1,4.9,1.5,Iris-versicolor
55 | 5.5,2.3,4.0,1.3,Iris-versicolor
56 | 6.5,2.8,4.6,1.5,Iris-versicolor
57 | 5.7,2.8,4.5,1.3,Iris-versicolor
58 | 6.3,3.3,4.7,1.6,Iris-versicolor
59 | 4.9,2.4,3.3,1.0,Iris-versicolor
60 | 6.6,2.9,4.6,1.3,Iris-versicolor
61 | 5.2,2.7,3.9,1.4,Iris-versicolor
62 | 5.0,2.0,3.5,1.0,Iris-versicolor
63 | 5.9,3.0,4.2,1.5,Iris-versicolor
64 | 6.0,2.2,4.0,1.0,Iris-versicolor
65 | 6.1,2.9,4.7,1.4,Iris-versicolor
66 | 5.6,2.9,3.6,1.3,Iris-versicolor
67 | 6.7,3.1,4.4,1.4,Iris-versicolor
68 | 5.6,3.0,4.5,1.5,Iris-versicolor
69 | 5.8,2.7,4.1,1.0,Iris-versicolor
70 | 6.2,2.2,4.5,1.5,Iris-versicolor
71 | 5.6,2.5,3.9,1.1,Iris-versicolor
72 | 5.9,3.2,4.8,1.8,Iris-versicolor
73 | 6.1,2.8,4.0,1.3,Iris-versicolor
74 | 6.3,2.5,4.9,1.5,Iris-versicolor
75 | 6.1,2.8,4.7,1.2,Iris-versicolor
76 | 6.4,2.9,4.3,1.3,Iris-versicolor
77 | 6.6,3.0,4.4,1.4,Iris-versicolor
78 | 6.8,2.8,4.8,1.4,Iris-versicolor
79 | 6.7,3.0,5.0,1.7,Iris-versicolor
80 | 6.0,2.9,4.5,1.5,Iris-versicolor
81 | 5.7,2.6,3.5,1.0,Iris-versicolor
82 | 5.5,2.4,3.8,1.1,Iris-versicolor
83 | 5.5,2.4,3.7,1.0,Iris-versicolor
84 | 5.8,2.7,3.9,1.2,Iris-versicolor
85 | 6.0,2.7,5.1,1.6,Iris-versicolor
86 | 5.4,3.0,4.5,1.5,Iris-versicolor
87 | 6.0,3.4,4.5,1.6,Iris-versicolor
88 | 6.7,3.1,4.7,1.5,Iris-versicolor
89 | 6.3,2.3,4.4,1.3,Iris-versicolor
90 | 5.6,3.0,4.1,1.3,Iris-versicolor
91 | 5.5,2.5,4.0,1.3,Iris-versicolor
92 | 5.5,2.6,4.4,1.2,Iris-versicolor
93 | 6.1,3.0,4.6,1.4,Iris-versicolor
94 | 5.8,2.6,4.0,1.2,Iris-versicolor
95 | 5.0,2.3,3.3,1.0,Iris-versicolor
96 | 5.6,2.7,4.2,1.3,Iris-versicolor
97 | 5.7,3.0,4.2,1.2,Iris-versicolor
98 | 5.7,2.9,4.2,1.3,Iris-versicolor
99 | 6.2,2.9,4.3,1.3,Iris-versicolor
100 | 5.1,2.5,3.0,1.1,Iris-versicolor
101 | 5.7,2.8,4.1,1.3,Iris-versicolor
102 | 6.3,3.3,6.0,2.5,Iris-virginica
103 | 5.8,2.7,5.1,1.9,Iris-virginica
104 | 7.1,3.0,5.9,2.1,Iris-virginica
105 | 6.3,2.9,5.6,1.8,Iris-virginica
106 | 6.5,3.0,5.8,2.2,Iris-virginica
107 | 7.6,3.0,6.6,2.1,Iris-virginica
108 | 4.9,2.5,4.5,1.7,Iris-virginica
109 | 7.3,2.9,6.3,1.8,Iris-virginica
110 | 6.7,2.5,5.8,1.8,Iris-virginica
111 | 7.2,3.6,6.1,2.5,Iris-virginica
112 | 6.5,3.2,5.1,2.0,Iris-virginica
113 | 6.4,2.7,5.3,1.9,Iris-virginica
114 | 6.8,3.0,5.5,2.1,Iris-virginica
115 | 5.7,2.5,5.0,2.0,Iris-virginica
116 | 5.8,2.8,5.1,2.4,Iris-virginica
117 | 6.4,3.2,5.3,2.3,Iris-virginica
118 | 6.5,3.0,5.5,1.8,Iris-virginica
119 | 7.7,3.8,6.7,2.2,Iris-virginica
120 | 7.7,2.6,6.9,2.3,Iris-virginica
121 | 6.0,2.2,5.0,1.5,Iris-virginica
122 | 6.9,3.2,5.7,2.3,Iris-virginica
123 | 5.6,2.8,4.9,2.0,Iris-virginica
124 | 7.7,2.8,6.7,2.0,Iris-virginica
125 | 6.3,2.7,4.9,1.8,Iris-virginica
126 | 6.7,3.3,5.7,2.1,Iris-virginica
127 | 7.2,3.2,6.0,1.8,Iris-virginica
128 | 6.2,2.8,4.8,1.8,Iris-virginica
129 | 6.1,3.0,4.9,1.8,Iris-virginica
130 | 6.4,2.8,5.6,2.1,Iris-virginica
131 | 7.2,3.0,5.8,1.6,Iris-virginica
132 | 7.4,2.8,6.1,1.9,Iris-virginica
133 | 7.9,3.8,6.4,2.0,Iris-virginica
134 | 6.4,2.8,5.6,2.2,Iris-virginica
135 | 6.3,2.8,5.1,1.5,Iris-virginica
136 | 6.1,2.6,5.6,1.4,Iris-virginica
137 | 7.7,3.0,6.1,2.3,Iris-virginica
138 | 6.3,3.4,5.6,2.4,Iris-virginica
139 | 6.4,3.1,5.5,1.8,Iris-virginica
140 | 6.0,3.0,4.8,1.8,Iris-virginica
141 | 6.9,3.1,5.4,2.1,Iris-virginica
142 | 6.7,3.1,5.6,2.4,Iris-virginica
143 | 6.9,3.1,5.1,2.3,Iris-virginica
144 | 5.8,2.7,5.1,1.9,Iris-virginica
145 | 6.8,3.2,5.9,2.3,Iris-virginica
146 | 6.7,3.3,5.7,2.5,Iris-virginica
147 | 6.7,3.0,5.2,2.3,Iris-virginica
148 | 6.3,2.5,5.0,1.9,Iris-virginica
149 | 6.5,3.0,5.2,2.0,Iris-virginica
150 | 6.2,3.4,5.4,2.3,Iris-virginica
151 | 5.9,3.0,5.1,1.8,Iris-virginica
152 |
153 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/data/iris.csv:
--------------------------------------------------------------------------------
1 | sepal_len,sepal_wid,petal_len,petal_wid,class
2 | 5.1,3.5,1.4,0.2,Iris-setosa
3 | 4.9,3.0,1.4,0.2,Iris-setosa
4 | 4.7,3.2,1.3,0.2,Iris-setosa
5 | 4.6,3.1,1.5,0.2,Iris-setosa
6 | 5.0,3.6,1.4,0.2,Iris-setosa
7 | 5.4,3.9,1.7,0.4,Iris-setosa
8 | 4.6,3.4,1.4,0.3,Iris-setosa
9 | 5.0,3.4,1.5,0.2,Iris-setosa
10 | 4.4,2.9,1.4,0.2,Iris-setosa
11 | 4.9,3.1,1.5,0.1,Iris-setosa
12 | 5.4,3.7,1.5,0.2,Iris-setosa
13 | 4.8,3.4,1.6,0.2,Iris-setosa
14 | 4.8,3.0,1.4,0.1,Iris-setosa
15 | 4.3,3.0,1.1,0.1,Iris-setosa
16 | 5.8,4.0,1.2,0.2,Iris-setosa
17 | 5.7,4.4,1.5,0.4,Iris-setosa
18 | 5.4,3.9,1.3,0.4,Iris-setosa
19 | 5.1,3.5,1.4,0.3,Iris-setosa
20 | 5.7,3.8,1.7,0.3,Iris-setosa
21 | 5.1,3.8,1.5,0.3,Iris-setosa
22 | 5.4,3.4,1.7,0.2,Iris-setosa
23 | 5.1,3.7,1.5,0.4,Iris-setosa
24 | 4.6,3.6,1.0,0.2,Iris-setosa
25 | 5.1,3.3,1.7,0.5,Iris-setosa
26 | 4.8,3.4,1.9,0.2,Iris-setosa
27 | 5.0,3.0,1.6,0.2,Iris-setosa
28 | 5.0,3.4,1.6,0.4,Iris-setosa
29 | 5.2,3.5,1.5,0.2,Iris-setosa
30 | 5.2,3.4,1.4,0.2,Iris-setosa
31 | 4.7,3.2,1.6,0.2,Iris-setosa
32 | 4.8,3.1,1.6,0.2,Iris-setosa
33 | 5.4,3.4,1.5,0.4,Iris-setosa
34 | 5.2,4.1,1.5,0.1,Iris-setosa
35 | 5.5,4.2,1.4,0.2,Iris-setosa
36 | 4.9,3.1,1.5,0.1,Iris-setosa
37 | 5.0,3.2,1.2,0.2,Iris-setosa
38 | 5.5,3.5,1.3,0.2,Iris-setosa
39 | 4.9,3.1,1.5,0.1,Iris-setosa
40 | 4.4,3.0,1.3,0.2,Iris-setosa
41 | 5.1,3.4,1.5,0.2,Iris-setosa
42 | 5.0,3.5,1.3,0.3,Iris-setosa
43 | 4.5,2.3,1.3,0.3,Iris-setosa
44 | 4.4,3.2,1.3,0.2,Iris-setosa
45 | 5.0,3.5,1.6,0.6,Iris-setosa
46 | 5.1,3.8,1.9,0.4,Iris-setosa
47 | 4.8,3.0,1.4,0.3,Iris-setosa
48 | 5.1,3.8,1.6,0.2,Iris-setosa
49 | 4.6,3.2,1.4,0.2,Iris-setosa
50 | 5.3,3.7,1.5,0.2,Iris-setosa
51 | 5.0,3.3,1.4,0.2,Iris-setosa
52 | 7.0,3.2,4.7,1.4,Iris-versicolor
53 | 6.4,3.2,4.5,1.5,Iris-versicolor
54 | 6.9,3.1,4.9,1.5,Iris-versicolor
55 | 5.5,2.3,4.0,1.3,Iris-versicolor
56 | 6.5,2.8,4.6,1.5,Iris-versicolor
57 | 5.7,2.8,4.5,1.3,Iris-versicolor
58 | 6.3,3.3,4.7,1.6,Iris-versicolor
59 | 4.9,2.4,3.3,1.0,Iris-versicolor
60 | 6.6,2.9,4.6,1.3,Iris-versicolor
61 | 5.2,2.7,3.9,1.4,Iris-versicolor
62 | 5.0,2.0,3.5,1.0,Iris-versicolor
63 | 5.9,3.0,4.2,1.5,Iris-versicolor
64 | 6.0,2.2,4.0,1.0,Iris-versicolor
65 | 6.1,2.9,4.7,1.4,Iris-versicolor
66 | 5.6,2.9,3.6,1.3,Iris-versicolor
67 | 6.7,3.1,4.4,1.4,Iris-versicolor
68 | 5.6,3.0,4.5,1.5,Iris-versicolor
69 | 5.8,2.7,4.1,1.0,Iris-versicolor
70 | 6.2,2.2,4.5,1.5,Iris-versicolor
71 | 5.6,2.5,3.9,1.1,Iris-versicolor
72 | 5.9,3.2,4.8,1.8,Iris-versicolor
73 | 6.1,2.8,4.0,1.3,Iris-versicolor
74 | 6.3,2.5,4.9,1.5,Iris-versicolor
75 | 6.1,2.8,4.7,1.2,Iris-versicolor
76 | 6.4,2.9,4.3,1.3,Iris-versicolor
77 | 6.6,3.0,4.4,1.4,Iris-versicolor
78 | 6.8,2.8,4.8,1.4,Iris-versicolor
79 | 6.7,3.0,5.0,1.7,Iris-versicolor
80 | 6.0,2.9,4.5,1.5,Iris-versicolor
81 | 5.7,2.6,3.5,1.0,Iris-versicolor
82 | 5.5,2.4,3.8,1.1,Iris-versicolor
83 | 5.5,2.4,3.7,1.0,Iris-versicolor
84 | 5.8,2.7,3.9,1.2,Iris-versicolor
85 | 6.0,2.7,5.1,1.6,Iris-versicolor
86 | 5.4,3.0,4.5,1.5,Iris-versicolor
87 | 6.0,3.4,4.5,1.6,Iris-versicolor
88 | 6.7,3.1,4.7,1.5,Iris-versicolor
89 | 6.3,2.3,4.4,1.3,Iris-versicolor
90 | 5.6,3.0,4.1,1.3,Iris-versicolor
91 | 5.5,2.5,4.0,1.3,Iris-versicolor
92 | 5.5,2.6,4.4,1.2,Iris-versicolor
93 | 6.1,3.0,4.6,1.4,Iris-versicolor
94 | 5.8,2.6,4.0,1.2,Iris-versicolor
95 | 5.0,2.3,3.3,1.0,Iris-versicolor
96 | 5.6,2.7,4.2,1.3,Iris-versicolor
97 | 5.7,3.0,4.2,1.2,Iris-versicolor
98 | 5.7,2.9,4.2,1.3,Iris-versicolor
99 | 6.2,2.9,4.3,1.3,Iris-versicolor
100 | 5.1,2.5,3.0,1.1,Iris-versicolor
101 | 5.7,2.8,4.1,1.3,Iris-versicolor
102 | 6.3,3.3,6.0,2.5,Iris-virginica
103 | 5.8,2.7,5.1,1.9,Iris-virginica
104 | 7.1,3.0,5.9,2.1,Iris-virginica
105 | 6.3,2.9,5.6,1.8,Iris-virginica
106 | 6.5,3.0,5.8,2.2,Iris-virginica
107 | 7.6,3.0,6.6,2.1,Iris-virginica
108 | 4.9,2.5,4.5,1.7,Iris-virginica
109 | 7.3,2.9,6.3,1.8,Iris-virginica
110 | 6.7,2.5,5.8,1.8,Iris-virginica
111 | 7.2,3.6,6.1,2.5,Iris-virginica
112 | 6.5,3.2,5.1,2.0,Iris-virginica
113 | 6.4,2.7,5.3,1.9,Iris-virginica
114 | 6.8,3.0,5.5,2.1,Iris-virginica
115 | 5.7,2.5,5.0,2.0,Iris-virginica
116 | 5.8,2.8,5.1,2.4,Iris-virginica
117 | 6.4,3.2,5.3,2.3,Iris-virginica
118 | 6.5,3.0,5.5,1.8,Iris-virginica
119 | 7.7,3.8,6.7,2.2,Iris-virginica
120 | 7.7,2.6,6.9,2.3,Iris-virginica
121 | 6.0,2.2,5.0,1.5,Iris-virginica
122 | 6.9,3.2,5.7,2.3,Iris-virginica
123 | 5.6,2.8,4.9,2.0,Iris-virginica
124 | 7.7,2.8,6.7,2.0,Iris-virginica
125 | 6.3,2.7,4.9,1.8,Iris-virginica
126 | 6.7,3.3,5.7,2.1,Iris-virginica
127 | 7.2,3.2,6.0,1.8,Iris-virginica
128 | 6.2,2.8,4.8,1.8,Iris-virginica
129 | 6.1,3.0,4.9,1.8,Iris-virginica
130 | 6.4,2.8,5.6,2.1,Iris-virginica
131 | 7.2,3.0,5.8,1.6,Iris-virginica
132 | 7.4,2.8,6.1,1.9,Iris-virginica
133 | 7.9,3.8,6.4,2.0,Iris-virginica
134 | 6.4,2.8,5.6,2.2,Iris-virginica
135 | 6.3,2.8,5.1,1.5,Iris-virginica
136 | 6.1,2.6,5.6,1.4,Iris-virginica
137 | 7.7,3.0,6.1,2.3,Iris-virginica
138 | 6.3,3.4,5.6,2.4,Iris-virginica
139 | 6.4,3.1,5.5,1.8,Iris-virginica
140 | 6.0,3.0,4.8,1.8,Iris-virginica
141 | 6.9,3.1,5.4,2.1,Iris-virginica
142 | 6.7,3.1,5.6,2.4,Iris-virginica
143 | 6.9,3.1,5.1,2.3,Iris-virginica
144 | 5.8,2.7,5.1,1.9,Iris-virginica
145 | 6.8,3.2,5.9,2.3,Iris-virginica
146 | 6.7,3.3,5.7,2.5,Iris-virginica
147 | 6.7,3.0,5.2,2.3,Iris-virginica
148 | 6.3,2.5,5.0,1.9,Iris-virginica
149 | 6.5,3.0,5.2,2.0,Iris-virginica
150 | 6.2,3.4,5.4,2.3,Iris-virginica
151 | 5.9,3.0,5.1,1.8,Iris-virginica
152 |
153 |
--------------------------------------------------------------------------------
/h2o-java-droplet/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/h2o-pojo-on-spark-droplet/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/src/main/scala/water/droplets/H2OSWMixedAPIDroplet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package water.droplets
19 |
20 | import hex.tree.gbm.GBMModel
21 | import org.apache.spark.h2o.H2OContext
22 | import org.apache.spark.ml.Pipeline
23 | import org.apache.spark.ml.feature.{HashingTF, IDF, RegexTokenizer, StopWordsRemover}
24 | import org.apache.spark.SparkConf
25 | import org.apache.spark.sql.SparkSession
26 | import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType}
27 | import _root_.hex.grid.GridSearch
28 | import ai.h2o.sparkling.ml.features.ColumnPruner
29 | import hex.ModelMetrics
30 | import hex.genmodel.algos.gbm.GbmMojoModel
31 |
32 | import scala.collection.JavaConverters._
33 |
34 | /**
35 | * Example of Sparkling Water based application.
36 | */
37 | object H2OSWMixedAPIDroplet {
38 |
39 | def main(args: Array[String]) {
40 |
41 | // Create Spark Session
42 | val conf = new SparkConf().setAppName("H2O-SW mixed API Droplet").setMaster("local")
43 | val spark = SparkSession.builder.config(conf).getOrCreate()
44 | import spark.implicits._
45 |
46 | // Create H2O Context
47 | val hc = H2OContext.getOrCreate()
48 |
49 | // Load data from file
50 | val dataDF = spark.read
51 | .option("delimiter", "\t")
52 | .schema(StructType(Array(
53 | StructField("label", StringType, nullable = false),
54 | StructField("text", StringType, nullable = false),
55 | StructField("weight", IntegerType, nullable = false),
56 | StructField("fold", IntegerType, nullable = false))))
57 | .csv("data/smsData.txt")
58 |
59 | val Array(trainingDF, testingDF) = dataDF.randomSplit(Array(0.9, 0.1))
60 |
61 | // Perform pre-processing and feature engineering with Apache Spark
62 | val preProcessingPipeline = sparkPreprocessingPipeline().fit(trainingDF)
63 |
64 | val preProcessedTrainingDF = preProcessingPipeline.transform(trainingDF)
65 | val trainingH2OFrame = hc.asH2OFrame(preProcessedTrainingDF)
66 |
67 | val preProcessedTestingDF = preProcessingPipeline.transform(testingDF)
68 | val testingH2OFrame = hc.asH2OFrame(preProcessedTestingDF)
69 |
70 | // Setup hyper-parameter search space
71 | val hyperParams = Map[String, Array[AnyRef]](
72 | "_ntrees" -> Array[Integer](5, 10, 15).asInstanceOf[Array[AnyRef]],
73 | "_max_depth" -> Array[Integer](2, 5).asInstanceOf[Array[AnyRef]],
74 | "_learn_rate" -> Array[java.lang.Double](0.01, 0.1, 0.3).asInstanceOf[Array[AnyRef]]
75 | ).asJava
76 |
77 | // Prepare training dataset to be passed to a H2O algorithm
78 | val params = new GBMModel.GBMParameters
79 | params._train = trainingH2OFrame.key
80 | params._response_column = "label"
81 | params._ignored_columns = Array("text")
82 | params._weights_column = "weight"
83 | params._fold_column = "fold"
84 |
85 | trainingH2OFrame.replace(0, trainingH2OFrame.vec("label").toCategoricalVec)
86 |
87 | // Fire off a grid search
88 | val gs = GridSearch.startGridSearch(null, params, hyperParams)
89 | val grid = gs.get()
90 |
91 | // Get the best model from the grid based on AUC metric
92 | val model = grid.getModels.sortBy(_.auc())(Ordering[Double].reverse).head
93 |
94 | // Get the corresponding GBM MOJO model
95 | val mojoModel = model.toMojo.asInstanceOf[GbmMojoModel]
96 |
97 | // Print values of hyper-parameters for a selected model (e.g. 'ntrees')
98 | println(s"NTreeGroups: ${mojoModel.getNTreeGroups}")
99 |
100 | // Print AUC metric for the model based on training datasets (k-fold cross validation)
101 | println(s"Training AUC: ${model._output._training_metrics.auc_obj()._auc}")
102 |
103 | // Print AUC metric for the model based on validation datasets (k-fold cross validation)
104 | println(s"Validation AUC: ${model.auc()}")
105 |
106 | // Make prediction on the best model
107 | val h2oPrediction = model
108 | .score(testingH2OFrame)
109 | .add(testingH2OFrame)
110 |
111 | // Print AUC metric for the model based on the testing dataset
112 | println(s"Testing AUC: ${ModelMetrics.getFromDKV(model, testingH2OFrame).auc_obj()._auc}")
113 |
114 | // Convert testing frame with predictions back to Spark and show results
115 | val predictionDF = hc.asSparkFrame(h2oPrediction)
116 | predictionDF
117 | .select($"text", $"label", $"predict" as "prediction", $"ham", $"spam")
118 | .show()
119 |
120 | // Shutdown application
121 | hc.stop(true)
122 | }
123 |
124 | def sparkPreprocessingPipeline(): Pipeline = {
125 |
126 | // Tokenize messages and split sentences into words.
127 | val tokenizer = new RegexTokenizer()
128 | .setInputCol("text")
129 | .setOutputCol("words")
130 | .setMinTokenLength(3)
131 | .setGaps(false)
132 | .setPattern("[a-zA-Z]+")
133 |
134 | // Remove words that do not bring much value to the model
135 | val stopWordsRemover = new StopWordsRemover()
136 | .setInputCol(tokenizer.getOutputCol)
137 | .setOutputCol("filtered")
138 | .setStopWords(Array("the", "a", "", "in", "on", "at", "as", "not", "for"))
139 | .setCaseSensitive(false)
140 |
141 | // Create hashes for the observed words.
142 | val hashingTF = new HashingTF()
143 | .setNumFeatures(1 << 10)
144 | .setInputCol(stopWordsRemover.getOutputCol)
145 | .setOutputCol("wordToIndex")
146 |
147 | // Create an IDF model. This creates a numerical representation of how much information a given word provides in the whole message.
148 | val idf = new IDF()
149 | .setMinDocFreq(4)
150 | .setInputCol(hashingTF.getOutputCol)
151 | .setOutputCol("tf_idf_features")
152 |
153 | // Remove unnecessary columns
154 | val colPruner = new ColumnPruner()
155 | .setColumns(Array[String](hashingTF.getOutputCol, stopWordsRemover.getOutputCol, tokenizer.getOutputCol))
156 |
157 | // Assemble stages
158 | new Pipeline()
159 | .setStages(Array(tokenizer, stopWordsRemover, hashingTF, idf, colPruner))
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/sparkling-water-droplet/gradle/conf/scalastyle-config.xml:
--------------------------------------------------------------------------------
1 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Scalastyle standard configuration
27 |
28 |
29 |
30 |
31 |
32 |
33 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | true
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | COLON, IF, COMMA, ELSE
147 |
148 |
149 |
154 |
155 |
--------------------------------------------------------------------------------
/h2o-sw-mixed-api-droplet/gradle/conf/scalastyle-config.xml:
--------------------------------------------------------------------------------
1 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Scalastyle standard configuration
27 |
28 |
29 |
30 |
31 |
32 |
33 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | true
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | COLON, IF, COMMA, ELSE
147 |
148 |
149 |
154 |
155 |
--------------------------------------------------------------------------------
/sparkling-water-mojo-scorer-droplet/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | ai.h2o
8 | sparkling-water-mojo-scorer-droplet
9 | 1.0-SNAPSHOT
10 |
11 |
12 | 3.0.0
13 | 3.30.0.7-1-3.0
14 | 2.12.10
15 | 2.12
16 |
17 |
18 |
19 |
20 | org.scala-lang
21 | scala-library
22 | ${scala.version}
23 |
24 |
25 |
26 | org.apache.spark
27 | spark-core_${scala.binary.version}
28 | ${spark.version}
29 |
30 |
31 |
32 | org.apache.spark
33 | spark-mllib_${scala.binary.version}
34 | ${spark.version}
35 |
36 |
37 |
38 | org.apache.spark
39 | spark-sql_${scala.binary.version}
40 | ${spark.version}
41 |
42 |
43 |
44 |
45 | org.scalatest
46 | scalatest_${scala.binary.version}
47 | 3.2.0
48 |
49 |
50 | junit
51 | junit
52 | 4.12
53 |
54 |
55 |
56 | ai.h2o
57 | sparkling-water-package_${scala.binary.version}
58 | ${sparkling.version}
59 |
60 |
61 |
62 |
63 |
64 | org.apache.maven.plugins
65 | maven-compiler-plugin
66 | 3.3
67 |
68 | 1.8
69 | 1.8
70 |
71 |
72 |
73 |
74 | net.alchim31.maven
75 | scala-maven-plugin
76 | 3.2.0
77 |
78 | UTF-8
79 | ${scala.version}
80 |
81 |
82 |
83 | scala-compile-first
84 | process-resources
85 |
86 | add-source
87 | compile
88 |
89 |
90 |
91 | scala-test-compile
92 | process-test-resources
93 |
94 | testCompile
95 |
96 |
97 |
98 |
99 |
100 |
101 | org.scalatest
102 | scalatest-maven-plugin
103 | 1.0
104 |
105 | ${project.build.directory}/surefire-reports
106 | .
107 | WDF TestSuite.txt
108 | false
109 |
110 |
111 |
112 | test
113 | test
114 |
115 | test
116 |
117 |
118 | false
119 |
120 |
121 |
122 | integration-test
123 | integration-test
124 |
125 | test
126 |
127 |
128 | Integration-Test
129 |
130 | -Xmx1536m -XX:ReservedCodeCacheSize=512m
131 |
132 | false
133 |
134 |
135 |
136 |
137 |
138 | org.apache.maven.plugins
139 | maven-shade-plugin
140 | 2.2
141 |
142 | false
143 | target/H2oTesting.jar
144 |
145 |
146 | *:*
147 |
148 |
149 |
150 |
151 | *:*
152 |
153 | META-INF/*.SF
154 | META-INF/*.DSA
155 | META-INF/*.RSA
156 |
157 |
158 |
159 |
160 |
161 |
162 | package
163 |
164 | shade
165 |
166 |
167 |
168 |
170 |
172 | reference.conf
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 | org.codehaus.mojo
181 | exec-maven-plugin
182 | 1.6.0
183 |
184 |
185 |
186 | java
187 |
188 |
189 |
190 |
191 | water.droplets.SparklingWaterScorerDroplet
192 |
193 |
194 |
195 |
196 |
197 |
198 | repo1.maven.org
199 | http://repo1.maven.org/maven2
200 |
201 | true
202 |
203 |
204 | false
205 |
206 |
207 |
208 |
209 | oss.sonatype.org
210 | https://oss.sonatype.org/content/groups/public
211 |
212 | true
213 |
214 |
215 | false
216 |
217 |
218 |
219 |
220 |
221 |
--------------------------------------------------------------------------------