Skip to content

Commit

Permalink
[SW-24] Add tab to download page explaining using sparkling water as …
Browse files Browse the repository at this point in the history
…spark package
  • Loading branch information
jakubhava committed Jun 13, 2017
1 parent 917799a commit 02aea0e
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
72 changes: 71 additions & 1 deletion dist/index.html
Expand Up @@ -239,6 +239,8 @@
var klusterPanel = document.getElementById('kluster')
var pysparklingTab = document.getElementById('pysparkling-tab')
var pysparklingPanel = document.getElementById('pysparkling')
var sparkPackageTab = document.getElementById('package-tab')
var sparkPackagePanel = document.getElementById('package')
var showZipTab = function() {
zipPanel.style.display = 'block';
zipTab.className = 'active';
Expand All @@ -254,6 +256,8 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showStandaloneTab = function() {
standalonePanel.style.display = 'block';
Expand All @@ -270,6 +274,8 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showHadoopTab = function(){
hadoopPanel.style.display = 'block';
Expand All @@ -286,6 +292,8 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showMavenTab = function(){
hadoopPanel.style.display = 'none';
Expand All @@ -302,6 +310,8 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showRSparklingTab = function(){
hadoopPanel.style.display = 'none';
Expand All @@ -318,6 +328,8 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showKlusterTab = function(){
hadoopPanel.style.display = 'none';
Expand All @@ -334,6 +346,8 @@
klusterTab.className = 'active';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showPySparklingTab = function(){
hadoopPanel.style.display = 'none';
Expand All @@ -350,7 +364,26 @@
klusterTab.className = '';
pysparklingPanel.style.display = 'block';
pysparklingTab.className = 'active';

sparkPackagePanel.style.display = 'none';
sparkPackageTab.className = '';
};
var showSparkPackageTab = function(){
hadoopPanel.style.display = 'none';
hadoopTab.className = '';
standalonePanel.style.display = 'none';
standaloneTab.className = '';
zipPanel.style.display = 'none';
zipTab.className = '';
mavenPanel.style.display = 'none';
mavenTab.className = '';
rsparklingPanel.style.display = 'none';
rsparklingTab.className = '';
klusterPanel.style.display = 'none';
klusterTab.className = '';
pysparklingPanel.style.display = 'none';
pysparklingTab.className = '';
sparkPackagePanel.style.display = 'block';
sparkPackageTab.className = 'active';
};

zipTab.onclick = showZipTab
Expand All @@ -360,6 +393,7 @@
rsparklingTab.onclick = showRSparklingTab
klusterTab.onclick = showKlusterTab
pysparklingTab.onclick = showPySparklingTab
sparkPackageTab.onclick = showSparkPackageTab
var hash = window.location.hash;
if(hash && hash.indexOf('#h') == 0) {
showHadoopTab();
Expand Down Expand Up @@ -400,6 +434,7 @@ <h1><span>Sparkling Water</span></h1>
<span id="maven-tab">Use from Maven</span>
<span id="rsparkling-tab">RSparkling</span>
<span id="pysparkling-tab">PySparkling</span>
<span id="package-tab">Spark Package</span>
</div>
<div id="panels">
<div id="quickstart-zip">
Expand Down Expand Up @@ -670,6 +705,38 @@ <h2>H2O Python Client</h2>
<p>Once you have H2OContext available, any API calls available in the H2O Python client can be used. For more information about the Python client, please visit <a href="https://h2o-release.s3.amazonaws.com/h2o/SUBST_H2O_BRANCH_NAME/SUBST_H2O_BUILD/index.html#Python">H2O-Python page</a>.</p>
<p></p>
</div>

<div id="package" style="display:none">
<div class="integration-info">
<h2>Integration info</h2>
<div>
<ul>
<li>H2O version: <a href="https://h2o-release.s3.amazonaws.com/h2o/SUBST_H2O_BRANCH_NAME/SUBST_H2O_BUILD/index.html">SUBST_H2O_VERSION.SUBST_H2O_BUILD SUBST_H2O_NAME</a> (<a href="https://h2o-release.s3.amazonaws.com/h2o/SUBST_H2O_BRANCH_NAME/SUBST_H2O_BUILD/docs-website/h2o-docs/index.html">documentation</a>)</li>
<li>Spark version: <a href="https://spark.apache.org/downloads.html">SUBST_SPARK_VERSION</a> (<a href="https://spark.apache.org/docs/SUBST_SPARK_VERSION/">documentation</a>)</li>
<li><a href="https://github.com/h2oai/sparkling-water/blob/rel-SUBST_SPARK_MAJOR_VERSION/CHANGELOG.md">Sparkling Water Changelog</a></li>
</ul>
</div>
</div>

<h2>Sparkling Water as Spark Package</h2>
<p>To start Spark with Sparkling Water enabled via Spark package, do: </p>

<p>1. Ensure that Spark is installed, and MASTER and SPARK_HOME environmental variables are properly set.</p>
<p>2. Start Spark and point to maven coordinates of Sparkling Water:</p>
<p class="terminal">
$SPARK_HOME/bin/spark-shell --packages ai.h2o:sparkling-water-core_SUBST_SCALA_VERSION:SUBST_PROJECT_VERSION
</p>

<p>3. Create an H<sub>2</sub>O cloud inside the Spark cluster:</p>
<p class="terminal">
import org.apache.spark.h2o._<br />
val h2oContext = H2OContext.getOrCreate(spark) <br />
import h2oContext._ <br />
</p>

</div>


<div id="documentation">
<h2>Documentation</h2>
<ul>
Expand All @@ -678,6 +745,9 @@ <h2>Documentation</h2>
<li><a href="https://github.com/h2oai/h2o-droplets/tree/master/sparkling-water-droplet">Sparkling Water Application Template</a></li>
</ul>
</div>



</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions make-dist.sh
Expand Up @@ -103,6 +103,7 @@ cat "$DIST_DIR/index.html" \
| sed -e "s/SUBST_SPARK_VERSION/${SPARK_VERSION}/g"\
| sed -e "s/SUBST_SPARK_MAJOR_VERSION/${SPARK_MAJOR_VERSION}/g"\
| sed -e "s/SUBST_H2O_BRANCH_NAME/${H2O_BRANCH_NAME}/g"\
| sed -e "s/SUBST_SCALA_VERSION/${SCALA_VERSION}/g"\
> "$DIST_BUILD_DIR/index.html"

# Create json metadata file.
Expand Down

0 comments on commit 02aea0e

Please sign in to comment.