Merge pull request #1 from apache/master

merge apache/zeppelin
This commit is contained in:
束佳明 2017-08-05 15:50:50 +08:00 committed by GitHub
commit d02104ac58
694 changed files with 40507 additions and 16473 deletions

33
.appveyor.yml Normal file
View file

@ -0,0 +1,33 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
version: '1.0.0-dev.{build}'
shallow_clone: true
build: off
os:
- Visual Studio 2015
install:
- echo "Install"
build_script:
- echo "Build"

6
.gitignore vendored
View file

@ -100,6 +100,9 @@ Thumbs.db
target/
**/target/
# maven flattened pom files
**/.flattened-pom.xml
# Generated by Jekyll
docs/_site/
@ -119,3 +122,6 @@ tramp
# tmp files
/tmp/
# Git properties
**/git.properties

View file

@ -34,53 +34,98 @@ addons:
packages:
- r-base-dev
env:
global:
# Interpreters does not required by zeppelin-server integration tests
- INTERPRETERS='!hbase,!pig,!jdbc,!file,!flink,!ignite,!kylin,!python,!lens,!cassandra,!elasticsearch,!bigquery,!alluxio,!scio,!livy,!groovy'
matrix:
include:
# Test License compliance using RAT tool
- jdk: "oraclejdk7"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
# Test all modules with spark 2.1.0 and scala 2.11
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.1 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
# Run e2e tests (in zeppelin-web)
# chrome dropped the support for precise (ubuntu 12.04), so need to use trusty
# also, can't use JDK 7 in trusty: https://github.com/travis-ci/travis-ci/issues/7884
- os: linux
sudo: false
dist: trusty
jdk: "oraclejdk8"
env: WEB_E2E="true" SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pscala-2.11" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl ${INTERPRETERS}" TEST_MODULES="-pl zeppelin-web" TEST_PROJECTS="-Pweb-e2e"
addons:
apt:
sources:
- r-packages-trusty
packages:
- google-chrome-stable
- r-base-dev
# Test all modules with spark 2.0.2 and scala 2.11
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
# Test all modules with scala 2.10
- jdk: "oraclejdk7"
env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Pbeam -Phelium-dev -Pexamples -Pscala-2.10" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
# Test all modules with scala 2.11
- jdk: "oraclejdk7"
env: SCALA_VER="2.11" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.6 -Ppyspark -Psparkr -Pscalding -Phelium-dev -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" TEST_PROJECTS=""
# Test spark module for 1.5.2
- jdk: "oraclejdk7"
env: SCALA_VER="2.10" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test spark module for 1.4.1
- jdk: "oraclejdk7"
env: SCALA_VER="2.10" SPARK_VER="1.4.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.4 -Pr -Phadoop-2.6 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test core modules
# Several tests were excluded from this configuration due to the following issues:
# HeliumApplicationFactoryTest - https://issues.apache.org/jira/browse/ZEPPELIN-2470
# After issues are fixed these tests need to be included back by removing them from the "-Dtests.to.exclude" property
- jdk: "oraclejdk8"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="2.2.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.2 -Pweb-ci -Pscalding -Phelium-dev -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" MODULES="-pl ${INTERPRETERS}" TEST_PROJECTS="-Dtests.to.exclude=**/ZeppelinSparkClusterTest.java,**/org.apache.zeppelin.spark.*,**/HeliumApplicationFactoryTest.java -DfailIfNoTests=false"
# Test selenium with spark module for 1.6.3
- jdk: "oraclejdk7"
env: TEST_SELENIUM="true" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark -Phelium-dev -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
dist: precise
env: TEST_SELENIUM="true" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-1.6 -Phadoop-2.6 -Phelium-dev -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
# Test python/pyspark with python 2
# Test interpreter modules
- jdk: "oraclejdk7"
env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.6" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Ppyspark" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
dist: precise
env: SCALA_VER="2.10" PROFILE="-Pscalding" BUILD_FLAG="package -DskipTests -DskipRat -Pr" TEST_FLAG="test -DskipRat" MODULES="-pl $(echo .,zeppelin-interpreter,${INTERPRETERS} | sed 's/!//g')" TEST_PROJECTS=""
# Test python/pyspark with python 3
- jdk: "oraclejdk7"
env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Ppyspark -Pscala-2.11" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
# Test spark module for 2.2.0 with scala 2.11, livy
- jdk: "oraclejdk8"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="2.2.0" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-2.2 -Phadoop-2.6 -Pscala-2.11" SPARKR="true" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,livy" TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.*,org.apache.zeppelin.livy.* -DfailIfNoTests=false"
# Test livy with spark 1.5.2 and hadoop 2.6
# Test spark module for 2.1.0 with scala 2.11, livy
- jdk: "oraclejdk7"
env: SCALA_VER="2.10" $LIVY_VER="0.2.0" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Phadoop-2.6" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,livy -DfailIfNoTests=false"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-2.1 -Phadoop-2.6 -Pscala-2.11" SPARKR="true" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,livy" TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.*,org.apache.zeppelin.livy.* -DfailIfNoTests=false"
# Test spark module for 2.0.2 with scala 2.11
- jdk: "oraclejdk7"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-2.0 -Phadoop-2.6 -Pscala-2.11" SPARKR="true" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark" TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test spark module for 1.6.3 with scala 2.10
- jdk: "oraclejdk7"
dist: precise
env: SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-1.6 -Phadoop-2.6 -Pscala-2.10" SPARKR="true" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark" TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.*,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test spark module for 1.6.3 with scala 2.11
- jdk: "oraclejdk7"
dist: precise
env: SCALA_VER="2.11" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-1.6 -Phadoop-2.6 -Pscala-2.11" SPARKR="true" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="test -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark" TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest,org.apache.zeppelin.spark.* -DfailIfNoTests=false"
# Test python/pyspark with python 2, livy 0.2
- sudo: required
dist: precise
jdk: "oraclejdk7"
env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.6" LIVY_VER="0.2.0" PROFILE="-Pspark-1.6 -Phadoop-2.6 -Plivy-0.2" BUILD_FLAG="package -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python,livy" TEST_PROJECTS="-Dtest=LivySQLInterpreterTest,org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
# Test python/pyspark with python 3, livy 0.3
- sudo: required
dist: precise
jdk: "oraclejdk7"
env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.6" LIVY_VER="0.3.0" PROFILE="-Pspark-2.0 -Phadoop-2.6 -Pscala-2.11 -Plivy-0.3" BUILD_FLAG="package -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl .,zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python,livy" TEST_PROJECTS="-Dtest=LivySQLInterpreterTest,org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
before_install:
# check files included in commit range, clear bower_components if a bower.json file has changed.
# bower cache clearing can also be forced by putting "bower clear" or "clear bower" in a commit message
- changedfiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE 2>/dev/null) || changedfiles=""
- echo $changedfiles
- hasbowerchanged=$(echo $changedfiles | grep -c "bower.json" || true);
- gitlog=$(git log $TRAVIS_COMMIT_RANGE 2>/dev/null) || gitlog=""
- clearcache=$(echo $gitlog | grep -c -E "clear bower|bower clear" || true)
- if [ "$hasbowerchanged" -gt 0 ] || [ "$clearcache" -gt 0 ]; then echo "Clearing bower_components cache"; rm -r zeppelin-web/bower_components; npm cache clear; else echo "Using cached bower_components."; fi
- echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=warn'" >> ~/.mavenrc
- ./testing/install_external_dependencies.sh
- ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin || true
@ -90,19 +135,26 @@ before_install:
- source ~/.environ
install:
- mvn $BUILD_FLAG $PROFILE -B
- echo "mvn $BUILD_FLAG $MODULES $PROFILE -B"
- mvn $BUILD_FLAG $MODULES $PROFILE -B
before_script:
- travis_retry ./testing/downloadSpark.sh $SPARK_VER $HADOOP_VER
- if [[ -n $SPARK_VER ]]; then travis_retry ./testing/downloadSpark.sh $SPARK_VER $HADOOP_VER; fi
- if [[ -n $LIVY_VER ]]; then ./testing/downloadLivy.sh $LIVY_VER; fi
- if [[ -n $LIVY_VER ]]; then export LIVY_HOME=`pwd`/livy-server-$LIVY_VER; fi
- if [[ -n $LIVY_VER ]]; then export SPARK_HOME=`pwd`/spark-$SPARK_VER-bin-hadoop$HADOOP_VER; fi
- echo "export SPARK_HOME=`pwd`/spark-$SPARK_VER-bin-hadoop$HADOOP_VER" > conf/zeppelin-env.sh
- echo "export ZEPPELIN_HELIUM_REGISTRY=helium" >> conf/zeppelin-env.sh
- tail conf/zeppelin-env.sh
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- if [[ -n $TEST_MODULES ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi
# display info log for debugging
- if [[ -n $TEST_MODULES ]]; then echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=info'" > ~/.mavenrc; fi
script:
- mvn $TEST_FLAG $PROFILE -B $TEST_PROJECTS
- if [[ -n $TEST_MODULES ]]; then export MODULES="${TEST_MODULES}"; fi
- echo "mvn $TEST_FLAG $MODULES $PROFILE -B $TEST_PROJECTS"
- mvn $TEST_FLAG $MODULES $PROFILE -B $TEST_PROJECTS
after_success:
- echo "Travis exited with ${TRAVIS_TEST_RESULT}"
@ -118,3 +170,7 @@ after_failure:
- ls -R livy/target/tmp/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*
- cat livy/target/tmp/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*/*/*/stdout
- cat livy/target/tmp/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*/*/*/stderr
- cat livy/target/tmp/livy-int-test/*/output.log
- ls -R livy/target/tmp/livy-int-test/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*
- cat livy/target/tmp/livy-int-test/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*/*/*/stdout
- cat livy/target/tmp/livy-int-test/MiniYarnMain/target/com.cloudera.livy.test.framework.MiniYarnMain/*/*/*/stderr

10
LICENSE
View file

@ -255,6 +255,7 @@ The text of each license is also included at licenses/LICENSE-[project]-[version
(Apache 2.0) Bootstrap v3.0.2 (http://getbootstrap.com/) - https://github.com/twbs/bootstrap/blob/v3.0.2/LICENSE
(Apache 2.0) Software under ./bigquery/* was developed at Google (http://www.google.com/). Licensed under the Apache v2.0 License.
(Apache 2.0) Roboto Font (https://github.com/google/roboto/)
(Apache 2.0) Gson extra (https://github.com/DanySK/gson-extras)
========================================================================
BSD 3-Clause licenses
@ -271,7 +272,14 @@ The following components are provided under the BSD 3-Clause license. See file
========================================================================
BSD 2-Clause licenses
========================================================================
The following components are provided under the BSD 3-Clause license. See file headers and project links for details.
The following components are provided under the BSD 2-Clause license. See file headers and project links for details.
(BSD 2 Clause) portions of SQLLine (http://sqlline.sourceforge.net/) - http://sqlline.sourceforge.net/#license
jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
========================================================================
Jython Software License
========================================================================
The following components are provided under the Jython Software License. See file headers and project links for details.
(Jython Software License) jython-standalone - http://www.jython.org/

View file

@ -15,268 +15,269 @@ limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!-- This is a checkstyle configuration file. For descriptions of what the
following rules do, please see the checkstyle configuration page at http://checkstyle.sourceforge.net/config.html -->
<module name="Checker">
<module name="FileTabCharacter">
<!-- Checks that there are no tab characters in the file. -->
</module>
<module name="FileTabCharacter">
<!-- Checks that there are no tab characters in the file. -->
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf" />
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="RegexpSingleline">
<!-- Checks that FIXME is not used in comments. TODO is preferred. -->
<property name="format" value="((//.*)|(\*.*))FIXME" />
<property name="message"
value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."' />
</module>
<module name="RegexpSingleline">
<!-- Checks that FIXME is not used in comments. TODO is preferred. -->
<property name="format" value="((//.*)|(\*.*))FIXME"/>
<property name="message"
value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."'/>
</module>
<module name="RegexpSingleline">
<!-- Checks that TODOs are named. (Actually, just that they are followed
by an open paren.) -->
<property name="format" value="((//.*)|(\*.*))TODO[^(]" />
<property name="message"
value='All TODOs should be named. e.g. "TODO(johndoe): Refactor when v2 is released."' />
</module>
<module name="RegexpSingleline">
<!-- Checks that TODOs are named. (Actually, just that they are followed
by an open paren.) -->
<property name="format" value="((//.*)|(\*.*))TODO[^(]"/>
<property name="message"
value='All TODOs should be named. e.g. "TODO(johndoe): Refactor when v2 is released."'/>
</module>
<!-- <module name="JavadocPackage"> - Checks that each Java package has
a Javadoc file used for commenting. Only allows a package-info.java, not
package.html. </module> -->
<!-- All Java AST specific tests live under TreeWalker module. -->
<module name="TreeWalker">
<!-- <module name="JavadocPackage"> - Checks that each Java package has
a Javadoc file used for commenting. Only allows a package-info.java, not
package.html. </module> -->
<!-- All Java AST specific tests live under TreeWalker module. -->
<module name="TreeWalker">
<!-- IMPORT CHECKS -->
<!-- IMPORT CHECKS -->
<module name="RedundantImport">
<!-- Checks for redundant import statements. -->
<property name="severity" value="error" />
</module>
<!-- <module name="ImportOrder"> Checks for out of order import statements
<property name="severity" value="warning"/> <property name="groups" value="com.google,android,junit,net,org,java,javax"/>
This ensures that static imports go first <property name="option" value="top"/>
<property name="tokens" value="STATIC_IMPORT, IMPORT"/> </module> -->
<!-- JAVADOC CHECKS -->
<module name="RedundantImport">
<!-- Checks for redundant import statements. -->
<property name="severity" value="error"/>
</module>
<!-- <module name="ImportOrder"> Checks for out of order import statements
<property name="severity" value="warning"/> <property name="groups" value="com.google,android,junit,net,org,java,javax"/>
This ensures that static imports go first <property name="option" value="top"/>
<property name="tokens" value="STATIC_IMPORT, IMPORT"/> </module> -->
<!-- JAVADOC CHECKS -->
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="scope" value="protected" />
<property name="severity" value="warning" />
<property name="allowMissingJavadoc" value="true" />
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
<property name="allowMissingThrowsTags" value="true" />
<property name="allowThrowsTagsForSubclasses" value="true" />
<property name="allowUndeclaredRTE" value="true" />
</module>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="severity" value="warning"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
<property name="allowUndeclaredRTE" value="true"/>
</module>
<module name="JavadocType">
<property name="scope" value="protected" />
<property name="severity" value="error" />
</module>
<module name="JavadocType">
<property name="scope" value="protected"/>
<property name="severity" value="error"/>
</module>
<module name="JavadocStyle">
<property name="severity" value="warning" />
</module>
<module name="JavadocStyle">
<property name="severity" value="warning"/>
</module>
<!-- NAMING CHECKS -->
<!-- NAMING CHECKS -->
<!-- Item 38 - Adhere to generally accepted naming conventions -->
<!-- Item 38 - Adhere to generally accepted naming conventions -->
<module name="PackageName">
<!-- Validates identifiers for package names against the supplied expression. -->
<!-- Here the default checkstyle rule restricts package name parts to
seven characters, this is not in line with common practice at Google. -->
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$" />
<property name="severity" value="warning" />
</module>
<module name="PackageName">
<!-- Validates identifiers for package names against the supplied expression. -->
<!-- Here the default checkstyle rule restricts package name parts to
seven characters, this is not in line with common practice at Google. -->
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
<property name="severity" value="warning"/>
</module>
<module name="TypeNameCheck">
<!-- Validates static, final fields against the expression "^[A-Z][a-zA-Z0-9]*$". -->
<metadata name="altname" value="TypeName" />
<property name="severity" value="warning" />
</module>
<module name="TypeNameCheck">
<!-- Validates static, final fields against the expression "^[A-Z][a-zA-Z0-9]*$". -->
<metadata name="altname" value="TypeName"/>
<property name="severity" value="warning"/>
</module>
<module name="ConstantNameCheck">
<!-- Validates non-private, static, final fields against the supplied
public/package final fields "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
<metadata name="altname" value="ConstantName" />
<property name="applyToPublic" value="true" />
<property name="applyToProtected" value="true" />
<property name="applyToPackage" value="true" />
<property name="applyToPrivate" value="false" />
<property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|FLAG_.*)$" />
<message key="name.invalidPattern"
value="Variable ''{0}'' should be in ALL_CAPS (if it is a constant) or be private (otherwise)." />
<property name="severity" value="warning" />
</module>
<module name="ConstantNameCheck">
<!-- Validates non-private, static, final fields against the supplied
public/package final fields "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
<metadata name="altname" value="ConstantName"/>
<property name="applyToPublic" value="true"/>
<property name="applyToProtected" value="true"/>
<property name="applyToPackage" value="true"/>
<property name="applyToPrivate" value="false"/>
<property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|FLAG_.*)$"/>
<message key="name.invalidPattern"
value="Variable ''{0}'' should be in ALL_CAPS (if it is a constant) or be private (otherwise)."/>
<property name="severity" value="warning"/>
</module>
<module name="StaticVariableNameCheck">
<!-- Validates static, non-final fields against the supplied expression
"^[a-z][a-zA-Z0-9]*_?$". -->
<metadata name="altname" value="StaticVariableName" />
<property name="applyToPublic" value="true" />
<property name="applyToProtected" value="true" />
<property name="applyToPackage" value="true" />
<property name="applyToPrivate" value="true" />
<property name="format" value="^[a-z][a-zA-Z0-9]*_?$" />
<property name="severity" value="warning" />
</module>
<module name="StaticVariableNameCheck">
<!-- Validates static, non-final fields against the supplied expression
"^[a-z][a-zA-Z0-9]*_?$". -->
<metadata name="altname" value="StaticVariableName"/>
<property name="applyToPublic" value="true"/>
<property name="applyToProtected" value="true"/>
<property name="applyToPackage" value="true"/>
<property name="applyToPrivate" value="true"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*_?$"/>
<property name="severity" value="warning"/>
</module>
<module name="MemberNameCheck">
<!-- Validates non-static members against the supplied expression. -->
<metadata name="altname" value="MemberName" />
<property name="applyToPublic" value="true" />
<property name="applyToProtected" value="true" />
<property name="applyToPackage" value="true" />
<property name="applyToPrivate" value="true" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
<property name="severity" value="warning" />
</module>
<module name="MemberNameCheck">
<!-- Validates non-static members against the supplied expression. -->
<metadata name="altname" value="MemberName"/>
<property name="applyToPublic" value="true"/>
<property name="applyToProtected" value="true"/>
<property name="applyToPackage" value="true"/>
<property name="applyToPrivate" value="true"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
<property name="severity" value="warning"/>
</module>
<module name="MethodNameCheck">
<!-- Validates identifiers for method names. -->
<metadata name="altname" value="MethodName" />
<property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$" />
<property name="severity" value="warning" />
</module>
<module name="MethodNameCheck">
<!-- Validates identifiers for method names. -->
<metadata name="altname" value="MethodName"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
<property name="severity" value="warning"/>
</module>
<module name="ParameterName">
<!-- Validates identifiers for method parameters against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning" />
</module>
<module name="ParameterName">
<!-- Validates identifiers for method parameters against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>
<module name="LocalFinalVariableName">
<!-- Validates identifiers for local final variables against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning" />
</module>
<module name="LocalFinalVariableName">
<!-- Validates identifiers for local final variables against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>
<module name="LocalVariableName">
<!-- Validates identifiers for local variables against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning" />
</module>
<module name="LocalVariableName">
<!-- Validates identifiers for local variables against the expression
"^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>
<!-- LENGTH and CODING CHECKS -->
<!-- LENGTH and CODING CHECKS -->
<module name="LineLength">
<!-- Checks if a line is too long. -->
<property name="max"
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}"
default="100" />
<property name="severity" value="error" />
<module name="LineLength">
<!-- Checks if a line is too long. -->
<property name="max"
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}"
default="100"/>
<property name="severity" value="error"/>
<!-- The default ignore pattern exempts the following elements: - import
statements - long URLs inside comments -->
<!-- The default ignore pattern exempts the following elements: - import
statements - long URLs inside comments -->
<property name="ignorePattern"
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$" />
</module>
<property name="ignorePattern"
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$"/>
</module>
<module name="LeftCurly">
<!-- Checks for placement of the left curly brace ('{'). -->
<property name="severity" value="warning" />
</module>
<module name="LeftCurly">
<!-- Checks for placement of the left curly brace ('{'). -->
<property name="severity" value="warning"/>
</module>
<module name="RightCurly">
<!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on the same
line. e.g., the following example is fine: <pre> if { ... } else </pre> -->
<!-- This next example is not fine: <pre> if { ... } else </pre> -->
<property name="option" value="same" />
<property name="severity" value="warning" />
</module>
<module name="RightCurly">
<!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on the same
line. e.g., the following example is fine: <pre> if { ... } else </pre> -->
<!-- This next example is not fine: <pre> if { ... } else </pre> -->
<property name="option" value="same"/>
<property name="severity" value="warning"/>
</module>
<!-- Checks for braces around if and else blocks -->
<module name="NeedBraces">
<property name="severity" value="warning" />
<property name="tokens"
value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO" />
</module>
<!-- Checks for braces around if and else blocks -->
<module name="NeedBraces">
<property name="severity" value="warning"/>
<property name="tokens"
value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
</module>
<module name="UpperEll">
<!-- Checks that long constants are defined with an upper ell. -->
<property name="severity" value="error" />
</module>
<module name="UpperEll">
<!-- Checks that long constants are defined with an upper ell. -->
<property name="severity" value="error"/>
</module>
<module name="FallThrough">
<!-- Warn about falling through to the next case statement. Similar to
javac -Xlint:fallthrough, but the check is suppressed if a single-line comment
on the last non-blank line preceding the fallen-into case contains 'fall
through' (or some other variants which we don't publicized to promote consistency). -->
<property name="reliefPattern"
value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on" />
<property name="severity" value="error" />
</module>
<module name="FallThrough">
<!-- Warn about falling through to the next case statement. Similar to
javac -Xlint:fallthrough, but the check is suppressed if a single-line comment
on the last non-blank line preceding the fallen-into case contains 'fall
through' (or some other variants which we don't publicized to promote consistency). -->
<property name="reliefPattern"
value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
<property name="severity" value="error"/>
</module>
<!-- MODIFIERS CHECKS -->
<!-- MODIFIERS CHECKS -->
<module name="ModifierOrder">
<!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
8.4.3. The prescribed order is: public, protected, private, abstract, static,
final, transient, volatile, synchronized, native, strictfp -->
</module>
<module name="ModifierOrder">
<!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
8.4.3. The prescribed order is: public, protected, private, abstract, static,
final, transient, volatile, synchronized, native, strictfp -->
</module>
<!-- WHITESPACE CHECKS -->
<!-- WHITESPACE CHECKS -->
<module name="WhitespaceAround">
<!-- Checks that various tokens are surrounded by whitespace. This includes
most binary operators and keywords followed by regular or curly braces. -->
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR,
<module name="WhitespaceAround">
<!-- Checks that various tokens are surrounded by whitespace. This includes
most binary operators and keywords followed by regular or curly braces. -->
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR,
BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN" />
<property name="severity" value="error" />
</module>
SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
<property name="severity" value="error"/>
</module>
<module name="WhitespaceAfter">
<!-- Checks that commas, semicolons and typecasts are followed by whitespace. -->
<property name="tokens" value="COMMA, SEMI, TYPECAST" />
</module>
<module name="WhitespaceAfter">
<!-- Checks that commas, semicolons and typecasts are followed by whitespace. -->
<property name="tokens" value="COMMA, SEMI, TYPECAST"/>
</module>
<module name="NoWhitespaceAfter">
<!-- Checks that there is no whitespace after various unary operators.
Linebreaks are allowed. -->
<property name="tokens"
value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
UNARY_PLUS" />
<property name="allowLineBreaks" value="true" />
<property name="severity" value="error" />
</module>
<module name="NoWhitespaceAfter">
<!-- Checks that there is no whitespace after various unary operators.
Linebreaks are allowed. -->
<property name="tokens"
value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
UNARY_PLUS"/>
<property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/>
</module>
<module name="NoWhitespaceBefore">
<!-- Checks that there is no whitespace before various unary operators.
Linebreaks are allowed. -->
<property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC" />
<property name="allowLineBreaks" value="true" />
<property name="severity" value="error" />
</module>
<module name="NoWhitespaceBefore">
<!-- Checks that there is no whitespace before various unary operators.
Linebreaks are allowed. -->
<property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
<property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/>
</module>
<module name="ParenPad">
<!-- Checks that there is no whitespace before close parens or after open
parens. -->
<property name="severity" value="warning" />
</module>
<module name="ParenPad">
<!-- Checks that there is no whitespace before close parens or after open
parens. -->
<property name="severity" value="warning"/>
</module>
<module name="Indentation">
<!-- Checks code indentation -->
<property name="basicOffset" value="2" />
</module>
</module>
<module name="Indentation">
<!-- Checks code indentation -->
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
</module>
</module>
</module>

View file

@ -23,9 +23,9 @@ import java.io.PrintStream;
import java.io.ByteArrayOutputStream;
import java.util.*;
import org.apache.zeppelin.completer.CompletionType;
import org.apache.zeppelin.interpreter.Interpreter;
import org.apache.zeppelin.interpreter.InterpreterContext;
import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
import org.apache.zeppelin.interpreter.InterpreterResult;
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
@ -166,7 +166,8 @@ public class AlluxioInterpreter extends Interpreter {
}
@Override
public List<InterpreterCompletion> completion(String buf, int cursor) {
public List<InterpreterCompletion> completion(String buf, int cursor,
InterpreterContext interpreterContext) {
String[] words = splitAndRemoveEmpty(splitAndRemoveEmpty(buf, "\n"), " ");
String lastWord = "";
if (words.length > 0) {
@ -176,7 +177,7 @@ public class AlluxioInterpreter extends Interpreter {
List<InterpreterCompletion> voices = new LinkedList<>();
for (String command : keywords) {
if (command.startsWith(lastWord)) {
voices.add(new InterpreterCompletion(command, command));
voices.add(new InterpreterCompletion(command, command, CompletionType.command.name()));
}
}
return voices;

View file

@ -8,13 +8,15 @@
"envName": "ALLUXIO_MASTER_HOSTNAME",
"propertyName": "alluxio.master.hostname",
"defaultValue": "localhost",
"description": "Alluxio master hostname"
"description": "Alluxio master hostname",
"type": "string"
},
"alluxio.master.port": {
"envName": "ALLUXIO_MASTER_PORT",
"propertyName": "alluxio.master.port",
"defaultValue": "19998",
"description": "Alluxio master port"
"description": "Alluxio master port",
"type": "number"
}
},
"editor": {

View file

@ -29,6 +29,8 @@ import java.util.Properties;
import alluxio.client.WriteType;
import alluxio.client.file.URIStatus;
import org.apache.zeppelin.completer.CompletionType;
import org.apache.zeppelin.interpreter.InterpreterResult;
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
@ -78,28 +80,28 @@ public class AlluxioInterpreterTest {
@Test
public void testCompletion() {
List expectedResultOne = Arrays.asList(
new InterpreterCompletion("cat", "cat"),
new InterpreterCompletion("chgrp", "chgrp"),
new InterpreterCompletion("chmod", "chmod"),
new InterpreterCompletion("chown", "chown"),
new InterpreterCompletion("copyFromLocal", "copyFromLocal"),
new InterpreterCompletion("copyToLocal", "copyToLocal"),
new InterpreterCompletion("count", "count"),
new InterpreterCompletion("createLineage", "createLineage"));
new InterpreterCompletion("cat", "cat", CompletionType.command.name()),
new InterpreterCompletion("chgrp", "chgrp", CompletionType.command.name()),
new InterpreterCompletion("chmod", "chmod", CompletionType.command.name()),
new InterpreterCompletion("chown", "chown", CompletionType.command.name()),
new InterpreterCompletion("copyFromLocal", "copyFromLocal", CompletionType.command.name()),
new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()),
new InterpreterCompletion("count", "count", CompletionType.command.name()),
new InterpreterCompletion("createLineage", "createLineage", CompletionType.command.name()));
List expectedResultTwo = Arrays.asList(
new InterpreterCompletion("copyFromLocal", "copyFromLocal"),
new InterpreterCompletion("copyToLocal", "copyToLocal"),
new InterpreterCompletion("count", "count"));
new InterpreterCompletion("copyFromLocal", "copyFromLocal", CompletionType.command.name()),
new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()),
new InterpreterCompletion("count", "count", CompletionType.command.name()));
List expectedResultThree = Arrays.asList(
new InterpreterCompletion("copyFromLocal", "copyFromLocal"),
new InterpreterCompletion("copyToLocal", "copyToLocal"));
new InterpreterCompletion("copyFromLocal", "copyFromLocal", CompletionType.command.name()),
new InterpreterCompletion("copyToLocal", "copyToLocal", CompletionType.command.name()));
List expectedResultNone = new ArrayList<>();
List<InterpreterCompletion> resultOne = alluxioInterpreter.completion("c", 0);
List<InterpreterCompletion> resultTwo = alluxioInterpreter.completion("co", 0);
List<InterpreterCompletion> resultThree = alluxioInterpreter.completion("copy", 0);
List<InterpreterCompletion> resultNotMatch = alluxioInterpreter.completion("notMatch", 0);
List<InterpreterCompletion> resultAll = alluxioInterpreter.completion("", 0);
List<InterpreterCompletion> resultOne = alluxioInterpreter.completion("c", 0, null);
List<InterpreterCompletion> resultTwo = alluxioInterpreter.completion("co", 0, null);
List<InterpreterCompletion> resultThree = alluxioInterpreter.completion("copy", 0, null);
List<InterpreterCompletion> resultNotMatch = alluxioInterpreter.completion("notMatch", 0, null);
List<InterpreterCompletion> resultAll = alluxioInterpreter.completion("", 0, null);
Assert.assertEquals(expectedResultOne, resultOne);
Assert.assertEquals(expectedResultTwo, resultTwo);

View file

@ -67,7 +67,8 @@ public class AngularInterpreter extends Interpreter {
}
@Override
public List<InterpreterCompletion> completion(String buf, int cursor) {
public List<InterpreterCompletion> completion(String buf, int cursor,
InterpreterContext interpreterContext) {
return new LinkedList<>();
}

View file

@ -92,7 +92,8 @@ public class BeamInterpreter extends Interpreter {
}
@Override
public List<InterpreterCompletion> completion(String buf, int cursor) {
public List<InterpreterCompletion> completion(String buf, int cursor,
InterpreterContext interpreterContext) {
return Collections.emptyList();
}

View file

@ -19,13 +19,15 @@
"envName": "ZEPPELIN_SCIO_ARGZ",
"propertyName": "zeppelin.scio.argz",
"defaultValue": "--runner=InProcessPipelineRunner",
"description": "Scio interpreter wide arguments"
"description": "Scio interpreter wide arguments",
"type": "textarea"
},
"zeppelin.scio.maxResult": {
"envName": "ZEPPELIN_SCIO_MAXRESULT",
"propertyName": "zeppelin.scio.maxResult",
"defaultValue": "1000",
"description": "Max number of SCollection results to display."
"description": "Max number of SCollection results to display.",
"type": "number"
}
},
"editor": {

View file

@ -99,7 +99,7 @@ import java.util.NoSuchElementException;
public class BigQueryInterpreter extends Interpreter {
private Logger logger = LoggerFactory.getLogger(BigQueryInterpreter.class);
private static Logger logger = LoggerFactory.getLogger(BigQueryInterpreter.class);
private static final char NEWLINE = '\n';
private static final char TAB = '\t';
private static Bigquery service = null;
@ -109,6 +109,7 @@ public class BigQueryInterpreter extends Interpreter {
static final String PROJECT_ID = "zeppelin.bigquery.project_id";
static final String WAIT_TIME = "zeppelin.bigquery.wait_time";
static final String MAX_ROWS = "zeppelin.bigquery.max_no_of_rows";
static final String LEGACY_SQL = "zeppelin.bigquery.use_legacy_sql";
private static String jobId = null;
private static String projectId = null;
@ -245,9 +246,11 @@ public class BigQueryInterpreter extends Interpreter {
String projId = getProperty(PROJECT_ID);
long wTime = Long.parseLong(getProperty(WAIT_TIME));
long maxRows = Long.parseLong(getProperty(MAX_ROWS));
String legacySql = getProperty(LEGACY_SQL);
boolean useLegacySql = legacySql == null ? true : Boolean.parseBoolean(legacySql);
Iterator<GetQueryResultsResponse> pages;
try {
pages = run(sql, projId, wTime, maxRows);
pages = run(sql, projId, wTime, maxRows, useLegacySql);
} catch ( IOException ex ) {
logger.error(ex.getMessage());
return new InterpreterResult(Code.ERROR, ex.getMessage());
@ -263,14 +266,19 @@ public class BigQueryInterpreter extends Interpreter {
}
//Function to run the SQL on bigQuery service
public static Iterator<GetQueryResultsResponse> run(final String queryString,
final String projId, final long wTime, final long maxRows)
public static Iterator<GetQueryResultsResponse> run(final String queryString,
final String projId, final long wTime, final long maxRows, boolean useLegacySql)
throws IOException {
try {
QueryResponse query = service.jobs().query(
projId,
new QueryRequest().setTimeoutMs(wTime).setQuery(queryString).setMaxResults(maxRows))
.execute();
logger.info("Use legacy sql: {}", useLegacySql);
QueryResponse query;
query = service
.jobs()
.query(
projId,
new QueryRequest().setTimeoutMs(wTime)
.setUseLegacySql(useLegacySql).setQuery(queryString)
.setMaxResults(maxRows)).execute();
jobId = query.getJobReference().getJobId();
projectId = query.getJobReference().getProjectId();
GetQueryResults getRequest = service.jobs().getQueryResults(
@ -332,7 +340,8 @@ public class BigQueryInterpreter extends Interpreter {
}
@Override
public List<InterpreterCompletion> completion(String buf, int cursor) {
public List<InterpreterCompletion> completion(String buf, int cursor,
InterpreterContext interpreterContext) {
return NO_COMPLETION;
}
}

View file

@ -8,19 +8,28 @@
"envName": null,
"propertyName": "zeppelin.bigquery.project_id",
"defaultValue": " ",
"description": "Google Project ID"
"description": "Google Project ID",
"type": "string"
},
"zeppelin.bigquery.wait_time": {
"envName": null,
"propertyName": "zeppelin.bigquery.wait_time",
"defaultValue": "5000",
"description": "Query timeout in Milliseconds"
"description": "Query timeout in Milliseconds",
"type": "number"
},
"zeppelin.bigquery.max_no_of_rows": {
"envName": null,
"propertyName": "zeppelin.bigquery.max_no_of_rows",
"defaultValue": "100000",
"description": "Maximum number of rows to fetch from BigQuery"
},
"zeppelin.bigquery.use_legacy_sql": {
"envName": null,
"propertyName": "zeppelin.bigquery.use_legacy_sql",
"defaultValue": "true",
"description": "set true to use legacy sql",
"type": "checkbox"
}
},
"editor": {

View file

@ -20,10 +20,10 @@ bin=$(dirname "${BASH_SOURCE-$0}")
bin=$(cd "${bin}">/dev/null; pwd)
function usage() {
echo "usage) $0 -p <port> -d <interpreter dir to load> -l <local interpreter repo dir to load>"
echo "usage) $0 -p <port> -d <interpreter dir to load> -l <local interpreter repo dir to load> -g <interpreter group name>"
}
while getopts "hp:d:l:v:u:" o; do
while getopts "hp:d:l:v:u:g:" o; do
case ${o} in
h)
usage
@ -50,6 +50,9 @@ while getopts "hp:d:l:v:u:" o; do
ZEPPELIN_IMPERSONATE_RUN_CMD=$(eval "echo ${ZEPPELIN_IMPERSONATE_CMD} ")
fi
;;
g)
INTERPRETER_GROUP_NAME=${OPTARG}
;;
esac
done
@ -61,7 +64,7 @@ fi
. "${bin}/common.sh"
ZEPPELIN_INTP_CLASSPATH=""
ZEPPELIN_INTP_CLASSPATH="${CLASSPATH}"
# construct classpath
if [[ -d "${ZEPPELIN_HOME}/zeppelin-interpreter/target/classes" ]]; then
@ -86,6 +89,9 @@ ZEPPELIN_SERVER=org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer
INTERPRETER_ID=$(basename "${INTERPRETER_DIR}")
ZEPPELIN_PID="${ZEPPELIN_PID_DIR}/zeppelin-interpreter-${INTERPRETER_ID}-${ZEPPELIN_IDENT_STRING}-${HOSTNAME}.pid"
ZEPPELIN_LOGFILE="${ZEPPELIN_LOG_DIR}/zeppelin-interpreter-"
if [[ ! -z "$INTERPRETER_GROUP_NAME" ]]; then
ZEPPELIN_LOGFILE+="${INTERPRETER_GROUP_NAME}-"
fi
if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" ]]; then
ZEPPELIN_LOGFILE+="${ZEPPELIN_IMPERSONATE_USER}-"
fi
@ -184,8 +190,6 @@ fi
addJarInDirForIntp "${LOCAL_INTERPRETER_REPO}"
CLASSPATH+=":${ZEPPELIN_INTP_CLASSPATH}"
if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" ]]; then
suid="$(id -u ${ZEPPELIN_IMPERSONATE_USER})"
if [[ -n "${suid}" || -z "${SPARK_SUBMIT}" ]]; then
@ -198,12 +202,12 @@ fi
if [[ -n "${SPARK_SUBMIT}" ]]; then
if [[ -n "$ZEPPELIN_IMPERSONATE_USER" ]] && [[ "$ZEPPELIN_IMPERSONATE_SPARK_PROXY_USER" != "false" ]]; then
INTERPRETER_RUN_COMMAND+=' '` echo ${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path \"${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${CLASSPATH}\" --driver-java-options \"${JAVA_INTP_OPTS}\" ${SPARK_SUBMIT_OPTIONS} --proxy-user ${ZEPPELIN_IMPERSONATE_USER} ${SPARK_APP_JAR} ${PORT}`
INTERPRETER_RUN_COMMAND+=' '` echo ${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path \"${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${ZEPPELIN_INTP_CLASSPATH}\" --driver-java-options \"${JAVA_INTP_OPTS}\" ${SPARK_SUBMIT_OPTIONS} ${ZEPPELIN_SPARK_CONF} --proxy-user ${ZEPPELIN_IMPERSONATE_USER} ${SPARK_APP_JAR} ${PORT}`
else
INTERPRETER_RUN_COMMAND+=' '` echo ${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path \"${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${CLASSPATH}\" --driver-java-options \"${JAVA_INTP_OPTS}\" ${SPARK_SUBMIT_OPTIONS} ${SPARK_APP_JAR} ${PORT}`
INTERPRETER_RUN_COMMAND+=' '` echo ${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path \"${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${ZEPPELIN_INTP_CLASSPATH}\" --driver-java-options \"${JAVA_INTP_OPTS}\" ${SPARK_SUBMIT_OPTIONS} ${ZEPPELIN_SPARK_CONF} ${SPARK_APP_JAR} ${PORT}`
fi
else
INTERPRETER_RUN_COMMAND+=' '` echo ${ZEPPELIN_RUNNER} ${JAVA_INTP_OPTS} ${ZEPPELIN_INTP_MEM} -cp ${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${CLASSPATH} ${ZEPPELIN_SERVER} ${PORT} `
INTERPRETER_RUN_COMMAND+=' '` echo ${ZEPPELIN_RUNNER} ${JAVA_INTP_OPTS} ${ZEPPELIN_INTP_MEM} -cp ${ZEPPELIN_INTP_CLASSPATH_OVERRIDES}:${ZEPPELIN_INTP_CLASSPATH} ${ZEPPELIN_SERVER} ${PORT} `
fi
if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" ]] && [[ -n "${suid}" || -z "${SPARK_SUBMIT}" ]]; then

View file

@ -71,7 +71,7 @@ addJarInDir "${ZEPPELIN_HOME}/zeppelin-zengine/target/lib"
addJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib"
addJarInDir "${ZEPPELIN_HOME}/zeppelin-web/target/lib"
CLASSPATH+=":${ZEPPELIN_CLASSPATH}"
ZEPPELIN_CLASSPATH="$CLASSPATH:$ZEPPELIN_CLASSPATH"
if [[ ! -d "${ZEPPELIN_LOG_DIR}" ]]; then
echo "Log dir doesn't exist, create ${ZEPPELIN_LOG_DIR}"
@ -83,4 +83,4 @@ if [[ ! -d "${ZEPPELIN_PID_DIR}" ]]; then
$(mkdir -p "${ZEPPELIN_PID_DIR}")
fi
exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_SERVER "$@"
exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:${ZEPPELIN_CLASSPATH} $ZEPPELIN_SERVER "$@"

View file

@ -17,11 +17,11 @@
package org.apache.zeppelin.cassandra;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.JdkSSLOptions;
import com.datastax.driver.core.ProtocolOptions.Compression;
import com.datastax.driver.core.Session;
import org.apache.zeppelin.interpreter.Interpreter;
import org.apache.zeppelin.interpreter.InterpreterContext;
import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
import org.apache.zeppelin.interpreter.InterpreterResult;
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
import org.apache.zeppelin.scheduler.Scheduler;
@ -29,11 +29,16 @@ import org.apache.zeppelin.scheduler.SchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyStore;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import static com.datastax.driver.core.ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS;
import static java.lang.Integer.parseInt;
/**
@ -43,8 +48,8 @@ public class CassandraInterpreter extends Interpreter {
private static final Logger LOGGER = LoggerFactory.getLogger(CassandraInterpreter.class);
public static final String CASSANDRA_INTERPRETER_PARALLELISM = "cassandra.interpreter" +
".parallelism";
public static final String CASSANDRA_INTERPRETER_PARALLELISM =
"cassandra.interpreter.parallelism";
public static final String CASSANDRA_HOSTS = "cassandra.hosts";
public static final String CASSANDRA_PORT = "cassandra.native.port";
public static final String CASSANDRA_PROTOCOL_VERSION = "cassandra.protocol.version";
@ -59,21 +64,21 @@ public class CassandraInterpreter extends Interpreter {
public static final String CASSANDRA_SPECULATIVE_EXECUTION_POLICY =
"cassandra.speculative.execution.policy";
public static final String CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS =
"cassandra.max.schema.agreement.wait.second";
"cassandra.max.schema.agreement.wait.second";
public static final String CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_LOCAL =
"cassandra.pooling.new.connection.threshold.local";
"cassandra.pooling.new.connection.threshold.local";
public static final String CASSANDRA_POOLING_NEW_CONNECTION_THRESHOLD_REMOTE =
"cassandra.pooling.new.connection.threshold.remote";
"cassandra.pooling.new.connection.threshold.remote";
public static final String CASSANDRA_POOLING_MAX_CONNECTION_PER_HOST_LOCAL =
"cassandra.pooling.max.connection.per.host.local";
"cassandra.pooling.max.connection.per.host.local";
public static final String CASSANDRA_POOLING_MAX_CONNECTION_PER_HOST_REMOTE =
"cassandra.pooling.max.connection.per.host.remote";
"cassandra.pooling.max.connection.per.host.remote";
public static final String CASSANDRA_POOLING_CORE_CONNECTION_PER_HOST_LOCAL =
"cassandra.pooling.core.connection.per.host.local";
public static final String CASSANDRA_POOLING_CORE_CONNECTION_PER_HOST_REMOTE =
"cassandra.pooling.core.connection.per.host.remote";
public static final String CASSANDRA_POOLING_MAX_REQUESTS_PER_CONNECTION_LOCAL =
"cassandra.pooling.max.request.per.connection.local";
"cassandra.pooling.max.request.per.connection.local";
public static final String CASSANDRA_POOLING_MAX_REQUESTS_PER_CONNECTION_REMOTE =
"cassandra.pooling.max.request.per.connection.remote";
public static final String CASSANDRA_POOLING_IDLE_TIMEOUT_SECONDS =
@ -106,6 +111,13 @@ public class CassandraInterpreter extends Interpreter {
"cassandra.socket.soLinger";
public static final String CASSANDRA_SOCKET_TCP_NO_DELAY =
"cassandra.socket.tcp.no_delay";
public static final String CASSANDRA_WITH_SSL =
"cassandra.ssl.enabled";
public static final String CASSANDRA_TRUSTSTORE_PATH =
"cassandra.ssl.truststore.path";
public static final String CASSANDRA_TRUSTSTORE_PASSWORD =
"cassandra.ssl.truststore.password";
public static final String DEFAULT_HOST = "localhost";
public static final String DEFAULT_PORT = "9042";
@ -143,6 +155,7 @@ public class CassandraInterpreter extends Interpreter {
public static final List NO_COMPLETION = new ArrayList<>();
InterpreterLogic helper;
Cluster.Builder clusterBuilder;
Cluster cluster;
Session session;
private JavaDriverConfig driverConfig = new JavaDriverConfig();
@ -162,29 +175,58 @@ public class CassandraInterpreter extends Interpreter {
}
LOGGER.info("Bootstrapping Cassandra Java Driver to connect to " + hosts.toString() +
"on port " + port);
"on port " + port);
Compression compression = driverConfig.getCompressionProtocol(this);
cluster = Cluster.builder()
.addContactPoints(addresses)
.withPort(port)
.withProtocolVersion(driverConfig.getProtocolVersion(this))
.withClusterName(getProperty(CASSANDRA_CLUSTER_NAME))
.withCompression(compression)
.withCredentials(getProperty(CASSANDRA_CREDENTIALS_USERNAME),
getProperty(CASSANDRA_CREDENTIALS_PASSWORD))
.withLoadBalancingPolicy(driverConfig.getLoadBalancingPolicy(this))
.withRetryPolicy(driverConfig.getRetryPolicy(this))
.withReconnectionPolicy(driverConfig.getReconnectionPolicy(this))
.withSpeculativeExecutionPolicy(driverConfig.getSpeculativeExecutionPolicy(this))
.withMaxSchemaAgreementWaitSeconds(
parseInt(getProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS)))
.withPoolingOptions(driverConfig.getPoolingOptions(this))
.withQueryOptions(driverConfig.getQueryOptions(this))
.withSocketOptions(driverConfig.getSocketOptions(this))
.build();
clusterBuilder = Cluster.builder()
.addContactPoints(addresses)
.withPort(port)
.withProtocolVersion(driverConfig.getProtocolVersion(this))
.withClusterName(getProperty(CASSANDRA_CLUSTER_NAME))
.withCompression(compression)
.withCredentials(getProperty(CASSANDRA_CREDENTIALS_USERNAME),
getProperty(CASSANDRA_CREDENTIALS_PASSWORD))
.withLoadBalancingPolicy(driverConfig.getLoadBalancingPolicy(this))
.withRetryPolicy(driverConfig.getRetryPolicy(this))
.withReconnectionPolicy(driverConfig.getReconnectionPolicy(this))
.withSpeculativeExecutionPolicy(driverConfig.getSpeculativeExecutionPolicy(this))
.withMaxSchemaAgreementWaitSeconds(
parseInt(getProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS)))
.withPoolingOptions(driverConfig.getPoolingOptions(this))
.withQueryOptions(driverConfig.getQueryOptions(this))
.withSocketOptions(driverConfig.getSocketOptions(this));
final String runWithSSL = getProperty(CASSANDRA_WITH_SSL);
if (runWithSSL != null && runWithSSL.equals("true")) {
LOGGER.debug("Cassandra Interpreter: Using SSL");
try {
final SSLContext sslContext;
{
final KeyStore trustStore = KeyStore.getInstance("JKS");
final InputStream stream = Files.newInputStream(Paths.get(
getProperty(CASSANDRA_TRUSTSTORE_PATH)));
trustStore.load(stream, getProperty(CASSANDRA_TRUSTSTORE_PASSWORD).toCharArray());
final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(trustStore);
sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
}
clusterBuilder = clusterBuilder.withSSL(JdkSSLOptions.builder()
.withSSLContext(sslContext)
.build());
} catch (Exception e) {
LOGGER.error(e.toString());
}
} else {
LOGGER.debug("Cassandra Interpreter: Not using SSL");
}
cluster = clusterBuilder.build();
session = cluster.connect();
helper = new InterpreterLogic(session);
}
@ -216,7 +258,8 @@ public class CassandraInterpreter extends Interpreter {
}
@Override
public List<InterpreterCompletion> completion(String buf, int cursor) {
public List<InterpreterCompletion> completion(String buf, int cursor,
InterpreterContext interpreterContext) {
return NO_COMPLETION;
}

View file

@ -8,187 +8,239 @@
"envName": null,
"propertyName": "cassandra.hosts",
"defaultValue": "localhost",
"description": "Comma separated Cassandra hosts (DNS name or IP address). Default = localhost. Ex: '192.168.0.12,node2,node3'"
"description": "Comma separated Cassandra hosts (DNS name or IP address). Default = localhost. Ex: '192.168.0.12,node2,node3'",
"type": "textarea"
},
"cassandra.native.port": {
"envName": null,
"propertyName": "cassandra.native.port",
"defaultValue": "9042",
"description": "Cassandra native port. Default = 9042"
"description": "Cassandra native port. Default = 9042",
"type": "number"
},
"cassandra.protocol.version": {
"envName": null,
"propertyName": "cassandra.protocol.version",
"defaultValue": "4",
"description": "Cassandra protocol version. Default = 4"
"description": "Cassandra protocol version. Default = 4",
"type": "string"
},
"cassandra.cluster": {
"envName": null,
"propertyName": "cassandra.cluster",
"defaultValue": "Test Cluster",
"description": "Cassandra cluster name. Default = 'Test Cluster'"
"description": "Cassandra cluster name. Default = 'Test Cluster'",
"type": "string"
},
"cassandra.keyspace": {
"envName": null,
"propertyName": "cassandra.keyspace",
"defaultValue": "system",
"description": "Cassandra keyspace name. Default = 'system'"
"description": "Cassandra keyspace name. Default = 'system'",
"type": "string"
},
"cassandra.compression.protocol": {
"envName": null,
"propertyName": "cassandra.compression.protocol",
"defaultValue": "NONE",
"description": "Cassandra compression protocol. Available values: NONE, SNAPPY, LZ4. Default = NONE"
"description": "Cassandra compression protocol. Available values: NONE, SNAPPY, LZ4. Default = NONE",
"type": "string"
},
"cassandra.credentials.username": {
"envName": null,
"propertyName": "cassandra.credentials.username",
"defaultValue": "none",
"description": "Cassandra credentials username. Default = 'none'"
"description": "Cassandra credentials username. Default = 'none'",
"type": "string"
},
"cassandra.credentials.password": {
"envName": null,
"propertyName": "cassandra.credentials.password",
"defaultValue": "none",
"description": "Cassandra credentials password. Default = 'none'"
"description": "Cassandra credentials password. Default = 'none'",
"type": "password"
},
"cassandra.load.balancing.policy": {
"envName": null,
"propertyName": "cassandra.load.balancing.policy",
"defaultValue": "DEFAULT",
"description": "Cassandra Load Balancing Policy. Default = new TokenAwarePolicy(new DCAwareRoundRobinPolicy())"
"description": "Cassandra Load Balancing Policy. Default = new TokenAwarePolicy(new DCAwareRoundRobinPolicy())",
"type": "string"
},
"cassandra.retry.policy": {
"envName": null,
"propertyName": "cassandra.retry.policy",
"defaultValue": "DEFAULT",
"description": "Cassandra Retry Policy. Default = DefaultRetryPolicy.INSTANCE"
"description": "Cassandra Retry Policy. Default = DefaultRetryPolicy.INSTANCE",
"type": "string"
},
"cassandra.reconnection.policy": {
"envName": null,
"propertyName": "cassandra.reconnection.policy",
"defaultValue": "DEFAULT",
"description": "Cassandra Reconnection Policy. Default = new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000)"
"description": "Cassandra Reconnection Policy. Default = new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000)",
"type": "string"
},
"cassandra.speculative.execution.policy": {
"envName": null,
"propertyName": "cassandra.speculative.execution.policy",
"defaultValue": "DEFAULT",
"description": "Cassandra Speculative Execution Policy. Default = NoSpeculativeExecutionPolicy.INSTANCE"
"description": "Cassandra Speculative Execution Policy. Default = NoSpeculativeExecutionPolicy.INSTANCE",
"type": "string"
},
"cassandra.interpreter.parallelism": {
"envName": null,
"propertyName": "cassandra.interpreter.parallelism",
"defaultValue": "10",
"description": "Cassandra interpreter parallelism.Default = 10"
"description": "Cassandra interpreter parallelism.Default = 10",
"type": "number"
},
"cassandra.max.schema.agreement.wait.second": {
"envName": null,
"propertyName": "cassandra.max.schema.agreement.wait.second",
"defaultValue": "10",
"description": "Cassandra max schema agreement wait in second.Default = ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS"
"description": "Cassandra max schema agreement wait in second.Default = ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS",
"type": "number"
},
"cassandra.pooling.new.connection.threshold.local": {
"envName": null,
"propertyName": "cassandra.pooling.new.connection.threshold.local",
"defaultValue": "100",
"description": "Cassandra new connection threshold local. Protocol V2 and below default = 100 Protocol V3 and above default = 800"
"description": "Cassandra new connection threshold local. Protocol V2 and below default = 100 Protocol V3 and above default = 800",
"type": "number"
},
"cassandra.pooling.new.connection.threshold.remote": {
"envName": null,
"propertyName": "cassandra.pooling.new.connection.threshold.remote",
"defaultValue": "100",
"description": "Cassandra new connection threshold remove. Protocol V2 and below default = 100 Protocol V3 and above default = 200"
"description": "Cassandra new connection threshold remove. Protocol V2 and below default = 100 Protocol V3 and above default = 200",
"type": "number"
},
"cassandra.pooling.core.connection.per.host.local": {
"envName": null,
"propertyName": "cassandra.pooling.core.connection.per.host.local",
"defaultValue": "2",
"description": "Cassandra core connection per host local. Protocol V2 and below default = 2 Protocol V3 and above default = 1"
"description": "Cassandra core connection per host local. Protocol V2 and below default = 2 Protocol V3 and above default = 1",
"type": "number"
},
"cassandra.pooling.core.connection.per.host.remote": {
"envName": null,
"propertyName": "cassandra.pooling.core.connection.per.host.remote",
"defaultValue": "1",
"description": "Cassandra core connection per host remove. Protocol V2 and below default = 1 Protocol V3 and above default = 1"
"description": "Cassandra core connection per host remove. Protocol V2 and below default = 1 Protocol V3 and above default = 1",
"type": "number"
},
"cassandra.pooling.max.connection.per.host.local": {
"envName": null,
"propertyName": "cassandra.pooling.max.connection.per.host.local",
"defaultValue": "8",
"description": "Cassandra max connection per host local. Protocol V2 and below default = 8 Protocol V3 and above default = 1"
"description": "Cassandra max connection per host local. Protocol V2 and below default = 8 Protocol V3 and above default = 1",
"type": "number"
},
"cassandra.pooling.max.connection.per.host.remote": {
"envName": null,
"propertyName": "cassandra.pooling.max.connection.per.host.remote",
"defaultValue": "2",
"description": "Cassandra max connection per host remote. Protocol V2 and below default = 2 Protocol V3 and above default = 1"
"description": "Cassandra max connection per host remote. Protocol V2 and below default = 2 Protocol V3 and above default = 1",
"type": "number"
},
"cassandra.pooling.max.request.per.connection.local": {
"envName": null,
"propertyName": "cassandra.pooling.max.request.per.connection.local",
"defaultValue": "1024",
"description": "Cassandra max request per connection local. Protocol V2 and below default = 128 Protocol V3 and above default = 1024"
"description": "Cassandra max request per connection local. Protocol V2 and below default = 128 Protocol V3 and above default = 1024",
"type": "number"
},
"cassandra.pooling.max.request.per.connection.remote": {
"envName": null,
"propertyName": "cassandra.pooling.max.request.per.connection.remote",
"defaultValue": "256",
"description": "Cassandra max request per connection remote. Protocol V2 and below default = 128 Protocol V3 and above default = 256"
"description": "Cassandra max request per connection remote. Protocol V2 and below default = 128 Protocol V3 and above default = 256",
"type": "number"
},
"cassandra.pooling.idle.timeout.seconds": {
"envName": null,
"propertyName": "cassandra.pooling.idle.timeout.seconds",
"defaultValue": "120",
"description": "Cassandra idle time out in seconds. Default = 120"
"description": "Cassandra idle time out in seconds. Default = 120",
"type": "number"
},
"cassandra.pooling.pool.timeout.millisecs": {
"envName": null,
"propertyName": "cassandra.pooling.pool.timeout.millisecs",
"defaultValue": "5000",
"description": "Cassandra pool time out in millisecs. Default = 5000"
"description": "Cassandra pool time out in millisecs. Default = 5000",
"type": "number"
},
"cassandra.pooling.heartbeat.interval.seconds": {
"envName": null,
"propertyName": "cassandra.pooling.heartbeat.interval.seconds",
"defaultValue": "30",
"description": "Cassandra pool heartbeat interval in secs. Default = 30"
"description": "Cassandra pool heartbeat interval in secs. Default = 30",
"type": "number"
},
"cassandra.query.default.consistency": {
"envName": null,
"propertyName": "cassandra.query.default.consistency",
"defaultValue": "ONE",
"description": "Cassandra query default consistency level. Default = ONE"
"description": "Cassandra query default consistency level. Default = ONE",
"type": "string"
},
"cassandra.query.default.serial.consistency": {
"envName": null,
"propertyName": "cassandra.query.default.serial.consistency",
"defaultValue": "SERIAL",
"description": "Cassandra query default serial consistency level. Default = SERIAL"
"description": "Cassandra query default serial consistency level. Default = SERIAL",
"type": "string"
},
"cassandra.query.default.fetchSize": {
"envName": null,
"propertyName": "cassandra.query.default.fetchSize",
"defaultValue": "5000",
"description": "Cassandra query default fetch size. Default = 5000"
"description": "Cassandra query default fetch size. Default = 5000",
"type": "number"
},
"cassandra.socket.connection.timeout.millisecs": {
"envName": null,
"propertyName": "cassandra.socket.connection.timeout.millisecs",
"defaultValue": "5000",
"description": "Cassandra socket default connection timeout in millisecs. Default = 5000"
"description": "Cassandra socket default connection timeout in millisecs. Default = 5000",
"type": "number"
},
"cassandra.socket.read.timeout.millisecs": {
"envName": null,
"propertyName": "cassandra.socket.read.timeout.millisecs",
"defaultValue": "12000",
"description": "Cassandra socket read timeout in millisecs. Default = 12000"
"description": "Cassandra socket read timeout in millisecs. Default = 12000",
"type": "number"
},
"cassandra.socket.tcp.no_delay": {
"envName": null,
"propertyName": "cassandra.socket.tcp.no_delay",
"defaultValue": "true",
"description": "Cassandra socket TCP no delay. Default = true"
"defaultValue": true,
"description": "Cassandra socket TCP no delay. Default = true",
"type": "checkbox"
},
"cassandra.ssl.enabled": {
"envName": null,
"propertyName": "cassandra.ssl.enabled",
"defaultValue": "false",
"description": "Cassandra SSL",
"type": "checkbox"
},
"cassandra.ssl.truststore.path": {
"envName": null,
"propertyName": "cassandra.ssl.truststore.path",
"defaultValue": "none",
"description": "Cassandra truststore path. Default = none",
"type": "string"
},
"cassandra.ssl.truststore.password": {
"envName": null,
"propertyName": "cassandra.ssl.truststore.password",
"defaultValue": "none",
"description": "Cassandra truststore password. Default = none",
"type": "password"
}
},
"editor": {

View file

@ -30,7 +30,7 @@ import com.datastax.driver.core.exceptions.DriverException
import com.datastax.driver.core.policies.{LoggingRetryPolicy, FallthroughRetryPolicy, DowngradingConsistencyRetryPolicy, Policies}
import org.apache.zeppelin.cassandra.TextBlockHierarchy._
import org.apache.zeppelin.display.AngularObjectRegistry
import org.apache.zeppelin.display.Input.ParamOption
import org.apache.zeppelin.display.ui.OptionInput.ParamOption
import org.apache.zeppelin.interpreter.InterpreterResult.Code
import org.apache.zeppelin.interpreter.{InterpreterException, InterpreterResult, InterpreterContext}
import org.slf4j.LoggerFactory

View file

@ -34,7 +34,7 @@ import com.datastax.driver.core.Statement;
import org.apache.zeppelin.display.AngularObjectRegistry;
import org.apache.zeppelin.display.GUI;
import org.apache.zeppelin.display.Input.ParamOption;
import org.apache.zeppelin.display.ui.OptionInput.ParamOption;
import org.apache.zeppelin.interpreter.InterpreterContext;
import org.apache.zeppelin.interpreter.InterpreterException;
import org.junit.Rule;

View file

@ -18,7 +18,8 @@
[users]
# List of users with their password allowed to access Zeppelin.
# To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html#Configuration-INISections
admin = password1, admin
# To enable admin user, uncomment the following line and set an appropriate password.
#admin = password1, admin
user1 = password2, role1, role2
user2 = password3, role3
user3 = password4, role2
@ -43,7 +44,7 @@ user3 = password4, role2
#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
#ldapRealm.contextFactory.authenticationMechanism = simple
### A sample PAM configuration
#pamRealm=org.apache.zeppelin.realm.PamRealm
@ -73,14 +74,22 @@ role3 = *
admin = *
[urls]
# This section is used for url-based security.
# You can secure interpreter, configuration and credential information by urls. Comment or uncomment the below urls that you want to hide.
# This section is used for url-based security. For details see the shiro.ini documentation.
#
# You can secure interpreter, configuration and credential information by urls.
# Comment or uncomment the below urls that you want to hide:
# anon means the access is anonymous.
# authc means Form based Auth Security
# To enfore security, comment the line below and uncomment the next one
# authc means form based auth Security.
#
# IMPORTANT: Order matters: URL path expressions are evaluated against an incoming request
# in the order they are defined and the FIRST MATCH WINS.
#
# To allow anonymous access to all but the stated urls,
# uncomment the line second last line (/** = anon) and comment the last line (/** = authc)
#
/api/version = anon
#/api/interpreter/** = authc, roles[admin]
#/api/configurations/** = authc, roles[admin]
#/api/credential/** = authc, roles[admin]
/api/interpreter/** = authc, roles[admin]
/api/configurations/** = authc, roles[admin]
/api/credential/** = authc, roles[admin]
#/** = anon
/** = authc

View file

@ -38,6 +38,10 @@ REM set ZEPPELIN_NOTEBOOK_S3_SSE REM Server-side encryption enable
REM set ZEPPELIN_IDENT_STRING REM A string representing this instance of zeppelin. $USER by default.
REM set ZEPPELIN_NICENESS REM The scheduling priority for daemons. Defaults to 0.
REM set ZEPPELIN_INTERPRETER_LOCALREPO REM Local repository for interpreter's additional dependency loading
REM set ZEPPELIN_INTERPRETER_DEP_MVNREPO REM Maven principal repository for interpreter's additional dependency loading
REM set ZEPPELIN_HELIUM_NODE_INSTALLER_URL REM Remote Node installer url for Helium dependency loader
REM set ZEPPELIN_HELIUM_NPM_INSTALLER_URL REM Remote Npm installer url for Helium dependency loader
REM set ZEPPELIN_HELIUM_YARNPKG_INSTALLER_URL REM Remote Yarn package installer url for Helium dependency loader
REM set ZEPPELIN_NOTEBOOK_STORAGE REM Refers to pluggable notebook storage class, can have two classes simultaneously with a sync between them (e.g. local and remote).
REM set ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC REM If there are multiple notebook storages, should we treat the first one as the only source of truth?

View file

@ -36,15 +36,28 @@
# export ZEPPELIN_NOTEBOOK_S3_KMS_KEY_ID # AWS KMS key ID
# export ZEPPELIN_NOTEBOOK_S3_KMS_KEY_REGION # AWS KMS key region
# export ZEPPELIN_NOTEBOOK_S3_SSE # Server-side encryption enabled for notebooks
# export ZEPPELIN_NOTEBOOK_MONGO_URI # MongoDB connection URI used to connect to a MongoDB database server. Default "mongodb://localhost"
# export ZEPPELIN_NOTEBOOK_MONGO_DATABASE # Database name to store notebook. Default "zeppelin"
# export ZEPPELIN_NOTEBOOK_MONGO_COLLECTION # Collection name to store notebook. Default "notes"
# export ZEPPELIN_NOTEBOOK_MONGO_AUTOIMPORT # If "true" import local notes under ZEPPELIN_NOTEBOOK_DIR on startup. Default "false"
# export ZEPPELIN_IDENT_STRING # A string representing this instance of zeppelin. $USER by default.
# export ZEPPELIN_NICENESS # The scheduling priority for daemons. Defaults to 0.
# export ZEPPELIN_INTERPRETER_LOCALREPO # Local repository for interpreter's additional dependency loading
# export ZEPPELIN_INTERPRETER_DEP_MVNREPO # Remote principal repository for interpreter's additional dependency loading
# export ZEPPELIN_HELIUM_NODE_INSTALLER_URL # Remote Node installer url for Helium dependency loader
# export ZEPPELIN_HELIUM_NPM_INSTALLER_URL # Remote Npm installer url for Helium dependency loader
# export ZEPPELIN_HELIUM_YARNPKG_INSTALLER_URL # Remote Yarn package installer url for Helium dependency loader
# export ZEPPELIN_NOTEBOOK_STORAGE # Refers to pluggable notebook storage class, can have two classes simultaneously with a sync between them (e.g. local and remote).
# export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC # If there are multiple notebook storages, should we treat the first one as the only source of truth?
# export ZEPPELIN_NOTEBOOK_PUBLIC # Make notebook public by default when created, private otherwise
#### Spark interpreter configuration ####
## Kerberos ticket refresh setting
##
#export KINIT_FAIL_THRESHOLD # (optional) How many times should kinit retry. The default value is 5.
#export KERBEROS_REFRESH_INTERVAL # (optional) The refresh interval for Kerberos ticket. The default value is 1d.
## Use provided spark installation ##
## defining SPARK_HOME makes Zeppelin run spark interpreter process using spark-submit
##

View file

@ -182,6 +182,39 @@
</property>
-->
<!-- MongoDB notebook storage -->
<!--
<property>
<name>zeppelin.notebook.storage</name>
<value>org.apache.zeppelin.notebook.repo.MongoNotebookRepo</value>
<description>notebook persistence layer implementation</description>
</property>
<property>
<name>zeppelin.notebook.mongo.uri</name>
<value>mongodb://localhost</value>
<description>MongoDB connection URI used to connect to a MongoDB database server</description>
</property>
<property>
<name>zeppelin.notebook.mongo.database</name>
<value>zeppelin</value>
<description>database name for notebook storage</description>
</property>
<property>
<name>zeppelin.notebook.mongo.collection</name>
<value>notes</value>
<description>collection name for notebook storage</description>
</property>
<property>
<name>zeppelin.notebook.mongo.autoimport</name>
<value>false</value>
<description>import local notes into MongoDB automatically on startup</description>
</property>
-->
<property>
<name>zeppelin.notebook.storage</name>
<value>org.apache.zeppelin.notebook.repo.GitNotebookRepo</value>
@ -206,15 +239,45 @@
<description>Local repository for interpreter's additional dependency loading</description>
</property>
<property>
<name>zeppelin.interpreter.dep.mvnRepo</name>
<value>http://repo1.maven.org/maven2/</value>
<description>Remote principal repository for interpreter's additional dependency loading</description>
</property>
<property>
<name>zeppelin.dep.localrepo</name>
<value>local-repo</value>
<description>Local repository for dependency loader</description>
</property>
<property>
<name>zeppelin.helium.node.installer.url</name>
<value>https://nodejs.org/dist/</value>
<description>Remote Node installer url for Helium dependency loader</description>
</property>
<property>
<name>zeppelin.helium.npm.installer.url</name>
<value>http://registry.npmjs.org/</value>
<description>Remote Npm installer url for Helium dependency loader</description>
</property>
<property>
<name>zeppelin.helium.yarnpkg.installer.url</name>
<value>https://github.com/yarnpkg/yarn/releases/download/</value>
<description>Remote Yarn package installer url for Helium dependency loader</description>
</property>
<property>
<name>zeppelin.interpreters</name>
<value>org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.rinterpreter.RRepl,org.apache.zeppelin.rinterpreter.KnitR,org.apache.zeppelin.spark.SparkRInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.file.HDFSFileInterpreter,org.apache.zeppelin.flink.FlinkInterpreter,,org.apache.zeppelin.python.PythonInterpreter,org.apache.zeppelin.python.PythonInterpreterPandasSql,org.apache.zeppelin.python.PythonCondaInterpreter,org.apache.zeppelin.python.PythonDockerInterpreter,org.apache.zeppelin.lens.LensInterpreter,org.apache.zeppelin.ignite.IgniteInterpreter,org.apache.zeppelin.ignite.IgniteSqlInterpreter,org.apache.zeppelin.cassandra.CassandraInterpreter,org.apache.zeppelin.geode.GeodeOqlInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.kylin.KylinInterpreter,org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter,org.apache.zeppelin.scalding.ScaldingInterpreter,org.apache.zeppelin.alluxio.AlluxioInterpreter,org.apache.zeppelin.hbase.HbaseInterpreter,org.apache.zeppelin.livy.LivySparkInterpreter,org.apache.zeppelin.livy.LivyPySparkInterpreter,org.apache.zeppelin.livy.LivyPySpark3Interpreter,org.apache.zeppelin.livy.LivySparkRInterpreter,org.apache.zeppelin.livy.LivySparkSQLInterpreter,org.apache.zeppelin.bigquery.BigQueryInterpreter,org.apache.zeppelin.beam.BeamInterpreter,org.apache.zeppelin.pig.PigInterpreter,org.apache.zeppelin.pig.PigQueryInterpreter,org.apache.zeppelin.scio.ScioInterpreter</value>
<value>org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.rinterpreter.RRepl,org.apache.zeppelin.rinterpreter.KnitR,org.apache.zeppelin.spark.SparkRInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.file.HDFSFileInterpreter,org.apache.zeppelin.flink.FlinkInterpreter,,org.apache.zeppelin.python.PythonInterpreter,org.apache.zeppelin.python.PythonInterpreterPandasSql,org.apache.zeppelin.python.PythonCondaInterpreter,org.apache.zeppelin.python.PythonDockerInterpreter,org.apache.zeppelin.lens.LensInterpreter,org.apache.zeppelin.ignite.IgniteInterpreter,org.apache.zeppelin.ignite.IgniteSqlInterpreter,org.apache.zeppelin.cassandra.CassandraInterpreter,org.apache.zeppelin.geode.GeodeOqlInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.kylin.KylinInterpreter,org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter,org.apache.zeppelin.scalding.ScaldingInterpreter,org.apache.zeppelin.alluxio.AlluxioInterpreter,org.apache.zeppelin.hbase.HbaseInterpreter,org.apache.zeppelin.livy.LivySparkInterpreter,org.apache.zeppelin.livy.LivyPySparkInterpreter,org.apache.zeppelin.livy.LivyPySpark3Interpreter,org.apache.zeppelin.livy.LivySparkRInterpreter,org.apache.zeppelin.livy.LivySparkSQLInterpreter,org.apache.zeppelin.bigquery.BigQueryInterpreter,org.apache.zeppelin.beam.BeamInterpreter,org.apache.zeppelin.pig.PigInterpreter,org.apache.zeppelin.pig.PigQueryInterpreter,org.apache.zeppelin.scio.ScioInterpreter,org.apache.zeppelin.groovy.GroovyInterpreter</value>
<description>Comma separated interpreter configurations. First interpreter become a default</description>
</property>
<property>
<name>zeppelin.interpreter.group.order</name>
<value>spark,md,angular,sh,livy,alluxio,file,psql,flink,python,ignite,lens,cassandra,geode,kylin,elasticsearch,scalding,jdbc,hbase,bigquery,beam</value>
<value>spark,md,angular,sh,livy,alluxio,file,psql,flink,python,ignite,lens,cassandra,geode,kylin,elasticsearch,scalding,jdbc,hbase,bigquery,beam,groovy</value>
<description></description>
</property>
@ -318,4 +381,33 @@
<description>Enable directory listings on server.</description>
</property>
<!--
<property>
<name>zeppelin.server.jetty.name</name>
<value>Jetty(7.6.0.v20120127)</value>
<description>Hardcoding Application Server name to Prevent Fingerprinting</description>
</property>
-->
<!--
<property>
<name>zeppelin.server.xframe.options</name>
<value>SAMEORIGIN</value>
<description>The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a frame/iframe/object.</description>
</property>
-->
<!--
<property>
<name>zeppelin.server.strict.transport</name>
<value>max-age=631138519</value>
<description>The HTTP Strict-Transport-Security response header is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. Enable this when Zeppelin is running on HTTPS. Value is in Seconds, the default value is equivalent to 20 years.</description>
</property>
-->
<!--
<property>
<name>zeppelin.server.xxss.protection</name>
<value>1</value>
<description>The HTTP X-XSS-Protection response header is a feature of Internet Explorer, Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. When value is set to 1 and a cross-site scripting attack is detected, the browser will sanitize the page (remove the unsafe parts).</description>
</property>
-->
</configuration>

View file

@ -34,7 +34,7 @@ if [[ ($# -ne 1) || ( $1 == "--help") || $1 == "-h" ]]; then
usage
fi
TO_VERSION=$1
TO_VERSION="$1"
check_scala_version() {
for i in ${VALID_VERSIONS[*]}; do [ $i = "$1" ] && return 0; done
@ -42,12 +42,14 @@ check_scala_version() {
exit 1
}
check_scala_version "$TO_VERSION"
check_scala_version "${TO_VERSION}"
if [ $TO_VERSION = "2.11" ]; then
if [ "${TO_VERSION}" = "2.11" ]; then
FROM_VERSION="2.10"
SCALA_LIB_VERSION="2.11.7"
else
FROM_VERSION="2.11"
SCALA_LIB_VERSION="2.10.5"
fi
sed_i() {
@ -57,11 +59,17 @@ sed_i() {
export -f sed_i
BASEDIR=$(dirname $0)/..
find "$BASEDIR" -name 'pom.xml' -not -path '*target*' -print \
-exec bash -c "sed_i 's/\(artifactId.*\)_'$FROM_VERSION'/\1_'$TO_VERSION'/g' {}" \;
find "${BASEDIR}" -name 'pom.xml' -not -path '*target*' -print \
-exec bash -c "sed_i 's/\(artifactId.*\)_'${FROM_VERSION}'/\1_'${TO_VERSION}'/g' {}" \;
# Also update <scala.binary.version> in parent POM
# update <scala.binary.version> in parent POM
# Match any scala binary version to ensure idempotency
sed_i '1,/<scala\.binary\.version>[0-9]*\.[0-9]*</s/<scala\.binary\.version>[0-9]*\.[0-9]*</<scala.binary.version>'$TO_VERSION'</' \
"$BASEDIR/pom.xml"
sed_i '1,/<scala\.binary\.version>[0-9]*\.[0-9]*</s/<scala\.binary\.version>[0-9]*\.[0-9]*</<scala.binary.version>'${TO_VERSION}'</' \
"${BASEDIR}/pom.xml"
# update <scala.version> in parent POM
# This is to make variables in leaf pom to be substituted to real value when flattened-pom is created.
# maven-flatten plugin doesn't take properties defined under profile even if scala-2.11/scala-2.10 is activated via -Pscala-2.11/-Pscala-2.10,
# and use default defined properties to create flatten pom.
sed_i '1,/<scala\.version>[0-9]*\.[0-9]*\.[0-9]*</s/<scala\.version>[0-9]*\.[0-9]*\.[0-9]*</<scala.version>'${SCALA_LIB_VERSION}'</' \
"${BASEDIR}/pom.xml"

80
dev/change_zeppelin_version.sh Executable file
View file

@ -0,0 +1,80 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
usage() {
echo "usage) $0 [OLD version] [NEW version]"
echo " ex. $0 0.8.0-SNAPSHOT 0.8.0"
exit 1
}
if [[ $# -ne 2 ]]; then
usage
fi
FROM_VERSION="$1"
TO_VERSION="$2"
is_dev_version() {
if [[ "$1" == *"SNAPSHOT" ]]; then
return 0
else
return 1
fi
}
is_maintenance_version() {
local version="$1"
if [[ "${version}" == *"SNAPSHOT" ]]; then
version = $(echo ${1} | cut -d'-' -f 1)
fi
if [[ "${version}" == *".0" ]]; then
return 1
else
return 0
fi
}
# Change version in pom.xml
mvn versions:set -DnewVersion="${TO_VERSION}" -DgenerateBackupPoms=false > /dev/null 2>&1
# Change version in example and package files
sed -i '' 's/-'"${FROM_VERSION}"'.jar",/-'"${TO_VERSION}"'.jar",/g' zeppelin-examples/zeppelin-example-clock/zeppelin-example-clock.json
sed -i '' 's/"version": "'"${FROM_VERSION}"'",/"version": "'"${TO_VERSION}"'",/g' zeppelin-web/src/app/tabledata/package.json
sed -i '' 's/"version": "'"${FROM_VERSION}"'",/"version": "'"${TO_VERSION}"'",/g' zeppelin-web/src/app/visualization/package.json
sed -i '' 's/"version": "'"${FROM_VERSION}"'",/"version": "'"${TO_VERSION}"'",/g' zeppelin-web/src/app/spell/package.json
# Change version in Dockerfile
sed -i '' 's/Z_VERSION="'"${FROM_VERSION}"'"/Z_VERSION="'"${TO_VERSION}"'"/g' scripts/docker/zeppelin/bin/Dockerfile
# When preparing new dev version from release tag, doesn't need to change docs version
if is_dev_version "${FROM_VERSION}" || ! is_dev_version "${TO_VERSION}"; then
# When prepare new rc for the maintenance release
if is_dev_version "${FROM_VERSION}" && is_maintenance_version "${TO_VERSION}" \
&& [[ "${FROM_VERSION}" == "${TO_VERSION}"* ]]; then
FROM_VERSION=$(echo "${TO_VERSION}" | awk -F. '{ printf("%d.%d.%d", $1, $2, $3-1) }')
fi
# Change zeppelin version in docs config
sed -i '' 's/ZEPPELIN_VERSION : '"${FROM_VERSION}"'$/ZEPPELIN_VERSION : '"$TO_VERSION"'/g' docs/_config.yml
sed -i '' 's/BASE_PATH : \/docs\/'"${FROM_VERSION}"'$/BASE_PATH : \/docs\/'"$TO_VERSION"'/g' docs/_config.yml
# Change interpreter's maven version in docs and interpreter-list
sed -i '' 's/:'"${FROM_VERSION}"'/:'"${TO_VERSION}"'/g' conf/interpreter-list
sed -i '' 's/:'"${FROM_VERSION}"'/:'"${TO_VERSION}"'/g' docs/manual/interpreterinstallation.md
fi

View file

@ -33,6 +33,9 @@ fi
mkdir "${WORKING_DIR}"
# If set to 'yes', release script will deploy artifacts to SNAPSHOT repository.
DO_SNAPSHOT='no'
usage() {
echo "usage) $0 [Release version] [Branch or Tag]"
echo " ex. $0 0.6.0 v0.6.0"

View file

@ -106,8 +106,8 @@ function make_binary_release() {
git_clone
make_source_package
make_binary_release all "-Pspark-2.1 -Phadoop-2.6 -Pyarn -Ppyspark -Psparkr -Pscala-${SCALA_VERSION}"
make_binary_release netinst "-Pspark-2.1 -Phadoop-2.6 -Pyarn -Ppyspark -Psparkr -Pscala-${SCALA_VERSION} -pl zeppelin-interpreter,zeppelin-zengine,:zeppelin-display_${SCALA_VERSION},:zeppelin-spark-dependencies_${SCALA_VERSION},:zeppelin-spark_${SCALA_VERSION},zeppelin-web,zeppelin-server,zeppelin-distribution -am"
make_binary_release all "-Pspark-2.1 -Phadoop-2.6 -Pscala-${SCALA_VERSION}"
make_binary_release netinst "-Pspark-2.1 -Phadoop-2.6 -Pscala-${SCALA_VERSION} -pl zeppelin-interpreter,zeppelin-zengine,:zeppelin-display_${SCALA_VERSION},:zeppelin-spark-dependencies_${SCALA_VERSION},:zeppelin-spark_${SCALA_VERSION},zeppelin-web,zeppelin-server,zeppelin-distribution -am"
# remove non release files and dirs
rm -rf "${WORKING_DIR}/zeppelin"

View file

@ -1,5 +1,4 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -43,8 +42,11 @@ NC='\033[0m' # No Color
RELEASE_VERSION="$1"
GIT_TAG="$2"
if [[ $RELEASE_VERSION == *"SNAPSHOT"* ]]; then
DO_SNAPSHOT="yes"
fi
PUBLISH_PROFILES="-Ppublish-distr -Pspark-2.1 -Phadoop-2.6 -Pyarn -Ppyspark -Psparkr -Pr"
PUBLISH_PROFILES="-Ppublish-distr -Pspark-2.1 -Phadoop-2.6 -Pr"
PROJECT_OPTIONS="-pl !zeppelin-distribution"
NEXUS_STAGING="https://repository.apache.org/service/local/staging"
NEXUS_PROFILE="153446d1ac37c4"
@ -67,6 +69,40 @@ function curl_error() {
fi
}
#
# Publishing Apache Zeppelin artifact to Apache snapshot repository.
#
function publish_snapshot_to_maven() {
cd "${WORKING_DIR}/zeppelin"
echo "Deploying Apache Zeppelin $RELEASE_VERSION version to snapshot repository."
if [[ ! $RELEASE_VERSION == *"SNAPSHOT"* ]]; then
echo "ERROR: Snapshots must have a version containing 'SNAPSHOT'"
echo "ERROR: You gave version '$RELEASE_VERSION'"
exit 1
fi
tmp_repo="$(mktemp -d /tmp/zeppelin-repo-XXXXX)"
mvn versions:set -DnewVersion=$RELEASE_VERSION
tmp_settings="tmp-settings.xml"
echo "<settings><servers><server>" > $tmp_settings
echo "<id>apache.snapshots.https</id><username>$ASF_USERID</username>" >> $tmp_settings
echo "<password>$ASF_PASSWORD</password>" >> $tmp_settings
echo "</server></servers></settings>" >> $tmp_settings
mvn --settings $tmp_settings -Dmaven.repo.local="${tmp_repo}" -Pbeam -DskipTests \
$PUBLISH_PROFILES -Drat.skip=true deploy
"${BASEDIR}/change_scala_version.sh" 2.11
mvn -Pscala-2.11 --settings $tmp_settings -Dmaven.repo.local="${tmp_repo}" -Pbeam -DskipTests \
$PUBLISH_PROFILES -Drat.skip=true clean deploy
rm $tmp_settings
rm -rf $tmp_repo
}
function publish_to_maven() {
cd "${WORKING_DIR}/zeppelin"
@ -153,5 +189,9 @@ function publish_to_maven() {
}
git_clone
publish_to_maven
if [[ "${DO_SNAPSHOT}" == 'yes' ]]; then
publish_snapshot_to_maven
else
publish_to_maven
fi
cleanup

50
dev/tag_release.sh Executable file
View file

@ -0,0 +1,50 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
WORKING_DIR="/tmp/apache-zeppelin"
for var in CURRENT_VERSION RELEASE_VERSION NEXT_DEV_VERSION RC_TAG GIT_BRANCH; do
if [[ -z "${!var}" ]]; then
echo "You need ${var} variable set"
exit 1
fi
done
set -e
git clone https://git-wip-us.apache.org/repos/asf/zeppelin.git "${WORKING_DIR}"
pushd "${WORKING_DIR}"
git checkout "${GIT_BRANCH}"
# Create release version
./dev/change_zeppelin_version.sh "${CURRENT_VERSION}" "${RELEASE_VERSION}"
git commit -a -m "Preparing Apache Zeppelin release ${RELEASE_VERSION}"
echo "Creating tag ${RC_TAG} at the head of ${GIT_BRANCH}"
git tag "${RC_TAG}"
# Create next dev version
./dev/change_zeppelin_version.sh "${RELEASE_VERSION}" "${NEXT_DEV_VERSION}"
git commit -a -m "Preparing development version ${NEXT_DEV_VERSION}"
git push origin "${RC_TAG}"
git push origin HEAD:"${GIT_BRANCH}"
popd
rm -rf "${WORKING_DIR}"

View file

@ -1,5 +1,5 @@
<div id="menu" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="container navbar-container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
@ -7,49 +7,120 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{BASE_PATH}}">
<img src="/assets/themes/zeppelin/img/zeppelin_logo.png" width="50" alt="I'm zeppelin">
<span style="vertical-align:middle">Zeppelin</span>
<span style="vertical-align:baseline"><small>{{site.ZEPPELIN_VERSION}}</small></span>
</a>
<div class="navbar-brand">
<a class="navbar-brand-main" href="{{site.production_url}}">
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/zeppelin_logo.png" width="50"
style="margin-top: -2px;" alt="I'm zeppelin">
<span style="margin-left: 5px; font-size: 27px;">Zeppelin</span>
<a class="navbar-brand-version" href="{{BASE_PATH}}"
style="font-size: 15px; color: white;"> {{site.ZEPPELIN_VERSION}}
</a>
</a>
</div>
</div>
<nav class="navbar-collapse collapse" role="navigation">
<ul class="nav navbar-nav">
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Quick Start <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{BASE_PATH}}/index.html">What is Apache Zeppelin ?</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Getting Started</b><span></li>
<li><a href="{{BASE_PATH}}/install/install.html">Install</a></li>
<li><a href="{{BASE_PATH}}/install/configuration.html">Configuration</a></li>
<li><a href="{{BASE_PATH}}/quickstart/explorezeppelinui.html">Explore Zeppelin UI</a></li>
<li class="title"><span>Getting Started</span></li>
<li><a href="{{BASE_PATH}}/quickstart/install.html">Install</a></li>
<li><a href="{{BASE_PATH}}/quickstart/explore_ui.html">Explore UI</a></li>
<li><a href="{{BASE_PATH}}/quickstart/tutorial.html">Tutorial</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Basic Feature Guide</b><span></li>
<li><a href="{{BASE_PATH}}/manual/dynamicform.html">Dynamic Form</a></li>
<li><a href="{{BASE_PATH}}/manual/publish.html">Publish your Paragraph</a></li>
<li><a href="{{BASE_PATH}}/manual/notebookashomepage.html">Customize Zeppelin Homepage</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>More</b><span></li>
<li><a href="{{BASE_PATH}}/install/upgrade.html">Upgrade Zeppelin Version</a></li>
<li><a href="{{BASE_PATH}}/install/build.html">Build from source</a></li>
<li><a href="{{BASE_PATH}}/quickstart/install_with_flink_and_spark_cluster.html">Install Zeppelin with Flink and Spark Clusters Tutorial</a></li>
<li><a href="{{BASE_PATH}}/quickstart/spark_with_zeppelin.html">Spark with Zeppelin</a></li>
<li><a href="{{BASE_PATH}}/quickstart/sql_with_zeppelin.html">SQL with Zeppelin</a></li>
<li><a href="{{BASE_PATH}}/quickstart/python_with_zeppelin.html">Python with Zeppelin</a></li>
</ul>
</li>
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Usage<b class="caret"></b></a>
<ul class="dropdown-menu scrollable-menu">
<li class="title"><span>Dynamic Form</span></li>
<li><a href="{{BASE_PATH}}/usage/dynamic_form/intro.html">What is Dynamic Form?</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Display System</span></li>
<li><a href="{{BASE_PATH}}/usage/display_system/basic.html#text">Text Display</a></li>
<li><a href="{{BASE_PATH}}/usage/display_system/basic.html#html">HTML Display</a></li>
<li><a href="{{BASE_PATH}}/usage/display_system/basic.html#table">Table Display</a></li>
<li><a href="{{BASE_PATH}}/usage/display_system/basic.html#network">Network</a></li>
<li><a href="{{BASE_PATH}}/usage/display_system/angular_backend.html">Angular Display using Backend API</a></li>
<li><a href="{{BASE_PATH}}/usage/display_system/angular_frontend.html">Angular Display using Frontend API</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Interpreter</span></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/overview.html">Overview</a></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/interpreter_binding_mode.html">Interpreter Binding Mode</a></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/user_impersonation.html">User Impersonation</a></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/dependency_management.html">Dependency Management</a></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/installation.html">Installing Interpreters</a></li>
<!--<li><a href="{{BASE_PATH}}/usage/interpreter/dynamic_loading.html">Dynamic Interpreter Loading (Experimental)</a></li>-->
<li><a href="{{BASE_PATH}}/usage/interpreter/execution_hooks.html">Execution Hooks (Experimental)</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Other Features</span></li>
<li><a href="{{BASE_PATH}}/usage/other_features/publishing_paragraphs.html">Publishing Paragraphs</a></li>
<li><a href="{{BASE_PATH}}/usage/other_features/personalized_mode.html">Personalized Mode</a></li>
<li><a href="{{BASE_PATH}}/usage/other_features/customizing_homepage.html">Customizing Zeppelin Homepage</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>REST API</span></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/interpreter.html">Interpreter API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/zeppelin_server.html">Zeppelin Server API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/notebook.html">Notebook API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/notebook_repository.html">Notebook Repository API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/configuration.html">Configuration API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/credential.html">Credential API</a></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/helium.html">Helium API</a></li>
</ul>
</li>
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Setup<b class="caret"></b></a>
<ul class="dropdown-menu scrollable-menu">
<li class="title"><span>Basics</span></li>
<li><a href="{{BASE_PATH}}/setup/basics/how_to_build.html">How to Build Zeppelin</a></li>
<li><a href="{{BASE_PATH}}/setup/basics/multi_user_support.html">Multi-user Support</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Deployment</span></li>
<!--<li><a href="{{BASE_PATH}}/setup/deployment/docker.html">Docker Image for Zeppelin</a></li>-->
<li><a href="{{BASE_PATH}}/setup/deployment/spark_cluster_mode.html#spark-standalone-mode">Spark Cluster Mode: Standalone</a></li>
<li><a href="{{BASE_PATH}}/setup/deployment/spark_cluster_mode.html#spark-on-yarn-mode">Spark Cluster Mode: YARN</a></li>
<li><a href="{{BASE_PATH}}/setup/deployment/spark_cluster_mode.html#spark-on-mesos-mode">Spark Cluster Mode: Mesos</a></li>
<li><a href="{{BASE_PATH}}/setup/deployment/flink_and_spark_cluster.html">Zeppelin with Flink, Spark Cluster</a></li>
<li><a href="{{BASE_PATH}}/setup/deployment/cdh.html">Zeppelin on CDH</a></li>
<li><a href="{{BASE_PATH}}/setup/deployment/virtual_machine.html">Zeppelin on VM: Vagrant</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Security</span></li>
<li><a href="{{BASE_PATH}}/setup/security/authentication_nginx.html">HTTP Basic Auth using NGINX</a></li>
<li><a href="{{BASE_PATH}}/setup/security/shiro_authentication.html">Shiro Authentication</a></li>
<li><a href="{{BASE_PATH}}/setup/security/notebook_authorization.html">Notebook Authorization</a></li>
<li><a href="{{BASE_PATH}}/setup/security/datasource_authorization.html">Data Source Authorization</a></li>
<li><a href="{{BASE_PATH}}/setup/security/http_security_headers.html">HTTP Security Headers</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Notebook Storage</span></li>
<li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-local-git-repository">Git Storage</a></li>
<li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-s3">S3 Storage</a></li>
<li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-azure">Azure Storage</a></li>
<li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-zeppelinhub">ZeppelinHub Storage</a></li>
<li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-mongodb">MongoDB Storage</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>Operation</span></li>
<li><a href="{{BASE_PATH}}/setup/operation/configuration.html">Configuration</a></li>
<li><a href="{{BASE_PATH}}/setup/operation/proxy_setting.html">Proxy Setting</a></li>
<li><a href="{{BASE_PATH}}/setup/operation/upgrading.html">Upgrading</a></li>
<li><a href="{{BASE_PATH}}/setup/operation/trouble_shooting.html">Trouble Shooting</a></li>
</ul>
</li>
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Interpreter <b class="caret"></b></a>
<ul class="dropdown-menu scrollable-menu">
<li><a href="{{BASE_PATH}}/manual/interpreters.html">Overview</a></li>
<li class="title"><span>Interpreters</span></li>
<li><a href="{{BASE_PATH}}/usage/interpreter/overview.html">Overview</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Usage</b><span></li>
<li><a href="{{BASE_PATH}}/manual/interpreterinstallation.html">Interpreter Installation</a></li>
<!--<li><a href="{{BASE_PATH}}/manual/dynamicinterpreterload.html">Dynamic Interpreter Loading</a></li>-->
<li><a href="{{BASE_PATH}}/manual/dependencymanagement.html">Interpreter Dependency Management</a></li>
<li><a href="{{BASE_PATH}}/manual/userimpersonation.html">Interpreter User Impersonation</a></li>
<li><a href="{{BASE_PATH}}/manual/interpreterexechooks.html">Interpreter Execution Hooks (Experimental)</a></li>
<li><a href="{{BASE_PATH}}/interpreter/spark.html">Spark</a></li>
<li><a href="{{BASE_PATH}}/interpreter/jdbc.html">JDBC</a></li>
<li><a href="{{BASE_PATH}}/interpreter/python.html">Python</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Available Interpreters</b><span></li>
<li><a href="{{BASE_PATH}}/interpreter/alluxio.html">Alluxio</a></li>
<li><a href="{{BASE_PATH}}/interpreter/beam.html">Beam</a></li>
<li><a href="{{BASE_PATH}}/interpreter/bigquery.html">BigQuery</a></li>
@ -57,72 +128,46 @@
<li><a href="{{BASE_PATH}}/interpreter/elasticsearch.html">Elasticsearch</a></li>
<li><a href="{{BASE_PATH}}/interpreter/flink.html">Flink</a></li>
<li><a href="{{BASE_PATH}}/interpreter/geode.html">Geode</a></li>
<li><a href="{{BASE_PATH}}/interpreter/groovy.html">Groovy</a></li>
<li><a href="{{BASE_PATH}}/interpreter/hbase.html">HBase</a></li>
<li><a href="{{BASE_PATH}}/interpreter/hdfs.html">HDFS</a></li>
<li><a href="{{BASE_PATH}}/interpreter/hive.html">Hive</a></li>
<li><a href="{{BASE_PATH}}/interpreter/ignite.html">Ignite</a></li>
<li><a href="{{BASE_PATH}}/interpreter/jdbc.html">JDBC</a></li>
<li><a href="{{BASE_PATH}}/interpreter/kylin.html">Kylin</a></li>
<li><a href="{{BASE_PATH}}/interpreter/lens.html">Lens</a></li>
<li><a href="{{BASE_PATH}}/interpreter/livy.html">Livy</a></li>
<li><a href="{{BASE_PATH}}/interpreter/markdown.html">Markdown</a></li>
<li><a href="{{BASE_PATH}}/interpreter/pig.html">Pig</a></li>
<li><a href="{{BASE_PATH}}/interpreter/python.html">Python</a></li>
<li><a href="{{BASE_PATH}}/interpreter/postgresql.html">Postgresql, HAWQ</a></li>
<li><a href="{{BASE_PATH}}/interpreter/r.html">R</a></li>
<li><a href="{{BASE_PATH}}/interpreter/scalding.html">Scalding</a></li>
<li><a href="{{BASE_PATH}}/interpreter/scio.html">Scio</a></li>
<li><a href="{{BASE_PATH}}/interpreter/shell.html">Shell</a></li>
<li><a href="{{BASE_PATH}}/interpreter/spark.html">Spark</a></li>
</ul>
</li>
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Display System <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="title"><span><b>Basic Display System</b><span></li>
<li><a href="{{BASE_PATH}}/displaysystem/basicdisplaysystem.html#text">Text</a></li>
<li><a href="{{BASE_PATH}}/displaysystem/basicdisplaysystem.html#html">Html</a></li>
<li><a href="{{BASE_PATH}}/displaysystem/basicdisplaysystem.html#table">Table</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Angular API</b><span></li>
<li><a href="{{BASE_PATH}}/displaysystem/back-end-angular.html">Angular (backend API)</a></li>
<li><a href="{{BASE_PATH}}/displaysystem/front-end-angular.html">Angular (frontend API)</a></li>
</ul>
</li>
<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">More<b class="caret"></b></a>
<ul class="dropdown-menu scrollable-menu" style="right: 0; left: auto;">
<li class="title"><span><b>Notebook Storage</b><span></li>
<li><a href="{{BASE_PATH}}/storage/storage.html#notebook-storage-in-local-git-repository">Git Storage</a></li>
<li><a href="{{BASE_PATH}}/storage/storage.html#notebook-storage-in-s3">S3 Storage</a></li>
<li><a href="{{BASE_PATH}}/storage/storage.html#notebook-storage-in-azure">Azure Storage</a></li>
<li><a href="{{BASE_PATH}}/storage/storage.html#storage-in-zeppelinhub">ZeppelinHub Storage</a></li>
<li class="title"><span>Extending Zeppelin</span></li>
<li><a href="{{BASE_PATH}}/development/writing_zeppelin_interpreter.html">Writing Zeppelin Interpreter</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>REST API</b><span></li>
<li><a href="{{BASE_PATH}}/rest-api/rest-interpreter.html">Interpreter API</a></li>
<li><a href="{{BASE_PATH}}/rest-api/rest-notebook.html">Notebook API</a></li>
<li><a href="{{BASE_PATH}}/rest-api/rest-configuration.html">Configuration API</a></li>
<li><a href="{{BASE_PATH}}/rest-api/rest-credential.html">Credential API</a></li>
<li><a href="{{BASE_PATH}}/rest-api/rest-helium.html">Helium API</a></li>
<li class="title"><span>Helium (Experimental)</span></li>
<li><a href="{{BASE_PATH}}/development/helium/overview.html">Overview</a></li>
<li><a href="{{BASE_PATH}}/development/helium/writing_application.html">Writing Helium Application</a></li>
<li><a href="{{BASE_PATH}}/development/helium/writing_spell.html">Writing Helium Spell</a></li>
<li><a href="{{BASE_PATH}}/development/helium/writing_visualization_basics.html">Writing Helium Visualization: Basics</a></li>
<li><a href="{{BASE_PATH}}/development/helium/writing_visualization_transformation.html">Writing Helium Visualization: Transformation</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Security</b><span></li>
<li><a href="{{BASE_PATH}}/security/shiroauthentication.html">Shiro Authentication</a></li>
<li><a href="{{BASE_PATH}}/security/notebook_authorization.html">Notebook Authorization</a></li>
<li><a href="{{BASE_PATH}}/security/datasource_authorization.html">Data Source Authorization</a></li>
<li class="title"><span>Contributing to Zeppelin</span></li>
<li><a href="{{BASE_PATH}}/setup/basics/how_to_build.html">How to Build Zeppelin</a></li>
<li><a href="{{BASE_PATH}}/development/contribution/useful_developer_tools.html">Useful Developer Tools</a></li>
<li><a href="{{BASE_PATH}}/development/contribution/how_to_contribute_code.html">How to Contribute (code)</a></li>
<li><a href="{{BASE_PATH}}/development/contribution/how_to_contribute_website.html">How to Contribute (website)</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Advanced</b><span></li>
<li><a href="{{BASE_PATH}}/install/virtual_machine.html">Zeppelin on Vagrant VM</a></li>
<li><a href="{{BASE_PATH}}/install/spark_cluster_mode.html#spark-standalone-mode">Zeppelin on Spark Cluster Mode (Standalone)</a></li>
<li><a href="{{BASE_PATH}}/install/spark_cluster_mode.html#spark-on-yarn-mode">Zeppelin on Spark Cluster Mode (YARN)</a></li>
<li><a href="{{BASE_PATH}}/install/spark_cluster_mode.html#spark-on-mesos-mode">Zeppelin on Spark Cluster Mode (Mesos)</a></li>
<li><a href="{{BASE_PATH}}/install/cdh.html">Zeppelin on CDH</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span><b>Contibute</b><span></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelininterpreter.html">Writing Zeppelin Interpreter</a></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelinvisualization.html">Writing Zeppelin Visualization (Experimental)</a></li>
<li><a href="{{BASE_PATH}}/development/writingzeppelinapplication.html">Writing Zeppelin Application (Experimental)</a></li>
<li><a href="{{BASE_PATH}}/development/howtocontribute.html">How to contribute (code)</a></li>
<li><a href="{{BASE_PATH}}/development/howtocontributewebsite.html">How to contribute (website)</a></li>
<li class="title"><span>External Resources</span></li>
<li><a target="_blank" href="">Mailing List</a></li>
<li><a target="_blank" href="">Apache Zeppelin Wiki</a></li>
<li><a target="_blank" href="">Stackoverflow Questions about Zeppelin</a></li>
</ul>
</li>
<li>
@ -134,4 +179,3 @@
</nav><!--/.navbar-collapse -->
</div>
</div>

View file

@ -1,14 +1,14 @@
/* Move down content because we have a fixed navbar that is 50px tall */
/* Move down content because we have a fixed navbar that is 60px tall */
@import url(//fonts.googleapis.com/css?family=Patua+One);
@import url(//fonts.googleapis.com/css?family=Open+Sans);
body {
padding-top: 50px;
padding-bottom: 20px;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #4c555a;
letter-spacing: .2px;
font-size: 15px;
}
.jumbotron {
@ -58,6 +58,7 @@ body {
.jumbotron h1 {
font-family: 'Patua One', cursive;
}
.jumbotron h1 {
font-family: 'Patua One', cursive;
@ -67,7 +68,6 @@ body {
font-size: 60%;
color: #FFF;
}
}
.jumbotron small {
font-size: 60%;
@ -75,27 +75,31 @@ body {
}
.navbar-brand {
padding-top: 10px;
padding-bottom: 10px;
padding-top: 15px;
padding-bottom: 15px;
}
.navbar-brand img {
.navbar-brand-main img {
margin: 0;
}
.navbar {
background: #3071a9;
border-bottom: 0px;
height: 50px;
height: 60px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.4);
}
.navbar-inverse .navbar-nav > li > a {
padding-top: 18px;
padding-bottom: 20px;
font-size: 15px;
font-weight: 300;
color: white;
background: #3071a9;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
.navbar-inverse .navbar-nav > li > a:hover {
color: white !important;
background: #2C6094 !important;
}
@ -124,7 +128,7 @@ body {
background: #265380;
}
.navbar-inverse .navbar-brand {
.navbar-inverse .navbar-brand-main {
color: white;
text-decoration: none;
font-size: 32px;
@ -181,7 +185,12 @@ body {
}
.navbar-inverse .navbar-toggle {
border-color: #265380;
margin-top: 12px;
border-color: transparent;
}
.navbar-inverse .navbar-toggle:focus {
outline-width: 0;
}
.navbar-inverse .navbar-toggle:hover,
@ -190,8 +199,9 @@ body {
background: #265380;
}
.navbar-inverse .navbar-toggle:focus {
outline-width: 0;
.navbar-inverse .navbar-toggle.collapsed {
border-color: #3071A9;
background: #3071a9;
}
/* CUSTOMIZE THE CAROUSEL
@ -257,8 +267,9 @@ body {
.content {
word-wrap: break-word;
}
.content :first-child {
margin-top: 0;
margin-top: 20px;
}
@media screen and (min-width: 64em) {
@ -299,7 +310,7 @@ a.anchor {
/* <hn> */
.content h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Roboto", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-top: 3rem;
margin-bottom: 1rem;
font-weight: bold;
@ -365,7 +376,7 @@ a.anchor {
padding: 0.8rem;
margin-top: 0;
margin-bottom: 1rem;
font: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 90%;
color: #567482;
word-wrap: normal;
@ -452,10 +463,19 @@ a.anchor {
}
.content table th,
.content table td {
padding: 0.5rem 1rem;
padding: 0.7rem 1rem;
border: 1px solid #e9ebec;
}
.properties {
font-size: 12.5px !important;
font-weight: normal;
color: #4c555a !important;
margin-bottom: 0px;
}
/* posts index */
.post > h3.title {
position: relative;
@ -523,19 +543,12 @@ a.anchor {
color: white;
}
.navbar-brand {
.navbar-brand-main {
font-family: 'Patua One', cursive;
}
.navbar-brand small {
font-size: 14px;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
color: white;
vertical-align: bottom;
}
.navbar-collapse.collapse {
max-height: 50px;
max-height: 60px;
}
.navbar-inverse .navbar-nav a .caret,
@ -592,47 +605,26 @@ a.anchorjs-link:hover { text-decoration: none; }
padding-bottom: 3px;
}
/* Custom, iPhone Retina */
@media only screen and (max-width: 480px) {
.jumbotron h1 {
display: none;
}
.navbar-brand small {
display: none;
color: white;
}
}
@media only screen and (max-width: 768px) {
.navbar .navbar-brand {
padding-bottom: 0;
}
}
@media only screen
and (min-width: 768px)
and (max-width: 1024px) {
.navbar-brand small {
display: none;
}
.navbar-collapse.collapse {
padding-right: 0;
}
.navbar-fixed-top > .container {
width: 800px;
}
.navbar-inverse .navbar-brand {
color: white;
text-decoration: none;
font-size: 32px;
font-size: 27px;
}
/* master branch docs dropdown menu */
#menu .dropdown-menu li span {
padding: 3px 10px 10px 10px;
font-size: 13px;
font-family: "Roboto", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 12px 10px 12px 20px;
font-size: 16px;
font-weight: 300;
}
#menu .dropdown-menu li a {
padding-left: 30px;
}
#menu .title {
padding-bottom: 8px;
color: #3071a9;
}
@ -646,8 +638,20 @@ and (max-width: 1024px) {
border-bottom-color: #428bca;
}
#menu .navbar-brand {
margin-right: 50px;
#menu .navbar-brand-version {
margin-right: 30px;
text-decoration: none !important;
}
#menu .navbar-brand-version span {
float: none;
display: inline-block;
vertical-align: bottom;
}
#menu .navbar-brand-version {
font-size: 14px;
color: white;
}
/* gh-pages branch docs dropdown menu */
@ -661,14 +665,64 @@ and (max-width: 1024px) {
font-size: 13px;
}
/* Custom, iPhone Retina */
@media only screen and (max-width: 480px) {
.jumbotron h1 {
display: none;
}
.navbar-brand-version {
display: none;
color: white;
}
}
@media only screen and (max-width: 480px) {
#menu .title {
color: #bbb;
}
}
/* when navigation toggle is enabled due to browser size */
@media only screen and (max-width: 768px) {
#menu .title {
color: #bbb;
text-shadow: 1px 2px #353131;
color: white;
font-family: "Roboto", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
font-weight: 300;
}
.content {
padding-left: 30px;
padding-right: 30px;
}
.navbar .navbar-brand-main {
padding-bottom: 0;
}
.navbar-nav {
margin-top: 0px;
}
.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
border-color: #73a0cd;
}
}
@media only screen and (min-width: 768px) and (max-width: 1024px) {
.navbar-brand-version {
display: none;
}
.navbar-collapse.collapse {
padding-right: 0;
}
.navbar-fixed-top > .container {
width: auto;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -122,6 +122,15 @@ $(function() {
$('#toc').toc();
});
$(document).click(function(event) {
// fold navbar when a user click other components
var clickover = $(event.target);
var _opened = $(".navbar-collapse").hasClass("navbar-collapse in");
if (_opened === true && !clickover.hasClass("navbar-toggle")) {
$("button.navbar-toggle").click();
}
});
// Scroll now too in case we had opened the page on a hash, but wait a bit because some browsers
// will try to do *their* initial scroll after running the onReady handler.
$(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); });

View file

@ -2,7 +2,7 @@
layout: page
title: "Contributing to Apache Zeppelin (Code)"
description: "How can you contribute to Apache Zeppelin project? This document covers from setting up your develop environment to making a pull request on Github."
group: development
group: development/contribution
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -64,6 +64,9 @@ git clone -b branch-0.5.6 git://git.apache.org/zeppelin.git zeppelin
Apache Zeppelin follows [Fork & Pull](https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/Development-workflow-with-Git:-Fork,-Branching,-Commits,-and-Pull-Request) as a source control workflow.
If you want to not only build Zeppelin but also make any changes, then you need to fork [Zeppelin github mirror repository](https://github.com/apache/zeppelin) and make a pull request.
Before making a pull request, please take a look [Contribution Guidelines](http://zeppelin.apache.org/contribution/contributions.html).
### Build
```

View file

@ -2,7 +2,7 @@
layout: page
title: "Contributing to Apache Zeppelin (Website)"
description: "How can you contribute to Apache Zeppelin project website? This document covers from building Zeppelin documentation site to making a pull request on Github."
group: development
group: development/contribution
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -0,0 +1,101 @@
---
layout: page
title: "Useful Developer Tools"
description: ""
group: development/contribution
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Useful Developer Tools
<div id="toc"></div>
### Developing `zeppelin-web`
Check [zeppelin-web: Local Development](https://github.com/apache/zeppelin/tree/master/zeppelin-web#local-development).
### Tools
#### SVM: Scala Version Manager
[svm](https://github.com/yuroyoro/svm) would be useful when changing scala version frequently.
#### JDK change script: OSX
this script would be helpful when changing JDK version frequently.
```
function setjdk() {
if [ $# -ne 0 ]; then
# written based on OSX.
# use diffrent base path for other OS
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}
function removeFromPath() {
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
}
```
you can use this function like `setjdk 1.8` / `setjdk 1.7`
### Building Submodules Selectively
```
# build `zeppelin-web` only
mvn clean -pl 'zeppelin-web' package -DskipTests;
# build `zeppelin-server` and its dependencies only
mvn clean package -pl 'spark,spark-dependencies,python,markdown,zeppelin-server' --am -DskipTests
# build spark related modules with default profiles: scala 2.10
mvn clean package -pl 'spark,spark-dependencies,zeppelin-server' --am -DskipTests
# build spark related modules with profiles: scala 2.11, spark 2.1 hadoop 2.7
./dev/change_scala_version.sh 2.11
mvn clean package -Pspark-2.1 -Phadoop-2.7 -Pscala-2.11 -pl 'spark,spark-dependencies,zeppelin-server' --am -DskipTests
# build `zeppelin-server` and `markdown` with dependencies
mvn clean package -pl 'markdown,zeppelin-server' --am -DskipTests
```
### Running Individual Tests
```
# run the `HeliumBundleFactoryTest` test class
mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=HeliumBundleFactoryTest
```
### Running Selenium Tests
Make sure that Zeppelin instance is started to execute integration tests (= selenium tests).
```
# run the `SparkParagraphIT` test class
TEST_SELENIUM="true" mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=SparkParagraphIT
# run the `testSqlSpark` test function only in the `SparkParagraphIT` class
# but note that, some test might be dependent on the previous tests
TEST_SELENIUM="true" mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=SparkParagraphIT#testSqlSpark
```

View file

@ -0,0 +1,39 @@
---
layout: page
title: "Helium"
description: ""
group: development/helium
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Helium Overview
<div id="toc"></div>
## What is Helium?
Helium is a plugin system that can extend Zeppelin a lot.
For example, you can write [custom display system](./writing_spell.html) or
install already published one in [Heliun Online Registry](http://zeppelin.apache.org/helium_packages.html).
Currently, Helium supports 4 types of package.
- [Helium Visualization](./writing_visualization_basic.html): Adding a new chart type
- [Helium Spell](./writing_spell.html): Adding new interpreter, display system running on browser
- [Helium Application](./writing_application.html)
- [Helium Interpreter](../writing_zeppelin_interpreter.html): Adding a new custom interpreter

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Writing a new Application(Experimental)"
title: "Writing a new Helium Application"
description: "Apache Zeppelin Application is a package that runs on Interpreter process and displays it's output inside of the notebook. Make your own Application in Apache Zeppelin is quite easy."
group: development
group: development/helium
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -19,7 +19,7 @@ limitations under the License.
-->
{% include JB/setup %}
# Writing a new Application (Experimental)
# Writing a new Application
<div id="toc"></div>
@ -91,19 +91,18 @@ In the Zeppelin notebook, run `%dev run` will connect to application running in
Package file is a json file that provides information about the application.
Json file contains the following information
```
```json
{
name : "[organization].[name]",
description : "Description",
artifact : "groupId:artifactId:version",
className : "your.package.name.YourApplicationClass",
resources : [
"name" : "[organization].[name]",
"description" : "Description",
"artifact" : "groupId:artifactId:version",
"className" : "your.package.name.YourApplicationClass",
"resources" : [
["resource.name", ":resource.class.name"],
["alternative.resource.name", ":alternative.class.name"]
],
icon : "<i class="icon"></i>"
"icon" : "<i class='icon'></i>"
}
```
#### name
@ -184,4 +183,3 @@ e.g.
```
icon: "<i class='fa fa-clock-o'></i>"
```

View file

@ -0,0 +1,214 @@
---
layout: page
title: "Writing a new Helium Spell"
description: "Spell is a kind of interpreter that runs on browser not on backend. So, technically it's the frontend interpreter. "
group: development/helium
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Writing a new Spell
<div id="toc"></div>
## What is Apache Zeppelin Spell
Spell is a kind of interpreter that runs on browser not on backend. So, technically it's the frontend interpreter.
It can provide many benefits.
- Spell is pluggable frontend interpreter. So it can be installed and removed easily using helium registry.
- Every spell is written in javascript. It means you can use existing javascript libraries whatever you want.
- Spell runs on browser like display system (`%html`, `%table`). In other words, every spell can be used as display system as well.
## How it works
Helium Spell works like [Helium Visualization](./writing_visualization_basic.html).
- Every helium packages are loaded from central (online) registry or local registry
- You can see loaded packages in `/helium` page.
- When you enable a spell, it's built from server and sent to client
- Finally it will be loaded into browser.
## How to use spell
### 1. Enabling
Find a spell what you want to use in `/helium` package and click `Enable` button.
<img class="img-responsive" style="width:70%" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/writing_spell_registered.png" />
### 2. Using
Spell works like an interpreter. Use the `MAGIC` value to execute spell in a note. (you might need to refresh after enabling)
For example, Use `%echo` for the Echo Spell.
<img class="img-responsive" style="width:70%" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/writing_spell_using.gif" />
## Write a new Spell
Making a new spell is similar to [Helium Visualization#write-new-visualization](./writing_visualization_basic.html#write-new-visualization).
- Add framework dependency called zeppelin-spell into `package.json`
- Write code using framework
- Publish your spell to [npm]("https://www.npmjs.com/")
### 1. Create a npm package
Create a [package.json](https://docs.npmjs.com/files/package.json) in new directory for spell.
- You have to add a framework called `zeppelin-spell` as a dependency to create spell ([zeppelin-spell](https://github.com/apache/zeppelin/tree/master/zeppelin-web/src/app/spell))
- Also, you can add any dependencies you want to utilise.
Here's an example
```json
{
"name": "zeppelin-echo-spell",
"description": "Zeppelin Echo Spell (example)",
"version": "1.0.0",
"main": "index",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"zeppelin-spell": "*"
},
"helium": {
"icon" : "<i class='fa fa-repeat'></i>",
"spell": {
"magic": "%echo",
"usage": "%echo <TEXT>"
}
}
}
```
### 2. Write spell using framework
Here are some examples you can refer
- [Echo Spell](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-echo/index.js)
- [Markdown Spell: Using library](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-markdown/index.js)
- [Flowchart Spell: Using DOM](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-flowchart/index.js)
- [Google Translation API Spell: Using API (returning promise)](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-translator/index.js)
Now, you need to write code to create spell which processing text.
```js
import {
SpellBase,
SpellResult,
DefaultDisplayType,
} from 'zeppelin-spell';
export default class EchoSpell extends SpellBase {
constructor() {
/** pass magic to super class's constructor parameter */
super("%echo");
}
interpret(paragraphText) {
const processed = paragraphText + '!';
/**
* should return `SpellResult` which including `data` and `type`
* default type is `TEXT` if you don't specify.
*/
return new SpellResult(processed);
}
}
```
Here is another example. Let's say we want to create markdown spell. First of all, we should add a dependency for markdown in package.json
```json
// package.json
"dependencies": {
"markdown": "0.5.0",
"zeppelin-spell": "*"
},
```
And here is spell code.
```js
import {
SpellBase,
SpellResult,
DefaultDisplayType,
} from 'zeppelin-spell';
import md from 'markdown';
const markdown = md.markdown;
export default class MarkdownSpell extends SpellBase {
constructor() {
super("%markdown");
}
interpret(paragraphText) {
const parsed = markdown.toHTML(paragraphText);
/**
* specify `DefaultDisplayType.HTML` since `parsed` will contain DOM
* otherwise it will be rendered as `DefaultDisplayType.TEXT` (default)
*/
return new SpellResult(parsed, DefaultDisplayType.HTML);
}
}
```
- You might want to manipulate DOM directly (e.g google d3.js), then refer [Flowchart Spell](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-flowchart/index.js)
- You might want to return promise not string (e.g API call), then refer [Google Translation API Spell](https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-spell-translator/index.js)
### 3. Create __Helium package file__ for local deployment
You don't want to publish your package every time you make a change in your spell. Zeppelin provides local deploy.
The only thing you need to do is creating a __Helium Package file__ (JSON) for local deploy.
It's automatically created when you publish to npm repository but in local case, you should make it by yourself.
```json
{
"type" : "SPELL",
"name" : "zeppelin-echo-spell",
"version": "1.0.0",
"description" : "Return just what receive (example)",
"artifact" : "./zeppelin-examples/zeppelin-example-spell-echo",
"license" : "Apache-2.0",
"spell": {
"magic": "%echo",
"usage": "%echo <TEXT>"
}
}
```
- Place this file in your local registry directory (default `$ZEPPELIN_HOME/helium`).
- `type` should be `SPELL`
- Make sure that `artifact` should be same as your spell directory.
- You can get information about other fields in [Helium Visualization#3-create-helium-package-file-and-locally-deploy](./writing_visualization_basic.html#3-create-helium-package-file-and-locally-deploy).
### 4. Run in dev mode
```bash
cd zeppelin-web
yarn run dev:helium
```
You can browse localhost:9000. Every time refresh your browser, Zeppelin will rebuild your spell and reload changes.
### 5. Publish your spell to the npm repository
See [Publishing npm packages](https://docs.npmjs.com/getting-started/publishing-npm-packages)

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Writing a new Visualization(Experimental)"
description: "Apache Zeppelin Application is a package that runs on Interpreter process and displays it's output inside of the notebook. Make your own Application in Apache Zeppelin is quite easy."
group: development
title: "Writing a new Helium Visualization: basic"
description: "Apache Zeppelin Visualization is a pluggable package that can be loaded/unloaded on runtime through Helium framework in Zeppelin. A Visualization is a javascript npm package and user can use them just like any other built-in visualization in a note."
group: development/helium
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -19,7 +19,7 @@ limitations under the License.
-->
{% include JB/setup %}
# Writing a new Visualization (Experimental)
# Writing a new Visualization
<div id="toc"></div>
@ -41,20 +41,19 @@ Once Zeppelin loads _Helium package files_ from registries, available packages a
Click 'enable' button.
<img class="img-responsive" style="width:70%" src="../assets/themes/zeppelin/img/docs-img/writing_visualization_helium_menu.png" />
<img class="img-responsive" style="width:70%" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/writing_visualization_helium_menu.png" />
#### 3. Create and load visualization bundle on the fly
Once a Visualization package is enabled, [HeliumVisualizationFactory](https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java) creates a js bundle. The js bundle is served by `helium/visualization/load` rest api endpoint.
Once a Visualization package is enabled, [HeliumBundleFactory](https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumBundleFactory.java) creates a js bundle. The js bundle is served by `helium/bundle/load` rest api endpoint.
#### 4. Run visualization
Zeppelin shows additional button for loaded Visualizations.
User can use just like any other built-in visualizations.
<img class="img-responsive" style="width:70%" src="../assets/themes/zeppelin/img/docs-img/writing_visualization_example.png" />
<img class="img-responsive" style="width:70%" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/writing_visualization_example.png" />
@ -62,11 +61,11 @@ User can use just like any other built-in visualizations.
#### 1. Create a npm package
Create a [package.json](https://docs.npmjs.com/files/package.json) in your new Visualization directory. Normally, you can add any dependencies in package.json however Zeppelin Visualization package only allows two dependencies: [zeppelin-vis](https://github.com/apache/zeppelin/tree/master/zeppelin-web/src/app/visualization) and [zeppelin-tabledata](https://github.com/apache/zeppelin/tree/master/zeppelin-web/src/app/tabledata).
Create a [package.json](https://docs.npmjs.com/files/package.json) in your new Visualization directory. You can add any dependencies in package.json, but you **must include two dependencies: [zeppelin-vis](https://github.com/apache/zeppelin/tree/master/zeppelin-web/src/app/visualization) and [zeppelin-tabledata](https://github.com/apache/zeppelin/tree/master/zeppelin-web/src/app/tabledata).**
Here's an example
```
```json
{
"name": "zeppelin_horizontalbar",
"description" : "Horizontal Bar chart",
@ -87,7 +86,7 @@ To create your own visualization, you need to create a js file and import [Visua
[Visualization](https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/visualization/visualization.js) class, there're several methods that you need to override and implement. Here's simple visualization that just prints `Hello world`.
```
```js
import Visualization from 'zeppelin-vis'
import PassthroughTransformation from 'zeppelin-tabledata/passthrough'
@ -119,7 +118,7 @@ Zeppelin's built-in visualization uses the same API, so you can check [built-in
__Helium Package file__ is a json file that provides information about the application.
Json file contains the following information
```
```json
{
"type" : "VISUALIZATION",
"name" : "zeppelin_horizontalbar",
@ -130,13 +129,15 @@ Json file contains the following information
}
```
Place file in your local registry directory (default `./helium`).
Place this file in your local registry directory (default `./helium`).
##### type
When you're creating a visualization, 'type' should be 'VISUALIZATION'.
Check [application](./writingzeppelinapplication.html) type if you're interested in the other types of package.
When you're creating a visualization, 'type' should be 'VISUALIZATION'. Check these types as well.
- [Helium Application](./writing_application.html)
- [Helium Spell](./writing_spell.html)
##### name
@ -155,15 +156,15 @@ e.g.
When artifact exists in npm repository
```
artifact: "my-visualiztion@1.0.0"
```json
"artifact": "my-visualiztion@1.0.0"
```
When artifact exists in local file system
```
artifact: "/path/to/my/visualization"
```json
"artifact": "/path/to/my/visualization"
```
##### license
@ -172,8 +173,8 @@ License information.
e.g.
```
license: "Apache-2.0"
```json
"license": "Apache-2.0"
```
##### icon
@ -182,8 +183,8 @@ Icon to be used in visualization select button. String in this field will be ren
e.g.
```
icon: "<i class='fa fa-coffee'></i>"
```json
"icon": "<i class='fa fa-coffee'></i>"
```
@ -192,9 +193,9 @@ icon: "<i class='fa fa-coffee'></i>"
Place your __Helium package file__ in local registry (ZEPPELIN_HOME/helium).
Run Zeppelin. And then run zeppelin-web in visualization dev mode.
```
```bash
cd zeppelin-web
yarn run visdev
yarn run dev:helium
```
You can browse localhost:9000. Everytime refresh your browser, Zeppelin will rebuild your visualization and reload changes.
@ -203,4 +204,9 @@ You can browse localhost:9000. Everytime refresh your browser, Zeppelin will reb
#### 5. Publish your visualization
Once it's done, publish your visualization package using `npm publish`.
That's it. With in an hour, your visualization will be available in Zeppelin's helium menu.
That's it. With in an hour, your visualization will be available in Zeppelin's helium menu.
### See More
Check [Helium Visualization: Transformation](./writing_visualization_transformation.html) for more complex examples.

View file

@ -0,0 +1,281 @@
---
layout: page
title: "Transformations in Zeppelin Visualization"
description: "Description for Transformations"
group: development/helium
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Transformations for Zeppelin Visualization
<div id="toc"></div>
## Overview
Transformations
- **renders** setting which allows users to set columns and
- **transforms** table rows according to the configured columns.
Zeppelin provides 4 types of transformations.
## 1. PassthroughTransformation
`PassthroughTransformation` is the simple transformation which does not convert original tabledata at all.
See [passthrough.js](https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/tabledata/passthrough.js)
## 2. ColumnselectorTransformation
`ColumnselectorTransformation` is uses when you need `N` axes but do not need aggregation.
See [columnselector.js](https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/tabledata/columnselector.js)
## 3. PivotTransformation
`PivotTransformation` provides group by and aggregation. Every chart using `PivotTransformation` has 3 axes. `Keys`, `Groups` and `Values`.
See [pivot.js](https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/tabledata/pivot.js)
## 4. AdvancedTransformation
`AdvancedTransformation` has more detailed options while providing existing features of `PivotTransformation` and `ColumnselectorTransformation`
- multiple sub charts
- configurable chart axes
- parameter widgets: `input`, `checkbox`, `option`, `textarea`
- parsing parameters automatically based on their types
- expand / fold axis and parameter panels
- multiple transformation methods while supporting lazy converting
- re-initialize the whole configuration based on spec hash.
### Spec
`AdvancedTransformation` requires `spec` which includes axis and parameter details for charts.
Let's create 2 sub-charts called `line` and `no-group`. Each sub chart can have different axis and parameter depending on their requirements.
<br/>
```js
class AwesomeVisualization extends Visualization {
constructor(targetEl, config) {
super(targetEl, config)
const spec = {
charts: {
'line': {
transform: { method: 'object', },
sharedAxis: false, /** set if you want to share axes between sub charts, default is `false` */
axis: {
'xAxis': { dimension: 'multiple', axisType: 'key', description: 'serial', },
'yAxis': { dimension: 'multiple', axisType: 'aggregator', description: 'serial', },
'category': { dimension: 'multiple', axisType: 'group', description: 'categorical', },
},
parameter: {
'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },
'yAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of yAxis', },
'lineWidth': { valueType: 'int', defaultValue: 0, description: 'width of line', },
},
},
'no-group': {
transform: { method: 'object', },
sharedAxis: false,
axis: {
'xAxis': { dimension: 'single', axisType: 'key', },
'yAxis': { dimension: 'multiple', axisType: 'value', },
},
parameter: {
'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },
'yAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of yAxis', },
},
},
}
this.transformation = new AdvancedTransformation(config, spec)
}
...
// `render` will be called whenever `axis` or `parameter` is changed
render(data) {
const { chart, parameter, column, transformer, } = data
if (chart === 'line') {
const transformed = transformer()
// draw line chart
} else if (chart === 'no-group') {
const transformed = transformer()
// draw no-group chart
}
}
}
```
<br/>
### Spec: `axis`
| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`dimension` | `single` | Axis can contains only 1 column |
|`dimension` | `multiple` | Axis can contains multiple columns |
|`axisType` | `key` | Column(s) in this axis will be used as `key` like in `PivotTransformation`. These columns will be served in `column.key` |
|`axisType` | `aggregator` | Column(s) in this axis will be used as `value` like in `PivotTransformation`. These columns will be served in `column.aggregator` |
|`axisType` | `group` | Column(s) in this axis will be used as `group` like in `PivotTransformation`. These columns will be served in `column.group` |
|`axisType` | (string) | Any string value can be used here. These columns will be served in `column.custom` |
|`maxAxisCount` (optional) | (int) | The max number of columns that this axis can contain. (unlimited if `undefined`) |
|`minAxisCount` (optional) | (int) | The min number of columns that this axis should contain to draw chart. (`1` in case of single dimension) |
|`description` (optional) | (string) | Description for the axis. |
<br/>
Here is an example.
```js
axis: {
'xAxis': { dimension: 'multiple', axisType: 'key', },
'yAxis': { dimension: 'multiple', axisType: 'aggregator'},
'category': { dimension: 'multiple', axisType: 'group', maxAxisCount: 2, valueType: 'string', },
},
```
<br/>
### Spec: `sharedAxis`
If you set `sharedAxis: false` for sub charts, then their axes are persisted in global space (shared). It's useful for when you creating multiple sub charts sharing their axes but have different parameters. For example,
- `basic-column`, `stacked-column`, `percent-column`
- `pie` and `donut`
<br/>
Here is an example.
```js
const spec = {
charts: {
'column': {
transform: { method: 'array', },
sharedAxis: true,
axis: { ... },
parameter: { ... },
},
'stacked': {
transform: { method: 'array', },
sharedAxis: true,
axis: { ... }
parameter: { ... },
},
```
<br/>
### Spec: `parameter`
| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`valueType` | `string` | Parameter which has string value |
|`valueType` | `int` | Parameter which has int value |
|`valueType` | `float` | Parameter which has float value |
|`valueType` | `boolean` | Parameter which has boolean value used with `checkbox` widget usually |
|`valueType` | `JSON` | Parameter which has JSON value used with `textarea` widget usually. `defaultValue` should be `""` (empty string). This ||`defaultValue` | (any) | Default value of this parameter. `JSON` type should have `""` (empty string) |
|`description` | (string) | Description of this parameter. This value will be parsed as HTML for pretty output |
|`widget` | `input` | Use [input](https://developer.mozilla.org/en/docs/Web/HTML/Element/input) widget. This is the default widget (if `widget` is undefined)|
|`widget` | `checkbox` | Use [checkbox](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox) widget. |
|`widget` | `textarea` | Use [textarea](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) widget. |
|`widget` | `option` | Use [select + option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) widget. This parameter should have `optionValues` field as well. |
|`optionValues` | (Array<string>) | Available option values used with the `option` widget |
<br/>
Here is an example.
```js
parameter: {
// string type, input widget
'xAxisUnit': { valueType: 'string', defaultValue: '', description: 'unit of xAxis', },
// boolean type, checkbox widget
'inverted': { widget: 'checkbox', valueType: 'boolean', defaultValue: false, description: 'invert x and y axes', },
// string type, option widget with `optionValues`
'graphType': { widget: 'option', valueType: 'string', defaultValue: 'line', description: 'graph type', optionValues: [ 'line', 'smoothedLine', 'step', ], },
// HTML in `description`
'dateFormat': { valueType: 'string', defaultValue: '', description: 'format of date (<a href="https://docs.amcharts.com/3/javascriptcharts/AmGraph#dateFormat">doc</a>) (e.g YYYY-MM-DD)', },
// JSON type, textarea widget
'yAxisGuides': { widget: 'textarea', valueType: 'JSON', defaultValue: '', description: 'guides of yAxis ', },
```
<br/>
### Spec: `transform`
| Field Name | Available Values (type) | Description |
| --- | --- | --- |
|`method` | `object` | designed for rows requiring object manipulation |
|`method` | `array` | designed for rows requiring array manipulation |
|`method` | `array:2-key` | designed for xyz charts (e.g bubble chart) |
|`method` | `drill-down` | designed for drill-down charts |
|`method` | `raw` | will return the original `tableData.rows` |
<br/>
Whatever you specified as `transform.method`, the `transformer` value will be always function for lazy computation.
```js
// advanced-transformation.util#getTransformer
if (transformSpec.method === 'raw') {
transformer = () => { return rows; }
} else if (transformSpec.method === 'array') {
transformer = () => {
...
return { ... }
}
}
```
Here is actual usage.
```js
class AwesomeVisualization extends Visualization {
constructor(...) { /** setup your spec */ }
...
// `render` will be called whenever `axis` or `parameter` are changed
render(data) {
const { chart, parameter, column, transformer, } = data
if (chart === 'line') {
const transformed = transformer()
// draw line chart
} else if (chart === 'no-group') {
const transformed = transformer()
// draw no-group chart
}
}
...
}
```

View file

@ -29,7 +29,7 @@ Apache Zeppelin Interpreter is a language backend. For example to use scala code
Every Interpreters belongs to an **InterpreterGroup**.
Interpreters in the same InterpreterGroup can reference each other. For example, SparkSqlInterpreter can reference SparkInterpreter to get SparkContext from it while they're in the same group.
<img class="img-responsive" style="width:50%; border: 1px solid #ecf0f1;" height="auto" src="/assets/themes/zeppelin/img/interpreter.png" />
<img class="img-responsive" style="width:50%; border: 1px solid #ecf0f1;" height="auto" src="{{BASE_PATH}}/assets/themes/zeppelin/img/interpreter.png" />
[InterpreterSetting](https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java) is configuration of a given [InterpreterGroup](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java) and a unit of start/stop interpreter.
All Interpreters in the same InterpreterSetting are launched in a single, separate JVM process. The Interpreter communicates with Zeppelin engine via **[Thrift](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift)**.
@ -61,13 +61,15 @@ Here is an example of `interpreter-setting.json` on your own interpreter.
"envName": null,
"propertyName": "property.1.name",
"defaultValue": "propertyDefaultValue",
"description": "Property description"
"description": "Property description",
"type": "textarea"
},
"properties2": {
"envName": PROPERTIES_2,
"propertyName": null,
"defaultValue": "property2DefaultValue",
"description": "Property 2 description"
"description": "Property 2 description",
"type": "textarea"
}, ...
},
"editor": {

View file

@ -1,63 +0,0 @@
---
layout: page
title: "Basic Display System in Apache Zeppelin"
description: "There are 3 basic display systems in Apache Zeppelin. By default, Zeppelin prints interpreter responce as a plain text using text display system. With %html directive, Zeppelin treats your output as HTML. You can also simply use %table display system to leverage Zeppelin's built in visualization."
group: display
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Basic Display System in Apache Zeppelin
<div id="toc"></div>
## Text
By default, Apache Zeppelin prints interpreter response as a plain text using `text` display system.
<img src="../assets/themes/zeppelin/img/screenshots/display_text.png" />
You can explicitly say you're using `text` display system.
<img src="../assets/themes/zeppelin/img/screenshots/display_text1.png" />
## Html
With `%html` directive, Zeppelin treats your output as HTML
<img src="../assets/themes/zeppelin/img/screenshots/display_html.png" />
### Mathematical expressions
HTML display system automatically formats mathematical expression using [MathJax](https://www.mathjax.org/). You can use
`\\( INLINE EXPRESSION \\)` and `$$ EXPRESSION $$` to format. For example
<img src="../assets/themes/zeppelin/img/screenshots/display_formula.png" />
## Table
If you have data that row separated by `\n` (newline) and column separated by `\t` (tab) with first row as header row, for example
<img src="../assets/themes/zeppelin/img/screenshots/display_table.png" />
You can simply use `%table` display system to leverage Zeppelin's built in visualization.
<img src="../assets/themes/zeppelin/img/screenshots/display_table1.png" />
If table contents start with `%html`, it is interpreted as an HTML.
<img src="../assets/themes/zeppelin/img/screenshots/display_table_html.png" />
> **Note :** Display system is backend independent.

View file

@ -18,171 +18,141 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
<br />
<div class="row">
<div class="col-md-6" style="padding-right:0">
<h1 style="color:#4c555a">Multi-purpose Notebook</h1>
<p class="index-header">
The Notebook is the place for all your needs
<div class="row" style="margin-top: 0px;">
<div class="col-sm-6 col-md-6" style="padding-right:0;">
<h1 style="color:#4c555a; margin-top: 0px;">What is Apache Zeppelin?</h1>
<p style="margin-bottom: 0px; margin-top: 20px; font-size: 18px; font-style="font-family: "Roboto", sans-serif;">
Multi-purpose notebook which supports
</p>
<ul style="list-style-type: none;padding-left:10px;" >
<li style="font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-import" style="margin-right:10px"></span> Data Ingestion</li>
<li style="font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-eye-open" style="margin-right:10px"></span> Data Discovery</li>
<li style="font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-wrench" style="margin-right:10px"></span> Data Analytics</li>
<li style="font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-dashboard" style="margin-right:10px"></span> Data Visualization & Collaboration</li>
<p style="font-size: 18px; font-style="font-family: "Roboto", sans-serif;">
20+ language backends
</p>
<ul style="list-style-type: none; padding-left:10px; margin-top: 30px;" >
<li style="font-weight: 300; font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-import" style="margin-right:10px"></span> Data Ingestion</li>
<li style="font-weight: 300; font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-eye-open" style="margin-right:10px"></span> Data Discovery</li>
<li style="font-weight: 300; font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-wrench" style="margin-right:10px"></span> Data Analytics</li>
<li style="font-weight: 300; font-size:18px; margin: 5px;"><span class="glyphicon glyphicon-dashboard" style="margin-right:10px"></span> Data Visualization & Collaboration</li>
</ul>
<br/>
</div>
<div class="col-md-6" style="padding:0">
<img class="img-responsive" style="border: 1px solid #ecf0f1;" src="./assets/themes/zeppelin/img/notebook.png" />
<div class="col-sm-6 col-md-6" style="padding:0;">
<div class="hidden-xs" style="margin-top: 60px;"></div>
<img class="img-responsive" style="border: 1px solid #ecf0f1;" src="{{BASE_PATH}}/assets/themes/zeppelin/img/notebook.png" />
</div>
</div>
<br />
## Multiple Language Backend
[Apache Zeppelin interpreter](./manual/interpreters.html) concept allows any language/data-processing-backend to be plugged into Zeppelin.
Currently Apache Zeppelin supports many interpreters such as Apache Spark, Python, JDBC, Markdown and Shell.
## Documentation
<img class="img-responsive" width="500px" style="margin:0 auto; padding: 26px;" src="./assets/themes/zeppelin/img/available_interpreters.png" />
#### Quick Start
Adding new language-backend is really simple. Learn [how to create your own interpreter](./development/writingzeppelininterpreter.html#make-your-own-interpreter).
#### Apache Spark integration
Especially, Apache Zeppelin provides built-in [Apache Spark](http://spark.apache.org/) integration. You don't need to build a separate module, plugin or library for it.
<img class="img-responsive" src="./assets/themes/zeppelin/img/spark_logo.png" width="140px" />
Apache Zeppelin with Spark integration provides
- Automatic SparkContext and SQLContext injection
- Runtime jar dependency loading from local filesystem or maven repository. Learn more about [dependency loader](./interpreter/spark.html#dependencyloading).
- Canceling job and displaying its progress
For the further information about Apache Spark in Apache Zeppelin, please see [Spark interpreter for Apache Zeppelin](./interpreter/spark.html).
<br />
## Data visualization
Some basic charts are already included in Apache Zeppelin. Visualizations are not limited to Spark SQL query, any output from any language backend can be recognized and visualized.
<div class="row">
<div class="col-md-6">
<img class="img-responsive" src="./assets/themes/zeppelin/img/graph1.png" />
</div>
<div class="col-md-6">
<img class="img-responsive" src="./assets/themes/zeppelin/img/graph2.png" />
</div>
</div>
### Pivot chart
Apache Zeppelin aggregates values and displays them in pivot chart with simple drag and drop. You can easily create chart with multiple aggregated values including sum, count, average, min, max.
<div class="row">
<div class="col-md-12">
<img class="img-responsive" style="margin: 16px auto;" src="./assets/themes/zeppelin/img/screenshots/pivot.png" width="480px" />
</div>
</div>
Learn more about [display systems](#display-system) in Apache Zeppelin.
<br />
## Dynamic forms
Apache Zeppelin can dynamically create some input forms in your notebook.
<div class="row">
<div class="col-md-12">
<img class="img-responsive" style="margin: 16px auto;" src="./assets/themes/zeppelin/img/screenshots/dynamicform.png" />
</div>
</div>
Learn more about [Dynamic Forms](./manual/dynamicform.html).
<br />
## Collaborate by sharing your Notebook & Paragraph
Your notebook URL can be shared among collaborators. Then Apache Zeppelin will broadcast any changes in realtime, just like the collaboration in Google docs.
<div class="row">
<div class="col-md-12">
<img class="img-responsive" style="margin: 20px auto" src="./assets/themes/zeppelin/img/screenshots/publish.png" width="650px"/>
</div>
</div>
Apache Zeppelin provides an URL to display the result only, that page does not include any menus and buttons inside of notebooks.
You can easily embed it as an iframe inside of your website in this way.
If you want to learn more about this feature, please visit [this page](./manual/publish.html).
<br />
## 100% Opensource
<img class="img-responsive" style="margin:0 auto; padding: 15px;" src="./assets/themes/zeppelin/img/asf_logo.png" width="250px"/>
Apache Zeppelin is Apache2 Licensed software. Please check out the [source repository](http://git.apache.org/zeppelin.git) and [how to contribute](https://zeppelin.apache.org/contribution/contributions.html).
Apache Zeppelin has a very active development community.
Join to our [Mailing list](https://zeppelin.apache.org/community.html) and report issues on [Jira Issue tracker](https://issues.apache.org/jira/browse/ZEPPELIN).
## What is the next ?
####Quick Start
* Getting Started
* [Quick Start](./install/install.html) for basic instructions on installing Apache Zeppelin
* [Configuration](./install/configuration.html) lists for Apache Zeppelin
* [Explore Apache Zeppelin UI](./quickstart/explorezeppelinui.html): basic components of Apache Zeppelin home
* [Tutorial](./quickstart/tutorial.html): a short walk-through tutorial that uses Apache Spark backend
* Basic Feature Guide
* [Dynamic Form](./manual/dynamicform.html): a step by step guide for creating dynamic forms
* [Publish your Paragraph](./manual/publish.html) results into your external website
* [Customize Zeppelin Homepage](./manual/notebookashomepage.html) with one of your notebooks
* More
* [Upgrade Apache Zeppelin Version](./install/upgrade.html): a manual procedure of upgrading Apache Zeppelin version
* [Build](./install/build.html): Build from source
####Interpreter
* [Interpreters in Apache Zeppelin](./manual/interpreters.html): what is interpreter group? how can you set interpreters in Apache Zeppelin?
* Usage
* [Interpreter Installation](./manual/interpreterinstallation.html): Install not only community managed interpreters but also 3rd party interpreters
* [Interpreter Dependency Management](./manual/dependencymanagement.html) when you include external libraries to interpreter
* [Interpreter User Impersonation](./manual/userimpersonation.html) when you want to run interpreter as end user
* [Interpreter Execution Hooks](./manual/interpreterexechooks.html) to specify additional code to be executed by an interpreter at pre and post-paragraph code execution
* Available Interpreters: currently, about 20 interpreters are available in Apache Zeppelin.
####Display System
* Basic Display System: [Text](./displaysystem/basicdisplaysystem.html#text), [HTML](./displaysystem/basicdisplaysystem.html#html), [Table](./displaysystem/basicdisplaysystem.html#table) is available
* Angular API: a description about avilable backend and frontend AngularJS API with examples
* [Angular (backend API)](./displaysystem/back-end-angular.html)
* [Angular (frontend API)](./displaysystem/front-end-angular.html)
####More
* Notebook Storage: a guide about saving notebooks to external storage
* [Git Storage](./storage/storage.html#notebook-storage-in-local-git-repository)
* [S3 Storage](./storage/storage.html#notebook-storage-in-s3)
* [Azure Storage](./storage/storage.html#notebook-storage-in-azure)
* [ZeppelinHub Storage](./storage/storage.html#storage-in-zeppelinhub)
* [Install](./quickstart/install.html) for basic instructions on installing Apache Zeppelin
* [Explore UI](./quickstart/explore_ui.html): basic components of Apache Zeppelin home
* [Tutorial](./quickstart/tutorial.html)
* [Spark with Zeppelin](./quickstart/spark_with_zeppelin.html)
* [SQL with Zeppelin](./quickstart/sql_with_zeppelin.html)
* [Python with Zeppelin](./quickstart/python_with_zeppelin.html)
#### Usage
* Dynamic Form
* [What is Dynamic Form](./usage/dynamic_form/intro.html): a step by step guide for creating dynamic forms
* Display System
* [Text Display (`%text`)](./usage/display_system/basic.html#text)
* [HTML Display (`%html`)](./usage/display_system/basic.html#html)
* [Table Display (`%table`)](./usage/display_system/basic.html#table)
* [Angular Display using Backend API (`%angular`)](./usage/display_system/angular_backend.html)
* [Angular Display using Frontend API (`%angular`)](./usage/display_system/angular_frontend.html)
* Interpreter
* [Overview](./usage/interpreter/overview.html): what is interpreter group? how can you set interpreters in Apache Zeppelin?
* [User Impersonation](./usage/interpreter/user_impersonation.html) when you want to run interpreter as end user
* [Interpreter Binding Mode](./usage/interpreter/interpreter_binding_mode.html) when you want to manage separate interpreter contexts
* [Dependency Management](./usage/interpreter/dependency_management.html) when you include external libraries to interpreter
* [Installing Interpreters](./usage/interpreter/installation.html): Install not only community managed interpreters but also 3rd party interpreters
* [Execution Hooks](./usage/interpreter/execution_hooks.html) to specify additional code to be executed by an interpreter at pre and post-paragraph code execution
* Other Features:
* [Publishing Paragraphs](./usage/other_features/publishing_paragraphs.html) results into your external website
* [Personalized Mode](./usage/other_features/personalized_mode.html)
* [Customizing Zeppelin Homepage](./usage/other_features/customizing_homepage.html) with one of your notebooks
* REST API: available REST API list in Apache Zeppelin
* [Interpreter API](./rest-api/rest-interpreter.html)
* [Notebook API](./rest-api/rest-notebook.html)
* [Configuration API](./rest-api/rest-configuration.html)
* [Credential API](./rest-api/rest-credential.html)
* [Interpreter API](./usage/rest_api/interpreter.html)
* [Zeppelin Server API](./usage/rest_api/zeppelin_server.html)
* [Notebook API](./usage/rest_api/notebook.html)
* [Notebook Repository API](./usage/rest_api/notebook_repository.html)
* [Configuration API](./usage/rest_api/configuration.html)
* [Credential API](./usage/rest_api/credential.html)
* [Helium API](./usage/rest_api/helium.html)
#### Setup
* Basics
* [How to Build Zeppelin](./setup/basics/how_to_build.html)
* [Multi-user Support](./setup/basics/multi_user_support.html)
* Deployment
* [Spark Cluster Mode: Standalone](./setup/deployment/spark_cluster_mode.html#spark-standalone-mode)
* [Spark Cluster Mode: YARN](./setup/deployment/spark_cluster_mode.html#spark-on-yarn-mode)
* [Spark Cluster Mode: Mesos](./setup/deployment/spark_cluster_mode.html#spark-on-mesos-mode)
* [Zeppelin with Flink and Spark Cluster](./setup/deployment/flink_and_spark_cluster.html)
* [Zeppelin on CDH](./setup/deployment/cdh.html)
* [Zeppelin on VM: Vagrant](./setup/deployment/virtual_machine.html)
* Security: available security support in Apache Zeppelin
* [Authentication for NGINX](./security/authentication.html)
* [Shiro Authentication](./security/shiroauthentication.html)
* [Notebook Authorization](./security/notebook_authorization.html)
* [Data Source Authorization](./security/datasource_authorization.html)
* Advanced
* [Apache Zeppelin on Vagrant VM](./install/virtual_machine.html)
* [Zeppelin on Spark Cluster Mode (Standalone via Docker)](./install/spark_cluster_mode.html#spark-standalone-mode)
* [Zeppelin on Spark Cluster Mode (YARN via Docker)](./install/spark_cluster_mode.html#spark-on-yarn-mode)
* [Zeppelin on Spark Cluster Mode (Mesos via Docker)](./install/spark_cluster_mode.html#spark-on-mesos-mode)
* [Zeppelin on CDH (via Docker)](./install/cdh.html)
* Contribute
* [Writing Zeppelin Interpreter](./development/writingzeppelininterpreter.html)
* [Writing Zeppelin Application (Experimental)](./development/writingzeppelinapplication.html)
* [How to contribute (code)](./development/howtocontribute.html)
* [How to contribute (documentation website)](./development/howtocontributewebsite.html)
* [HTTP Basic Auth using NGINX](./setup/security/authentication_nginx.html)
* [Shiro Authentication](./setup/security/shiro_authentication.html)
* [Notebook Authorization](./setup/security/notebook_authorization.html)
* [Data Source Authorization](./setup/security/datasource_authorization.html)
* [HTTP Security Headers](./setup/security/http_security_headers.html)
* Notebook Storage: a guide about saving notebooks to external storage
* [Git Storage](./setup/storage/storage.html#notebook-storage-in-local-git-repository)
* [S3 Storage](./setup/storage/storage.html#notebook-storage-in-s3)
* [Azure Storage](./setup/storage/storage.html#notebook-storage-in-azure)
* [ZeppelinHub Storage](./setup/storage/storage.html#notebook-storage-in-zeppelinhub)
* [MongoDB Storage](./setup/storage/storage.html#notebook-storage-in-mongodb)
* Operation
* [Configuration](./setup/operation/configuration.html): lists for Apache Zeppelin
* [Proxy Setting](./setup/operation/proxy_setting.html)
* [Upgrading](./setup/operation/upgrading.html): a manual procedure of upgrading Apache Zeppelin version
* [Trouble Shooting](./setup/operation/trouble_shooting.html)
#### Developer Guide
* Extending Zeppelin
* [Writing Zeppelin Interpreter](./development/writing_zeppelin_interpreter.html)
* [Helium: Overview](./development/helium/overview.html)
* [Helium: Writing Application](./development/helium/writing_application.html)
* [Helium: Writing Spell](./development/helium/writing_spell.html)
* [Helium: Writing Visualization: Basic](./development/helium/writing_visualization_basic.html)
* [Helium: Writing Visualization: Transformation](./development/helium/writing_visualization_transformation.html)
* Contributing to Zeppelin
* [How to Build Zeppelin](./setup/basics/how_to_build.html)
* [Useful Developer Tools](./development/contribution/useful_developer_tools.html)
* [How to Contribute (code)](./development/contribution/how_to_contribute_code.html)
* [How to Contribute (website)](./development/contribution/how_to_contribute_website.html)
#### External Resources
* [Mailing List](https://zeppelin.apache.org/community.html)
* [Apache Zeppelin Wiki](https://cwiki.apache.org/confluence/display/ZEPPELIN/Zeppelin+Home)
* [StackOverflow tag `apache-zeppelin`](http://stackoverflow.com/questions/tagged/apache-zeppelin)
* [Stackoverflow Questions about Zeppelin (tag: `apache-zeppelin`)](http://stackoverflow.com/questions/tagged/apache-zeppelin)
#### Available Interpreters
* [Alluxio](./interpreter/alluxio.html)
* [Beam](./interpreter/beam.html)
* [BigQuery](./interpreter/bigquery.html)
* [Cassandra](./interpreter/cassandra.html)
* [Elasticsearch](./interpreter/elasticsearch.html)
* [flink](./interpreter/flink.html)
* [Geode](./interpreter/geode.html)
* [Groovy](./interpreter/groovy.html)
* [HBase](./interpreter/hbase.html)
* [HDFS](./interpreter/hdfs.html)
* [Hive](./interpreter/hive.html)
* [Ignite](./interpreter/ignite.html)
* [JDBC](./interpreter/jdbc.html)
* [Kylin](./interpreter/kylin.html)
* [Lens](./interpreter/lens.html)
* [Livy](./interpreter/livy.html)
* [markdown](./interpreter/markdown.html)
* [Pig](./interpreter/pig.html)
* [Postgresql, HAWQ](./interpreter/postgresql.html)
* [Python](./interpreter/python.html)
* [R](./interpreter/r.html)
* [Scalding](./interpreter/scalding.html)
* [Scio](./interpreter/scio.html)
* [Shell](./interpreter/Shell.html)
* [Spark](./interpreter/spark.html)

View file

@ -246,5 +246,5 @@ Following steps are performed:
* using sh interpreter it's checked the existence of the new file copied from Alluxio and its content is showed
<center>
![Alluxio Interpreter Example](../assets/themes/zeppelin/img/docs-img/alluxio-example.png)
![Alluxio Interpreter Example]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/alluxio-example.png)
</center>

View file

@ -41,9 +41,9 @@ limitations under the License.
In a notebook, to enable the **Cassandra** interpreter, click on the **Gear** icon and select **Cassandra**
<center>
![Interpreter Binding](../assets/themes/zeppelin/img/docs-img/cassandra-InterpreterBinding.png)
![Interpreter Binding]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/cassandra-InterpreterBinding.png)
![Interpreter Selection](../assets/themes/zeppelin/img/docs-img/cassandra-InterpreterSelection.png)
![Interpreter Selection]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/cassandra-InterpreterSelection.png)
</center>
## Using the Cassandra Interpreter
@ -53,7 +53,7 @@ In a paragraph, use **_%cassandra_** to select the **Cassandra** interpreter and
To access the interactive help, type **HELP;**
<center>
![Interactive Help](../assets/themes/zeppelin/img/docs-img/cassandra-InteractiveHelp.png)
![Interactive Help]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/cassandra-InteractiveHelp.png)
</center>
## Interpreter Commands
@ -312,7 +312,7 @@ The schema objects (cluster, keyspace, table, type, function and aggregate) are
There is a drop-down menu on the top left corner to expand objects details. On the top right menu is shown the Icon legend.
<center>
![Describe Schema](../assets/themes/zeppelin/img/docs-img/cassandra-DescribeSchema.png)
![Describe Schema]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/cassandra-DescribeSchema.png)
</center>
## Runtime Parameters
@ -821,12 +821,11 @@ Below are the configuration parameters and their default value.
If you encounter a bug for this interpreter, please create a **[JIRA]** ticket and ping me on Twitter
at **[@doanduyhai]**
[Cassandra Java Driver]: https://github.com/datastax/java-driver
[standard CQL syntax]: http://docs.datastax.com/en/cql/3.1/cql/cql_using/use_collections_c.html
[Tuple CQL syntax]: http://docs.datastax.com/en/cql/3.1/cql/cql_reference/tupleType.html
[UDT CQL syntax]: http://docs.datastax.com/en/cql/3.1/cql/cql_using/cqlUseUDT.html
[Zeppelin dynamic form]: http://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/manual/dynamicform.html
[Interpreter Binding Mode]: http://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/manual/interpreters.html
[Zeppelin Dynamic Form](../usage/dynamic_form/intro.html)
[Interpreter Binding Mode](../usage/interpreter/interpreter_binding_mode.html)
[JIRA]: https://issues.apache.org/jira/browse/ZEPPELIN-382?jql=project%20%3D%20ZEPPELIN
[@doanduyhai]: https://twitter.com/doanduyhai

View file

@ -24,7 +24,9 @@ limitations under the License.
<div id="toc"></div>
## Overview
[Elasticsearch](https://www.elastic.co/products/elasticsearch) is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time. It is generally used as the underlying engine/technology that powers applications that have complex search features and requirements.
[Elasticsearch](https://www.elastic.co/products/elasticsearch) is a highly scalable open-source full-text search and analytics engine.
It allows you to store, search, and analyze big volumes of data quickly and in near real time.
It is generally used as the underlying engine/technology that powers applications that have complex search features and requirements.
## Configuration
<table class="table-configuration">
@ -71,7 +73,7 @@ limitations under the License.
</table>
<center>
![Interpreter configuration](../assets/themes/zeppelin/img/docs-img/elasticsearch-config.png)
![Interpreter configuration]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-config.png)
</center>
> **Note #1 :** You can add more properties to configure the Elasticsearch client.
@ -82,7 +84,8 @@ limitations under the License.
In a notebook, to enable the **Elasticsearch** interpreter, click the **Gear** icon and select **Elasticsearch**.
## Using the Elasticsearch Interpreter
In a paragraph, use `%elasticsearch` to select the Elasticsearch interpreter and then input all commands. To get the list of available commands, use `help`.
In a paragraph, use `%elasticsearch` to select the Elasticsearch interpreter and then input all commands.
To get the list of available commands, use `help`.
```bash
%elasticsearch
@ -118,7 +121,7 @@ get /index/type/id
```
Example:
![Elasticsearch - Get](../assets/themes/zeppelin/img/docs-img/elasticsearch-get.png)
![Elasticsearch - Get]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-get.png)
### Search
With the `search` command, you can send a search query to Elasticsearch. There are two formats of query:
@ -142,7 +145,8 @@ size 50
search /index1,index2,.../type1,type2,... <JSON document containing the query or query_string elements>
```
> A search query can also contain [aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html). If there is at least one aggregation, the result of the first aggregation is shown, otherwise, you get the search hits.
> A search query can also contain [aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html).
If there is at least one aggregation, the result of the first aggregation is shown, otherwise, you get the search hits.
Examples:
@ -202,25 +206,25 @@ content_length | date | request.headers[0] | request.headers[1] | request.method
Examples:
* With a table containing the results:
![Elasticsearch - Search - table](../assets/themes/zeppelin/img/docs-img/elasticsearch-search-table.png)
![Elasticsearch - Search - table]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-search-table.png)
* You can also use a predefined diagram:
![Elasticsearch - Search - diagram](../assets/themes/zeppelin/img/docs-img/elasticsearch-search-pie.png)
![Elasticsearch - Search - diagram]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-search-pie.png)
* With a JSON query:
![Elasticsearch - Search with query](../assets/themes/zeppelin/img/docs-img/elasticsearch-search-json-query-table.png)
![Elasticsearch - Search with query]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-search-json-query-table.png)
* With a JSON query containing a `fields` parameter (for filtering the fields in the response): in this case, all the fields values in the response are arrays, so, after flattening the result, the format of all the field names is `field_name[x]`
![Elasticsearch - Search with query and a fields param](../assets/themes/zeppelin/img/docs-img/elasticsearch-query-with-fields-param.png)
![Elasticsearch - Search with query and a fields param]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-query-with-fields-param.png)
* With a query string:
![Elasticsearch - Search with query string](../assets/themes/zeppelin/img/docs-img/elasticsearch-query-string.png)
![Elasticsearch - Search with query string]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-query-string.png)
* With a query containing a multi-value metric aggregation:
![Elasticsearch - Search with aggregation (multi-value metric)](../assets/themes/zeppelin/img/docs-img/elasticsearch-agg-multi-value-metric.png)
![Elasticsearch - Search with aggregation (multi-value metric)]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-agg-multi-value-metric.png)
* With a query containing a multi-bucket aggregation:
![Elasticsearch - Search with aggregation (multi-bucket)](../assets/themes/zeppelin/img/docs-img/elasticsearch-agg-multi-bucket-pie.png)
![Elasticsearch - Search with aggregation (multi-bucket)]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-agg-multi-bucket-pie.png)
### Count
With the `count` command, you can count documents available in some indices and types. You can also provide a query.
@ -233,10 +237,10 @@ count /index1,index2,.../type1,type2,... <JSON document containing the query OR
Examples:
* Without query:
![Elasticsearch - Count](../assets/themes/zeppelin/img/docs-img/elasticsearch-count.png)
![Elasticsearch - Count]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-count.png)
* With a query:
![Elasticsearch - Count with query](../assets/themes/zeppelin/img/docs-img/elasticsearch-count-with-query.png)
![Elasticsearch - Count with query]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/elasticsearch-count-with-query.png)
### Index
With the `index` command, you can insert/update a document in Elasticsearch.
@ -258,7 +262,7 @@ delete /index/type/id
```
### Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../manual/dynamicform.html) inside your queries. You can use both the `text input` and `select form` parameterization features.
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html) inside your queries. You can use both the `text input` and `select form` parameterization features.
```bash
%elasticsearch

View file

@ -37,7 +37,8 @@ limitations under the License.
</tr>
</table>
This interpreter supports the [Geode](http://geode.incubator.apache.org/) [Object Query Language (OQL)](http://geode-docs.cfapps.io/docs/developing/querying_basics/oql_compared_to_sql.html). With the OQL-based querying language:
This interpreter supports the [Geode](http://geode.incubator.apache.org/) [Object Query Language (OQL)](http://geode-docs.cfapps.io/docs/developing/querying_basics/oql_compared_to_sql.html).
With the OQL-based querying language:
[<img align="right" src="http://img.youtube.com/vi/zvzzA9GXu3Q/3.jpg" alt="zeppelin-view" hspace="10" width="200"></img>](https://www.youtube.com/watch?v=zvzzA9GXu3Q)
@ -53,17 +54,24 @@ This [Video Tutorial](https://www.youtube.com/watch?v=zvzzA9GXu3Q) illustrates s
## Create Interpreter
By default Zeppelin creates one `Geode/OQL` instance. You can remove it or create more instances.
Multiple Geode instances can be created, each configured to the same or different backend Geode cluster. But over time a `Notebook` can have only one Geode interpreter instance `bound`. That means you _cannot_ connect to different Geode clusters in the same `Notebook`. This is a known Zeppelin limitation.
Multiple Geode instances can be created, each configured to the same or different backend Geode cluster.
But over time a `Notebook` can have only one Geode interpreter instance `bound`.
That means you _cannot_ connect to different Geode clusters in the same `Notebook`.
This is a known Zeppelin limitation.
To create new Geode instance open the `Interpreter` section and click the `+Create` button. Pick a `Name` of your choice and from the `Interpreter` drop-down select `geode`. Then follow the configuration instructions and `Save` the new instance.
To create new Geode instance open the `Interpreter` section and click the `+Create` button.
Pick a `Name` of your choice and from the `Interpreter` drop-down select `geode`.
Then follow the configuration instructions and `Save` the new instance.
> Note: The `Name` of the instance is used only to distinguish the instances while binding them to the `Notebook`. The `Name` is irrelevant inside the `Notebook`. In the `Notebook` you must use `%geode.oql` tag.
## Bind to Notebook
In the `Notebook` click on the `settings` icon in the top right corner. The select/deselect the interpreters to be bound with the `Notebook`.
In the `Notebook` click on the `settings` icon in the top right corner.
The select/deselect the interpreters to be bound with the `Notebook`.
## Configuration
You can modify the configuration of the Geode from the `Interpreter` section. The Geode interpreter expresses the following properties:
You can modify the configuration of the Geode from the `Interpreter` section.
The Geode interpreter expresses the following properties:
<table class="table-configuration">
<tr>
@ -94,7 +102,10 @@ You can modify the configuration of the Geode from the `Interpreter` section. T
> *Tip 2: Always start the paragraphs with the full `%geode.oql` prefix tag! The short notation: `%geode` would still be able run the OQL queries but the syntax highlighting and the auto-completions will be disabled.*
### Create / Destroy Regions
The OQL specification does not support [Geode Regions](https://cwiki.apache.org/confluence/display/GEODE/Index#Index-MainConceptsandComponents) mutation operations. To `create`/`destroy` regions one should use the [GFSH](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/chapter_overview.html) shell tool instead. In the following it is assumed that the GFSH is colocated with Zeppelin server.
The OQL specification does not support [Geode Regions](https://cwiki.apache.org/confluence/display/GEODE/Index#Index-MainConceptsandComponents) mutation operations.
To `create`/`destroy` regions one should use the [GFSH](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/chapter_overview.html) shell tool instead.
In the following it is assumed that the GFSH is colocated with Zeppelin server.
```bash
%sh
@ -112,7 +123,10 @@ gfsh << EOF
EOF
```
Above snippet re-creates two regions: `regionEmployee` and `regionCompany`. Note that you have to explicitly specify the locator host and port. The values should match those you have used in the Geode Interpreter configuration. Comprehensive list of [GFSH Commands by Functional Area](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/gfsh_quick_reference.html).
Above snippet re-creates two regions: `regionEmployee` and `regionCompany`.
Note that you have to explicitly specify the locator host and port.
The values should match those you have used in the Geode Interpreter configuration.
Comprehensive list of [GFSH Commands by Functional Area](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/gfsh_quick_reference.html).
### Basic OQL
```sql
@ -163,7 +177,7 @@ gfsh -e "connect" -e "list members"
```
### Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../manual/dynamicform.html) inside your OQL queries. You can use both the `text input` and `select form` parameterization features
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html) inside your OQL queries. You can use both the `text input` and `select form` parameterization features
```sql
%geode.oql

138
docs/interpreter/groovy.md Normal file
View file

@ -0,0 +1,138 @@
---
layout: page
title: "Apache Groovy Interpreter for Apache Zeppelin"
description: "Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax."
group: interpreter
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Groovy Interpreter for Apache Zeppelin
### Samples
```groovy
%groovy
//get a parameter defined as z.angularBind('ngSearchParam', value, 'paragraph_id')
//g is a context object for groovy to avoid mix with z object
def param = g.angular('ngSearchParam')
//send request https://www.googleapis.com/customsearch/v1?q=ngSearchParam_value
def r = HTTP.get(
//assume you defined the groovy interpreter property
// `search_baseurl`='https://www.googleapis.com/customsearch/v1'
//in groovy object o.getProperty('A') == o.'A' == o.A == o['A']
url : g.search_baseurl,
query: [ q: param ],
headers: [
'Accept':'application/json',
//'Authorization:' : g.getProperty('search_auth'),
],
ssl : g.getProperty('search_ssl') // assume groovy interpreter property search_ssl = HTTP.getNaiveSSLContext()
)
//check response code
if( r.response.code==200 ) {
g.html().with{
//g.html() renders %angular to output and returns groovy.xml.MarkupBuilder
h2("the response ${r.response.code}")
span( r.response.body )
h2("headers")
pre( r.response.headers.join('\n') )
}
} else {
//just to show that it's possible to use println with multiline groovy string to render output
println("""%angular
<script> alert ("code=${r.response.code} \n msg=${r.response.message}") </script>
""")
}
```
```groovy
%groovy
//renders a table with headers a, b, c and two rows
g.table(
[
['a','b','c'],
['a1','b1','c1'],
['a2','b2','c2'],
]
)
```
### the `g` object
* `g.angular(String name)`
Returns angular object by name. Look up notebook scope first and then global scope.
* `g.angularBind(String name, Object value)`
Assign a new `value` into angular object `name`
* `java.util.Properties g.getProperties()`
returns all properties defined for this interpreter
* `String g.getProperty('PROPERTY_NAME')`
```groovy
g.PROPERTY_NAME
g.'PROPERTY_NAME'
g['PROPERTY_NAME']
g.getProperties().getProperty('PROPERTY_NAME')
```
All above the accessor to named property defined in groovy interpreter.
In this case with name `PROPERTY_NAME`
* `groovy.xml.MarkupBuilder g.html()`
Starts or continues rendering of `%angular` to output and returns [groovy.xml.MarkupBuilder](http://groovy-lang.org/processing-xml.html#_markupbuilder)
MarkupBuilder is usefull to generate html (xml)
* `void g.table(obj)`
starts or continues rendering table rows.
obj: List(rows) of List(columns) where first line is a header
* `g.input(name, value )`
Creates `text` input with value specified. The parameter `value` is optional.
* `g.select(name, default, Map<Object, String> options)`
Creates `select` input with defined options. The parameter `default` is optional.
```g.select('sex', 'm', ['m':'man', 'w':'woman'])```
* `g.checkbox(name, Collection checked, Map<Object, String> options)`
Creates `checkbox` input.
* `g.get(name, default)`
Returns interpreter-based variable. Visibility depends on interpreter scope. The parameter `default` is optional.
* `g.put(name, value)`
Stores new value into interpreter-based variable. Visibility depends on interpreter scope.

View file

@ -24,7 +24,10 @@ limitations under the License.
<div id="toc"></div>
## Important Notice
Hive Interpreter will be deprecated and merged into JDBC Interpreter. You can use Hive Interpreter by using JDBC Interpreter with same functionality. See the example below of settings and dependencies.
Hive Interpreter will be deprecated and merged into JDBC Interpreter.
You can use Hive Interpreter by using JDBC Interpreter with same functionality.
See the example below of settings and dependencies.
### Properties
<table class="table-configuration">
@ -130,7 +133,11 @@ This interpreter provides multiple configuration with `${prefix}`. User can set
## Overview
The [Apache Hive](https://hive.apache.org/) ™ data warehouse software facilitates querying and managing large datasets residing in distributed storage. Hive provides a mechanism to project structure onto this data and query the data using a SQL-like language called HiveQL. At the same time this language also allows traditional map/reduce programmers to plug in their custom mappers and reducers when it is inconvenient or inefficient to express this logic in HiveQL.
The [Apache Hive](https://hive.apache.org/) ™ data warehouse software facilitates querying and managing large datasets
residing in distributed storage. Hive provides a mechanism to project structure onto
this data and query the data using a SQL-like language called HiveQL.
At the same time this language also allows traditional map/reduce programmers to
plug in their custom mappers and reducers when it is inconvenient or inefficient to express this logic in HiveQL.
## How to use
Basically, you can use
@ -151,7 +158,8 @@ select * from my_table;
You can also run multiple queries up to 10 by default. Changing these settings is not implemented yet.
### Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../manual/dynamicform.html) inside your queries. You can use both the `text input` and `select form` parameterization features.
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html) inside your queries.
You can use both the `text input` and `select form` parameterization features.
```sql
%hive

View file

@ -26,7 +26,7 @@ limitations under the License.
## Overview
[Apache Ignite](https://ignite.apache.org/) In-Memory Data Fabric is a high-performance, integrated and distributed in-memory platform for computing and transacting on large-scale data sets in real-time, orders of magnitude faster than possible with traditional disk-based or flash technologies.
![Apache Ignite](../assets/themes/zeppelin/img/docs-img/ignite-logo.png)
![Apache Ignite]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/ignite-logo.png)
You can use Zeppelin to retrieve distributed data from cache using Ignite SQL interpreter. Moreover, Ignite interpreter allows you to execute any Scala code in cases when SQL doesn't fit to your requirements. For example, you can populate data into your caches or execute distributed computations.
@ -82,14 +82,14 @@ At the "Interpreters" menu, you may edit Ignite interpreter or create new one. Z
</tr>
</table>
![Configuration of Ignite Interpreter](../assets/themes/zeppelin/img/docs-img/ignite-interpreter-setting.png)
![Configuration of Ignite Interpreter]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/ignite-interpreter-setting.png)
## How to use
After configuring Ignite interpreter, create your own notebook. Then you can bind interpreters like below image.
![Binding Interpreters](../assets/themes/zeppelin/img/docs-img/ignite-interpreter-binding.png)
![Binding Interpreters]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/ignite-interpreter-binding.png)
For more interpreter binding information see [here](../manual/interpreters.html#what-is-interpreter-setting).
For more interpreter binding information see [here](../usage/interpreter/overview.html#what-is-interpreter-setting).
### Ignite SQL interpreter
In order to execute SQL query, use ` %ignite.ignitesql ` prefix. <br>
@ -101,7 +101,7 @@ For example, you can select top 10 words in the words cache using the following
select _val, count(_val) as cnt from String group by _val order by cnt desc limit 10
```
![IgniteSql on Zeppelin](../assets/themes/zeppelin/img/docs-img/ignite-sql-example.png)
![IgniteSql on Zeppelin]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/ignite-sql-example.png)
As long as your Ignite version and Zeppelin Ignite version is same, you can also use scala code. Please check the Zeppelin Ignite version before you download your own Ignite.
@ -123,6 +123,6 @@ val res = cache.query(qry).getAll()
collectionAsScalaIterable(res).foreach(println _)
```
![Using Scala Code](../assets/themes/zeppelin/img/docs-img/ignite-scala-example.png)
![Using Scala Code]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/ignite-scala-example.png)
Apache Ignite also provides a guide docs for Zeppelin ["Ignite with Apache Zeppelin"](https://apacheignite.readme.io/docs/data-analysis-with-apache-zeppelin)

View file

@ -33,7 +33,7 @@ By now, it has been tested with:
<div class="row" style="margin: 30px auto;">
<div class="col-md-6">
<img src="../assets/themes/zeppelin/img/docs-img/tested_databases.png" width="300px"/>
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/tested_databases.png" width="300px"/>
</div>
<div class="col-md-6">
<li style="padding-bottom: 5px; list-style: circle">
@ -76,12 +76,13 @@ If you are using other databases not in the above list, please feel free to shar
First, click `+ Create` button at the top-right corner in the interpreter setting page.
<img src="../assets/themes/zeppelin/img/docs-img/click_create_button.png" width="600px"/>
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/click_create_button.png" width="600px"/>
Fill `Interpreter name` field with whatever you want to use as the alias(e.g. mysql, mysql2, hive, redshift, and etc..). Please note that this alias will be used as `%interpreter_name` to call the interpreter in the paragraph.
Fill `Interpreter name` field with whatever you want to use as the alias(e.g. mysql, mysql2, hive, redshift, and etc..).
Please note that this alias will be used as `%interpreter_name` to call the interpreter in the paragraph.
Then select `jdbc` as an `Interpreter group`.
<img src="../assets/themes/zeppelin/img/docs-img/select_name_and_group.png" width="200px"/>
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/select_name_and_group.png" width="200px"/>
The default driver of JDBC interpreter is set as `PostgreSQL`. It means Zeppelin includes `PostgreSQL` driver jar in itself.
So you don't need to add any dependencies(e.g. the artifact name or path for `PostgreSQL` driver jar) for `PostgreSQL` connection.
@ -118,20 +119,40 @@ The JDBC interpreter properties are defined by default like below.
<td>gpadmin</td>
<td>The JDBC user name</td>
</tr>
<tr>
<td>default.precode</td>
<td></td>
<td>Some SQL which executes every time after initialization of the interpreter (see <a href="../usage/interpreter/overview.html#interpreter-binding-mode">Binding mode</a>)</td>
</tr>
<tr>
<td>default.completer.schemaFilters</td>
<td></td>
<td>Сomma separated schema (schema = catalog = database) filters to get metadata for completions. Supports '%' symbol is equivalent to any set of characters. (ex. prod_v_%,public%,info)</td>
</tr>
<tr>
<td>default.completer.ttlInSeconds</td>
<td>120</td>
<td>Time to live sql completer in seconds (-1 to update everytime, 0 to disable update)</td>
</tr>
<tr>
<td>default.splitQueries</td>
<td>false</td>
<td>Each query is executed apart and returns the result</td>
</tr>
</table>
If you want to connect other databases such as `Mysql`, `Redshift` and `Hive`, you need to edit the property values.
You can also use [Credential](../security/datasource_authorization.html) for JDBC authentication.
You can also use [Credential](../setup/security/datasource_authorization.html) for JDBC authentication.
If `default.user` and `default.password` properties are deleted(using X button) for database connection in the interpreter setting page,
the JDBC interpreter will get the account information from [Credential](../security/datasource_authorization.html).
the JDBC interpreter will get the account information from [Credential](../setup/security/datasource_authorization.html).
The below example is for `Mysql` connection.
<img src="../assets/themes/zeppelin/img/docs-img/edit_properties.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/edit_properties.png" width="600px" />
The last step is **Dependency Setting**. Since Zeppelin only includes `PostgreSQL` driver jar by default, you need to add each driver's maven coordinates or JDBC driver's jar file path for the other databases.
<img src="../assets/themes/zeppelin/img/docs-img/edit_dependencies.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/edit_dependencies.png" width="600px" />
That's it. You can find more JDBC connection setting examples([Mysql](#mysql), [MariaDB](#mariadb), [Redshift](#redshift), [Apache Hive](#apache-hive), [Apache Phoenix](#apache-phoenix), and [Apache Tajo](#apache-tajo)) in [this section](#examples).
@ -159,6 +180,10 @@ There are more JDBC interpreter properties you can specify like below.
<td>zeppelin.jdbc.keytab.location</td>
<td>The path to the keytab file</td>
</tr>
<tr>
<td>zeppelin.jdbc.auth.kerberos.proxy.enable</td>
<td>When auth type is Kerberos, enable/disable Kerberos proxy with the login user to get the connection. Default value is true.</td>
</tr>
<tr>
<td>default.jceks.file</td>
<td>jceks store path (e.g: jceks://file/tmp/zeppelin.jceks)</td>
@ -186,13 +211,13 @@ For example, if a connection needs a schema parameter, it would have to add the
## Binding JDBC interpter to notebook
To bind the interpreters created in the interpreter setting page, click the gear icon at the top-right corner.
<img src="../assets/themes/zeppelin/img/docs-img/click_interpreter_binding_button.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/click_interpreter_binding_button.png" width="600px" />
Select(blue) or deselect(white) the interpreter buttons depending on your use cases.
Select(blue) or deselect(white) the interpreter buttons depending on your use cases.
If you need to use more than one interpreter in the notebook, activate several buttons.
Don't forget to click `Save` button, or you will face `Interpreter *** is not found` error.
<img src="../assets/themes/zeppelin/img/docs-img/jdbc_interpreter_binding.png" width="550px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/jdbc_interpreter_binding.png" width="550px" />
## How to use
### Run the paragraph with JDBC interpreter
@ -205,11 +230,11 @@ show databases
If the paragraph is `FINISHED` without any errors, a new paragraph will be automatically added after the previous one with `%jdbc_interpreter_name`.
So you don't need to type this prefix in every paragraphs' header.
<img src="../assets/themes/zeppelin/img/docs-img/run_paragraph_with_jdbc.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/run_paragraph_with_jdbc.png" width="600px" />
### Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../manual/dynamicform.html) inside your queries. You can use both the `text input` and `select form` parametrization features.
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html) inside your queries. You can use both the `text input` and `select form` parametrization features.
```sql
%jdbc_interpreter_name
@ -217,13 +242,82 @@ SELECT name, country, performer
FROM demo.performers
WHERE name='{{"{{performer=Sheryl Crow|Doof|Fanfarlo|Los Paranoia"}}}}'
```
### Usage *precode*
You can set *precode* for each data source. Code runs once while opening the connection.
##### Properties
An example settings of interpreter for the two data sources, each of which has its *precode* parameter.
<table class="table-configuration">
<tr>
<th>Property Name</th>
<th>Value</th>
</tr>
<tr>
<td>default.driver</td>
<td>org.postgresql.Driver</td>
</tr>
<tr>
<td>default.password</td>
<td>1</td>
</tr>
<tr>
<td>default.url</td>
<td>jdbc:postgresql://localhost:5432/</td>
</tr>
<tr>
<td>default.user</td>
<td>postgres</td>
</tr>
<tr>
<td>default.precode</td>
<td>set search_path='test_path'</td>
</tr>
<tr>
<td>mysql.driver</td>
<td>com.mysql.jdbc.Driver</td>
</tr>
<tr>
<td>mysql.password</td>
<td>1</td>
</tr>
<tr>
<td>mysql.url</td>
<td>jdbc:mysql://localhost:3306/</td>
</tr>
<tr>
<td>mysql.user</td>
<td>root</td>
</tr>
<tr>
<td>mysql.precode</td>
<td>set @v=12</td>
</tr>
</table>
##### Usage
Test of execution *precode* for each data source.
```sql
%jdbc
show search_path
```
Returns value of `search_path` which is set in the *default.precode*.
```sql
%jdbc(mysql)
select @v
```
Returns value of `v` which is set in the *mysql.precode*.
## Examples
Here are some examples you can refer to. Including the below connectors, you can connect every databases as long as it can be configured with it's JDBC driver.
### Postgres
<img src="../assets/themes/zeppelin/img/docs-img/postgres_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/postgres_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -267,7 +361,7 @@ Here are some examples you can refer to. Including the below connectors, you can
### Mysql
<img src="../assets/themes/zeppelin/img/docs-img/mysql_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/mysql_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -311,7 +405,7 @@ Here are some examples you can refer to. Including the below connectors, you can
### MariaDB
<img src="../assets/themes/zeppelin/img/docs-img/mariadb_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/mariadb_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -355,7 +449,7 @@ Here are some examples you can refer to. Including the below connectors, you can
### Redshift
<img src="../assets/themes/zeppelin/img/docs-img/redshift_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/redshift_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -397,9 +491,9 @@ Here are some examples you can refer to. Including the below connectors, you can
[Maven Repository: com.amazonaws:aws-java-sdk-redshift](https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-redshift)
### Apache Hive
### Apache Hive
<img src="../assets/themes/zeppelin/img/docs-img/hive_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/hive_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -423,6 +517,10 @@ Here are some examples you can refer to. Including the below connectors, you can
<td>default.password</td>
<td>hive_password</td>
</tr>
<tr>
<td>default.proxy.user.property</td>
<td>Example value: hive.server2.proxy.user</td>
</tr>
</table>
[Apache Hive 1 JDBC Driver Docs](https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBC)
@ -446,6 +544,47 @@ Here are some examples you can refer to. Including the below connectors, you can
[Maven Repository : org.apache.hive:hive-jdbc](https://mvnrepository.com/artifact/org.apache.hive/hive-jdbc)
##### Impersonation
When Zeppelin server is running with authentication enabled, then the interpreter can utilize Hive's user proxy feature
i.e. send extra parameter for creating and running a session ("hive.server2.proxy.user=": "${loggedInUser}").
This is particularly useful when multiple users are sharing a notebook.
To enable this set following:
- `zeppelin.jdbc.auth.type` as `SIMPLE` or `KERBEROS` (if required) in the interpreter setting.
- `${prefix}.proxy.user.property` as `hive.server2.proxy.user`
See [User Impersonation in interpreter](../usage/interpreter/user_impersonation.html) for more information.
##### Sample configuration
<table class="table-configuration">
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>hive.driver</td>
<td>org.apache.hive.jdbc.HiveDriver</td>
</tr>
<tr>
<td>hive.password</td>
<td></td>
</tr>
<tr>
<td>hive.url</td>
<td>jdbc:hive2://hive-server-host:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2</td>
</tr>
<tr>
<td>hive.proxy.user.property</td>
<td>hive.server2.proxy.user</td>
</tr>
<tr>
<td>zeppelin.jdbc.auth.type</td>
<td>SIMPLE</td>
</tr>
</table>
### Apache Phoenix
Phoenix supports `thick` and `thin` connection types:
@ -457,7 +596,7 @@ Use the appropriate `default.driver`, `default.url`, and the dependency artifact
#### Thick client connection
<img src="../assets/themes/zeppelin/img/docs-img/phoenix_thick_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/phoenix_thick_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -499,7 +638,7 @@ Use the appropriate `default.driver`, `default.url`, and the dependency artifact
#### Thin client connection
<img src="../assets/themes/zeppelin/img/docs-img/phoenix_thin_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/phoenix_thin_setting.png" width="600px" />
##### Properties
<table class="table-configuration">
@ -551,7 +690,7 @@ Before Adding one of the below dependencies, check the Phoenix version first.
### Apache Tajo
<img src="../assets/themes/zeppelin/img/docs-img/tajo_setting.png" width="600px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/tajo_setting.png" width="600px" />
##### Properties
<table class="table-configuration">

View file

@ -26,7 +26,7 @@ limitations under the License.
## Overview
[Apache Lens](https://lens.apache.org/) provides an Unified Analytics interface. Lens aims to cut the Data Analytics silos by providing a single view of data across multiple tiered data stores and optimal execution environment for the analytical query. It seamlessly integrates Hadoop with traditional data warehouses to appear like one.
![Apache Lens](../assets/themes/zeppelin/img/docs-img/lens-logo.png)
![Apache Lens]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/lens-logo.png)
## Installing and Running Lens
In order to use Lens interpreters, you may install Apache Lens in some simple steps:
@ -90,14 +90,14 @@ At the "Interpreters" menu, you can edit Lens interpreter or create new one. Zep
</tr>
</table>
![Apache Lens Interpreter Setting](../assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png)
![Apache Lens Interpreter Setting]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png)
### Interpreter Binding for Zeppelin Notebook
After configuring Lens interpreter, create your own notebook, then you can bind interpreters like below image.
![Zeppelin Notebook Interpreter Binding](../assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png)
![Zeppelin Notebook Interpreter Binding]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png)
For more interpreter binding information see [here](http://zeppelin.apache.org/docs/manual/interpreters.html).
For more interpreter binding information see [here](../usage/interpreter/overview.html#interpreter-binding-mode).
### How to use
You can analyze your data by using [OLAP Cube](http://lens.apache.org/user/olap-cube.html) [QL](http://lens.apache.org/user/cli.html) which is a high level SQL like language to query and describe data sets organized in data cubes.
@ -174,11 +174,11 @@ fact add partitions --fact_name sales_raw_fact --storage_name local --path your/
query execute cube select customer_city_name, product_details.description, product_details.category, product_details.color, store_sales from sales where time_range_in(delivery_time, '2015-04-11-00', '2015-04-13-00')
```
![Lens Query Result](../assets/themes/zeppelin/img/docs-img/lens-result.png)
![Lens Query Result]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/lens-result.png)
These are just examples that provided in advance by Lens. If you want to explore whole tutorials of Lens, see the [tutorial video](https://cwiki.apache.org/confluence/display/LENS/2015/07/13/20+Minute+video+demo+of+Apache+Lens+through+examples).
## Lens UI Service
Lens also provides web UI service. Once the server starts up, you can open the service on http://serverhost:19999/index.html and browse. You may also check the structure that you made and use query easily here.
![Lens UI Service](../assets/themes/zeppelin/img/docs-img/lens-ui-service.png)
![Lens UI Service]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/lens-ui-service.png)

View file

@ -43,7 +43,7 @@ We added some common configurations for spark, and you can set any configuration
You can find all Spark configurations in [here](http://spark.apache.org/docs/latest/configuration.html#available-properties).
And instead of starting property with `spark.` it should be replaced with `livy.spark.`.
Example: `spark.driver.memory` to `livy.spark.driver.memory`
<table class="table-configuration">
<tr>
<th>Property</th>
@ -56,10 +56,15 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
<td>URL where livy server is running</td>
</tr>
<tr>
<td>zeppelin.livy.spark.maxResult</td>
<td>zeppelin.livy.spark.sql.maxResult</td>
<td>1000</td>
<td>Max number of Spark SQL result to display.</td>
</tr>
<tr>
<td>zeppelin.livy.spark.sql.field.truncate</td>
<td>true</td>
<td>Whether to truncate field values longer than 20 characters or not</td>
</tr>
<tr>
<td>zeppelin.livy.session.create_timeout</td>
<td>120</td>
@ -67,7 +72,7 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
</tr>
<tr>
<td>zeppelin.livy.displayAppInfo</td>
<td>false</td>
<td>true</td>
<td>Whether to display app info</td>
</tr>
<tr>
@ -130,12 +135,22 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
<td></td>
<td>Adding extra libraries to livy interpreter</td>
</tr>
<tr>
<td>zeppelin.livy.ssl.trustStore</td>
<td></td>
<td>client trustStore file. Used when livy ssl is enabled</td>
</tr>
<tr>
<td>zeppelin.livy.ssl.trustStorePassword</td>
<td></td>
<td>password for trustStore file. Used when livy ssl is enabled</td>
</tr>
</table>
**We remove livy.spark.master in zeppelin-0.7. Because we sugguest user to use livy 0.3 in zeppelin-0.7. And livy 0.3 don't allow to specify livy.spark.master, it enfornce yarn-cluster mode.**
## Adding External libraries
You can load dynamic library to livy interpreter by set `livy.spark.jars.packages` property to comma-separated list of maven coordinates of jars to include on the driver and executor classpaths. The format for the coordinates should be groupId:artifactId:version.
You can load dynamic library to livy interpreter by set `livy.spark.jars.packages` property to comma-separated list of maven coordinates of jars to include on the driver and executor classpaths. The format for the coordinates should be groupId:artifactId:version.
Example
@ -151,7 +166,7 @@ Example
<td>Adding extra libraries to livy interpreter</td>
</tr>
</table>
## How to use
Basically, you can use
@ -182,11 +197,13 @@ hello("livy")
```
## Impersonation
When Zeppelin server is running with authentication enabled, then this interpreter utilizes Livys user impersonation feature i.e. sends extra parameter for creating and running a session ("proxyUser": "${loggedInUser}"). This is particularly useful when multi users are sharing a Notebook server.
When Zeppelin server is running with authentication enabled,
then this interpreter utilizes Livys user impersonation feature
i.e. sends extra parameter for creating and running a session ("proxyUser": "${loggedInUser}").
This is particularly useful when multi users are sharing a Notebook server.
## Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../manual/dynamicform.html). You can use both the `text input` and `select form` parameterization features.
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html). You can use both the `text input` and `select form` parameterization features.
```
%livy.pyspark
@ -211,4 +228,4 @@ The session would have timed out, you may need to restart the interpreter.
Edit `conf/spark-blacklist.conf` file in livy server and comment out `#spark.master` line.
If you choose to work on livy in `apps/spark/java` directory in [https://github.com/cloudera/hue](https://github.com/cloudera/hue),
copy `spark-user-configurable-options.template` to `spark-user-configurable-options.conf` file in livy server and comment out `#spark.master`.
copy `spark-user-configurable-options.template` to `spark-user-configurable-options.conf` file in livy server and comment out `#spark.master`.

View file

@ -31,17 +31,18 @@ In Zeppelin notebook, you can use ` %md ` in the beginning of a paragraph to inv
In Zeppelin, Markdown interpreter is enabled by default and uses the [pegdown](https://github.com/sirthias/pegdown) parser.
<img src="../assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png" width="60%" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png" width="60%" />
## Example
The following example demonstrates the basic usage of Markdown in a Zeppelin notebook.
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example.png" width="70%" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/markdown-example.png" width="70%" />
## Mathematical expression
Markdown interpreter leverages %html display system internally. That means you can mix mathematical expressions with markdown syntax. For more information, please see [Mathematical Expression](../displaysystem/basicdisplaysystem.html#mathematical-expressions) section.
Markdown interpreter leverages %html display system internally. That means you can mix mathematical expressions with markdown syntax.
For more information, please see [Mathematical Expression](../usage/display_system/basic.html#mathematical-expressions) section.
## Configuration
<table class="table-configuration">
@ -62,11 +63,11 @@ Markdown interpreter leverages %html display system internally. That means you c
`pegdown` parser provides github flavored markdown.
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png" width="70%" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png" width="70%" />
`pegdown` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) plugins also.
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser-plugins.png" width="70%" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser-plugins.png" width="70%" />
### Markdown4j Parser

View file

@ -12,48 +12,63 @@ group: manual
<div id="toc"></div>
## Overview
[Apache Pig](https://pig.apache.org/) is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs. The salient property of Pig programs is that their structure is amenable to substantial parallelization, which in turns enables them to handle very large data sets.
[Apache Pig](https://pig.apache.org/) is a platform for analyzing large data sets that consists of
a high-level language for expressing data analysis programs,
coupled with infrastructure for evaluating these programs.
The salient property of Pig programs is that their structure is amenable to substantial parallelization,
which in turns enables them to handle very large data sets.
## Supported interpreter type
- `%pig.script` (default)
- `%pig.script` (default Pig interpreter, so you can use `%pig`)
All the pig script can run in this type of interpreter, and display type is plain text.
`%pig.script` is like the Pig grunt shell. Anything you can run in Pig grunt shell can be run in `%pig.script` interpreter, it is used for running Pig script where you dont need to visualize the data, it is suitable for data munging.
- `%pig.query`
Almost the same as `%pig.script`. The only difference is that you don't need to add alias in the last statement. And the display type is table.
## Supported runtime mode
- Local
- MapReduce
- Tez_Local (Only Tez 0.7 is supported)
- Tez (Only Tez 0.7 is supported)
`%pig.query` is a little different compared with `%pig.script`. It is used for exploratory data analysis via Pig latin where you can leverage Zeppelins visualization ability. There're 2 minor differences in the last statement between `%pig.script` and `%pig.query`
- No pig alias in the last statement in `%pig.query` (read the examples below).
- The last statement must be in single line in `%pig.query`
## How to use
### How to setup Pig
### How to setup Pig execution modes.
- Local Mode
Nothing needs to be done for local mode
Set `zeppelin.pig.execType` as `local`.
- MapReduce Mode
HADOOP\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
Set `zeppelin.pig.execType` as `mapreduce`. HADOOP\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
- Tez Local Mode
Nothing needs to be done for tez local mode
Only Tez 0.7 is supported. Set `zeppelin.pig.execType` as `tez_local`.
- Tez Mode
HADOOP\_CONF\_DIR and TEZ\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
Only Tez 0.7 is supported. Set `zeppelin.pig.execType` as `tez`. HADOOP\_CONF\_DIR and TEZ\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
- Spark Local Mode
Only Spark 1.6.x is supported, by default it is Spark 1.6.3. Set `zeppelin.pig.execType` as `spark_local`.
- Spark Mode
Only Spark 1.6.x is supported, by default it is Spark 1.6.3. Set `zeppelin.pig.execType` as `spark`. For now, only yarn-client mode is supported. To enable it, you need to set property `SPARK_MASTER` to yarn-client and set `SPARK_JAR` to the spark assembly jar.
### How to choose custom Spark Version
By default, Pig Interpreter would use Spark 1.6.3 built with scala 2.10, if you want to use another spark version or scala version,
you need to rebuild Zeppelin by specifying the custom Spark version via -Dpig.spark.version=<custom_spark_version> and scala version via -Dpig.scala.version=<scala_version> in the maven build command.
### How to configure interpreter
At the Interpreters menu, you have to create a new Pig interpreter. Pig interpreter has below properties by default.
And you can set any pig properties here which will be passed to pig engine. (like tez.queue.name & mapred.job.queue.name).
Besides, we use paragraph title as job name if it exists, else use the last line of pig script. So you can use that to find app running in YARN RM UI.
And you can set any Pig properties here which will be passed to Pig engine. (like tez.queue.name & mapred.job.queue.name).
Besides, we use paragraph title as job name if it exists, else use the last line of Pig script.
So you can use that to find app running in YARN RM UI.
<table class="table-configuration">
<tr>
@ -64,7 +79,7 @@ Besides, we use paragraph title as job name if it exists, else use the last line
<tr>
<td>zeppelin.pig.execType</td>
<td>mapreduce</td>
<td>Execution mode for pig runtime. local | mapreduce | tez_local | tez </td>
<td>Execution mode for pig runtime. local | mapreduce | tez_local | tez | spark_local | spark </td>
</tr>
<tr>
<td>zeppelin.pig.includeJobStats</td>
@ -86,6 +101,17 @@ Besides, we use paragraph title as job name if it exists, else use the last line
<td>default</td>
<td>queue name for mapreduce engine</td>
</tr>
<tr>
<td>SPARK_MASTER</td>
<td>local</td>
<td>local | yarn-client</td>
</tr>
<tr>
<td>SPARK_JAR</td>
<td></td>
<td>The spark assembly jar, both jar in local or hdfs is supported. Put it on hdfs could have
performance benefit</td>
</tr>
</table>
### Example
@ -95,22 +121,57 @@ Besides, we use paragraph title as job name if it exists, else use the last line
```
%pig
raw_data = load 'dataset/sf_crime/train.csv' using PigStorage(',') as (Dates,Category,Descript,DayOfWeek,PdDistrict,Resolution,Address,X,Y);
b = group raw_data all;
c = foreach b generate COUNT($1);
dump c;
bankText = load 'bank.csv' using PigStorage(';');
bank = foreach bankText generate $0 as age, $1 as job, $2 as marital, $3 as education, $5 as balance;
bank = filter bank by age != '"age"';
bank = foreach bank generate (int)age, REPLACE(job,'"','') as job, REPLACE(marital, '"', '') as marital, (int)(REPLACE(balance, '"', '')) as balance;
store bank into 'clean_bank.csv' using PigStorage(';'); -- this statement is optional, it just show you that most of time %pig.script is used for data munging before querying the data.
```
##### pig.query
Get the number of each age where age is less than 30
```
%pig.query
b = foreach raw_data generate Category;
c = group b by Category;
foreach c generate group as category, COUNT($1) as count;
bank_data = filter bank by age < 30;
b = group bank_data by age;
foreach b generate group, COUNT($1);
```
Data is shared between `%pig` and `%pig.query`, so that you can do some common work in `%pig`, and do different kinds of query based on the data of `%pig`.
Besides, we recommend you to specify alias explicitly so that the visualization can display the column name correctly. Here, we name `COUNT($1)` as `count`, if you don't do this,
then we will name it using position, here we will use `col_1` to represent `COUNT($1)` if you don't specify alias for it. There's one pig tutorial note in zeppelin for your reference.
The same as above, but use dynamic text form so that use can specify the variable maxAge in textbox.
(See screenshot below). Dynamic form is a very cool feature of Zeppelin, you can refer this [link]((../usage/dynamic_form/intro.html)) for details.
```
%pig.query
bank_data = filter bank by age < ${maxAge=40};
b = group bank_data by age;
foreach b generate group, COUNT($1) as count;
```
Get the number of each age for specific marital type,
also use dynamic form here. User can choose the marital type in the dropdown list (see screenshot below).
```
%pig.query
bank_data = filter bank by marital=='${marital=single,single|divorced|married}';
b = group bank_data by age;
foreach b generate group, COUNT($1) as count;
```
The above examples are in the Pig tutorial note in Zeppelin, you can check that for details. Here's the screenshot.
<img class="img-responsive" width="1024px" style="margin:0 auto; padding: 26px;" src="{{BASE_PATH}}/assets/themes/zeppelin/img/pig_zeppelin_tutorial.png" />
Data is shared between `%pig` and `%pig.query`, so that you can do some common work in `%pig`,
and do different kinds of query based on the data of `%pig`.
Besides, we recommend you to specify alias explicitly so that the visualization can display
the column name correctly. In the above example 2 and 3 of `%pig.query`, we name `COUNT($1)` as `count`.
If you don't do this, then we will name it using position.
E.g. in the above first example of `%pig.query`, we will use `col_1` in chart to represent `COUNT($1)`.

View file

@ -25,5 +25,6 @@ limitations under the License.
## Important Notice
Postgresql interpreter is deprecated and merged into [JDBC Interpreter](./jdbc.html). You can use it with JDBC Interpreter as same functionality. See [Postgresql setting example](./jdbc.html#postgres) for more detailed information.
Postgresql interpreter is deprecated and merged into [JDBC Interpreter](./jdbc.html).
You can use it with JDBC Interpreter as same functionality.
See [Postgresql setting example](./jdbc.html#postgres) for more detailed information.

View file

@ -68,23 +68,36 @@ The interpreter can use all modules already installed (with pip, easy_install...
#### Usage
List your environments
- get the Conda Infomation:
```
%python.conda
```
```%python.conda info```
- list the Conda environments:
Activate an environment
```%python.conda env list```
```
%python.conda activate [ENVIRONMENT_NAME]
```
- create a conda enviornment:
```%python.conda create --name [ENV NAME]```
- activate an environment (python interpreter will be restarted):
Deactivate
```%python.conda activate [ENV NAME]```
```
%python.conda deactivate
```
- deactivate
```%python.conda deactivate```
- get installed package list inside the current environment
```%python.conda list```
- install package
```%python.conda install [PACKAGE NAME]```
- uninstall package
```%python.conda uninstall [PACKAGE NAME]```
### Docker
@ -92,21 +105,22 @@ Deactivate
#### Usage
Activate an environment
- activate an environment
```
%python.docker activate [Repository]
%python.docker activate [Repository:Tag]
%python.docker activate [Image Id]
```
```
%python.docker activate [Repository]
%python.docker activate [Repository:Tag]
%python.docker activate [Image Id]
```
Deactivate
- deactivate
```
%python.docker deactivate
```
```
%python.docker deactivate
```
Example
<br/>
Here is an example
```
# activate latest tensorflow image as a python environment
@ -114,7 +128,7 @@ Example
```
## Using Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form]({{BASE_PATH}}/manual/dynamicform.html) inside your Python code.
You can leverage [Zeppelin Dynamic Form]({{BASE_PATH}}/usage/dynamic_form/intro.html) inside your Python code.
**Zeppelin Dynamic Form can only be used if py4j Python library is installed in your system. If not, you can install it with `pip install py4j`.**
@ -148,9 +162,13 @@ z.configure_mpl(width=400, height=300, fmt='svg')
plt.plot([1, 2, 3])
```
Will produce a 400x300 image in SVG format, which by default are normally 600x400 and PNG respectively. In the future, another option called `angular` can be used to make it possible to update a plot produced from one paragraph directly from another (the output will be `%angular` instead of `%html`). However, this feature is already available in the `pyspark` interpreter. More details can be found in the included "Zeppelin Tutorial: Python - matplotlib basic" tutorial notebook.
Will produce a 400x300 image in SVG format, which by default are normally 600x400 and PNG respectively.
In the future, another option called `angular` can be used to make it possible to update a plot produced from one paragraph directly from another
(the output will be `%angular` instead of `%html`). However, this feature is already available in the `pyspark` interpreter.
More details can be found in the included "Zeppelin Tutorial: Python - matplotlib basic" tutorial notebook.
If Zeppelin cannot find the matplotlib backend files (which should usually be found in `$ZEPPELIN_HOME/interpreter/lib/python`) in your `PYTHONPATH`, then the backend will automatically be set to agg, and the (otherwise deprecated) instructions below can be used for more limited inline plotting.
If Zeppelin cannot find the matplotlib backend files (which should usually be found in `$ZEPPELIN_HOME/interpreter/lib/python`) in your `PYTHONPATH`,
then the backend will automatically be set to agg, and the (otherwise deprecated) instructions below can be used for more limited inline plotting.
If you are unable to load the inline backend, use `z.show(plt)`:
```python
@ -168,11 +186,13 @@ The `z.show()` function can take optional parameters to adapt graph dimensions (
z.show(plt, width='50px')
z.show(plt, height='150px', fmt='svg')
```
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/pythonMatplotlib.png" />
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/pythonMatplotlib.png" />
## Pandas integration
Apache Zeppelin [Table Display System](../displaysystem/basicdisplaysystem.html#table) provides built-in data visualization capabilities. Python interpreter leverages it to visualize Pandas DataFrames though similar `z.show()` API, same as with [Matplotlib integration](#matplotlib-integration).
Apache Zeppelin [Table Display System](../usage/display_system/basic.html#table) provides built-in data visualization capabilities.
Python interpreter leverages it to visualize Pandas DataFrames though similar `z.show()` API,
same as with [Matplotlib integration](#matplotlib-integration).
Example:
@ -184,7 +204,9 @@ z.show(rates)
## SQL over Pandas DataFrames
There is a convenience `%python.sql` interpreter that matches Apache Spark experience in Zeppelin and enables usage of SQL language to query [Pandas DataFrames](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html) and visualization of results though built-in [Table Display System](../displaysystem/basicdisplaysystem.html#table).
There is a convenience `%python.sql` interpreter that matches Apache Spark experience in Zeppelin and
enables usage of SQL language to query [Pandas DataFrames](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html) and
visualization of results though built-in [Table Display System](../usage/display_system/basic.html#table).
**Pre-requests**
@ -217,7 +239,9 @@ For in-depth technical details on current implementation please refer to [python
### Some features not yet implemented in the Python Interpreter
* Interrupt a paragraph execution (`cancel()` method) is currently only supported in Linux and MacOs. If interpreter runs in another operating system (for instance MS Windows) , interrupt a paragraph will close the whole interpreter. A JIRA ticket ([ZEPPELIN-893](https://issues.apache.org/jira/browse/ZEPPELIN-893)) is opened to implement this feature in a next release of the interpreter.
* Interrupt a paragraph execution (`cancel()` method) is currently only supported in Linux and MacOs.
If interpreter runs in another operating system (for instance MS Windows) , interrupt a paragraph will close the whole interpreter.
A JIRA ticket ([ZEPPELIN-893](https://issues.apache.org/jira/browse/ZEPPELIN-893)) is opened to implement this feature in a next release of the interpreter.
* Progression bar in webUI (`getProgress()` method) is currently not implemented.
* Code-completion is currently not implemented.

View file

@ -69,23 +69,23 @@ By default, the R Interpreter appears as two Zeppelin Interpreters, `%r` and `%k
`%r` will behave like an ordinary REPL. You can execute commands as in the CLI.
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/repl2plus2.png" width="700px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/repl2plus2.png" width="700px"/>
R base plotting is fully supported
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/replhist.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/replhist.png" width="550px"/>
If you return a data.frame, Zeppelin will attempt to display it using Zeppelin's built-in visualizations.
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/replhead.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/replhead.png" width="550px"/>
`%knitr` interfaces directly against `knitr`, with chunk options on the first line:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/knitgeo.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/knitgeo.png" width="550px"/>
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/knitstock.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/knitstock.png" width="550px"/>
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/knitmotion.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/knitmotion.png" width="550px"/>
The two interpreters share the same environment. If you define a variable from `%r`, it will be within-scope if you then make a call using `knitr`.
@ -93,23 +93,23 @@ The two interpreters share the same environment. If you define a variable from
If `SPARK_HOME` is set, the `SparkR` package will be loaded automatically:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/sparkrfaithful.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/sparkrfaithful.png" width="550px"/>
The Spark Context and SQL Context are created and injected into the local environment automatically as `sc` and `sql`.
The same context are shared with the `%spark`, `%sql` and `%pyspark` interpreters:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/backtoscala.png" width="700px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/backtoscala.png" width="700px"/>
You can also make an ordinary R variable accessible in scala and Python:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/varr1.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/varr1.png" width="550px"/>
And vice versa:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/varscala.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/varscala.png" width="550px"/>
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/varr2.png" width="550px"/>
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/varr2.png" width="550px"/>
## Caveats & Troubleshooting

View file

@ -37,9 +37,9 @@ In a notebook, to enable the **Scalding** interpreter, click on the **Gear** ico
<center>
![Interpreter Binding](../assets/themes/zeppelin/img/docs-img/scalding-InterpreterBinding.png)
![Interpreter Binding]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/scalding-InterpreterBinding.png)
![Interpreter Selection](../assets/themes/zeppelin/img/docs-img/scalding-InterpreterSelection.png)
![Interpreter Selection]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/scalding-InterpreterSelection.png)
</center>
@ -124,7 +124,7 @@ print("%table " + table)
```
If you click on the icon for the pie chart, you should be able to see a chart like this:
![Scalding - Pie - Chart](../assets/themes/zeppelin/img/docs-img/scalding-pie.png)
![Scalding - Pie - Chart]({{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/scalding-pie.png)
### HDFS mode

View file

@ -63,6 +63,17 @@ At the "Interpreters" menu in Zeppelin dropdown menu, you can set the property v
## Example
The following example demonstrates the basic usage of Shell in a Zeppelin notebook.
<img src="../assets/themes/zeppelin/img/docs-img/shell-example.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/shell-example.png" />
If you need further information about **Zeppelin Interpreter Setting** for using Shell interpreter, please read [What is interpreter setting?](../manual/interpreters.html#what-is-interpreter-setting) section first.
If you need further information about **Zeppelin Interpreter Setting** for using Shell interpreter,
please read [What is interpreter setting?](../usage/interpreter/overview.html#what-is-interpreter-setting) section first.
## Kerberos refresh interval
For changing the default behavior of when to renew Kerberos ticket following changes can be made in `conf/zeppelin-env.sh`.
```bash
# Change Kerberos refresh interval (default value is 1d). Allowed postfix are ms, s, m, min, h, and d.
export LAUNCH_KERBEROS_REFRESH_INTERVAL=4h
# Change kinit number retries (default value is 5), which means if the kinit command fails for 5 retries consecutively it will close the interpreter.
export KINIT_FAIL_THRESHOLD=10
```

View file

@ -104,9 +104,16 @@ You can also set other Spark properties which are not listed in the table. For a
<td>Local repository for dependency loader</td>
</tr>
<tr>
<td>zeppelin.pyspark.python</td>
<td>PYSPARK_PYTHON</td>
<td>python</td>
<td>Python command to run pyspark with</td>
<td>Python binary executable to use for PySpark in both driver and workers (default is <code>python</code>).
Property <code>spark.pyspark.python</code> take precedence if it is set</td>
</tr>
<tr>
<td>PYSPARK_DRIVER_PYTHON</td>
<td>python</td>
<td>Python binary executable to use for PySpark in driver only (default is <code>PYSPARK_PYTHON</code>).
Property <code>spark.pyspark.driver.python</code> take precedence if it is set</td>
</tr>
<tr>
<td>zeppelin.spark.concurrentSQL</td>
@ -133,6 +140,11 @@ You can also set other Spark properties which are not listed in the table. For a
<td>true</td>
<td>Import implicits, UDF collection, and sql if set true.</td>
</tr>
<tr>
<td>zeppelin.spark.enableSupportedVersionCheck</td>
<td>true</td>
<td>Do not change - developer only setting, not for production use</td>
</tr>
</table>
Without any configuration, Spark interpreter works out of box in local mode. But if you want to connect to your Spark cluster, you'll need to follow below two simple steps.
@ -188,7 +200,7 @@ Staring from 0.6.1 SparkSession is available as variable `spark` when you are us
There are two ways to load external libraries in Spark interpreter. First is using interpreter setting menu and second is loading Spark properties.
### 1. Setting Dependencies via Interpreter Setting
Please see [Dependency Management](../manual/dependencymanagement.html) for the details.
Please see [Dependency Management](../usage/interpreter/dependency_management.html) for the details.
### 2. Loading Spark Properties
Once `SPARK_HOME` is set in `conf/zeppelin-env.sh`, Zeppelin uses `spark-submit` as spark interpreter runner. `spark-submit` supports two ways to load configurations.
@ -285,6 +297,14 @@ z.load("groupId:artifactId:version").local()
## ZeppelinContext
Zeppelin automatically injects `ZeppelinContext` as variable `z` in your Scala/Python environment. `ZeppelinContext` provides some additional functions and utilities.
### Exploring Spark DataFrames
`ZeppelinContext` provides a `show` method, which, using Zeppelin's `table` feature, can be used to nicely display a Spark DataFrame:
```
df = spark.read.csv('/path/to/csv')
z.show(df)
```
### Object Exchange
`ZeppelinContext` extends map and it's shared between Scala and Python environment.
So you can put some objects from Scala and read it from Python, vice versa.
@ -377,23 +397,28 @@ In sql environment, you can create form in simple template.
select * from ${table=defaultTableName} where text like '%${search}%'
```
To learn more about dynamic form, checkout [Dynamic Form](../manual/dynamicform.html).
To learn more about dynamic form, checkout [Dynamic Form](../usage/dynamic_form/intro.html).
## Matplotlib Integration (pyspark)
Both the `python` and `pyspark` interpreters have built-in support for inline visualization using `matplotlib`, a popular plotting library for python. More details can be found in the [python interpreter documentation](../interpreter/python.html), since matplotlib support is identical. More advanced interactive plotting can be done with pyspark through utilizing Zeppelin's built-in [Angular Display System](../displaysystem/back-end-angular.html), as shown below:
Both the `python` and `pyspark` interpreters have built-in support for inline visualization using `matplotlib`,
a popular plotting library for python. More details can be found in the [python interpreter documentation](../interpreter/python.html),
since matplotlib support is identical. More advanced interactive plotting can be done with pyspark through
utilizing Zeppelin's built-in [Angular Display System](../usage/display_system/angular_backend.html), as shown below:
<img class="img-responsive" src="../assets/themes/zeppelin/img/docs-img/matplotlibAngularExample.gif" />
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/matplotlibAngularExample.gif" />
## Interpreter setting option
You can choose one of `shared`, `scoped` and `isolated` options wheh you configure Spark interpreter. Spark interpreter creates separated Scala compiler per each notebook but share a single SparkContext in `scoped` mode (experimental). It creates separated SparkContext per each notebook in `isolated` mode.
You can choose one of `shared`, `scoped` and `isolated` options wheh you configure Spark interpreter.
Spark interpreter creates separated Scala compiler per each notebook but share a single SparkContext in `scoped` mode (experimental).
It creates separated SparkContext per each notebook in `isolated` mode.
## Setting up Zeppelin with Kerberos
Logical setup with Zeppelin, Kerberos Key Distribution Center (KDC), and Spark on YARN:
<img src="../assets/themes/zeppelin/img/docs-img/kdc_zeppelin.png">
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/kdc_zeppelin.png">
### Configuration Setup

View file

@ -25,21 +25,21 @@ limitations under the License.
## Main home
The first time you connect to Zeppelin, you'll land at the main page similar to the below screen capture.
The first time you connect to Zeppelin ([default installations start on http://localhost:8080](http://localhost:8080/)), you'll land at the main page similar to the below screen capture.
<img src="../assets/themes/zeppelin/img/ui-img/homepage.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/homepage.png" />
On the left of the page are listed all existing notes. Those notes are stored by default in the `$ZEPPELIN_HOME/notebook` folder.
You can filter them by name using the input text form. You can also create a new note, refresh the list of existing notes
(in case you manually copy them into the `$ZEPPELIN_HOME/notebook` folder) and import a note.
<img src="../assets/themes/zeppelin/img/ui-img/notes_management.png" width="230px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/notes_management.png" width="230px" />
When clicking on `Import Note` link, a new dialog open. From there you can import your note from local disk or from a remote location
if you provide the URL.
<img src="../assets/themes/zeppelin/img/ui-img/note_import_dialog.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/note_import_dialog.png" />
By default, the name of the imported note is the same as the original note but you can override it by providing a new name.
@ -54,19 +54,18 @@ The `Notebook` menu proposes almost the same features as the note management sec
2. Filter node by name
3. Create a new note
<img src="../assets/themes/zeppelin/img/ui-img/notebook_menu.png" width="170px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/notebook_menu.png" width="170px" />
### Settings
This menu gives you access to settings and displays information about Zeppelin. User name is set to `anonymous` if you use default shiro configuration. If you want to set up authentification, see [Shiro authentication](../security/shiroauthentication.html).
<img src="../assets/themes/zeppelin/img/ui-img/settings_menu.png" width="170px" />
This menu gives you access to settings and displays information about Zeppelin. User name is set to `anonymous` if you use default shiro configuration. If you want to set up authentification, see [Shiro Authentication](../setup/security/shiro_authentication.html).
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/settings_menu.png" width="170px" />
#### About Zeppelin
You can check Zeppelin version in this menu.
<img src="../assets/themes/zeppelin/img/ui-img/about_menu.png" width="450px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/about_menu.png" width="450px" />
#### Interpreter
@ -75,19 +74,19 @@ In this menu you can:
1. Configure existing **interpreter instance**
2. Add/remove **interpreter instances**
<img src="../assets/themes/zeppelin/img/ui-img/interpreter_menu.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/interpreter_menu.png" />
#### Credential
This menu allows you to save credentials for data sources which are passed to interpreters.
<img src="../assets/themes/zeppelin/img/ui-img/credential_menu.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/credential_menu.png" />
#### Configuration
This menu displays all the Zeppelin configuration that are set in the config file `$ZEPPELIN_HOME/conf/zeppelin-site.xml`
<img src="../assets/themes/zeppelin/img/ui-img/configuration_menu.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/configuration_menu.png" />
<br />
@ -95,13 +94,13 @@ This menu displays all the Zeppelin configuration that are set in the config fil
Each Zeppelin note is composed of 1 .. N paragraphs. The note can be viewed as a paragraph container.
<img src="../assets/themes/zeppelin/img/ui-img/note_paragraph_layout.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/note_paragraph_layout.png" />
### Paragraph
Each paragraph consists of 2 sections: `code section` where you put your source code and `result section` where you can see the result of the code execution.
<img src="../assets/themes/zeppelin/img/ui-img/paragraph_layout.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/paragraph_layout.png" />
On the top-right corner of each paragraph there are some commands to:
@ -112,7 +111,7 @@ On the top-right corner of each paragraph there are some commands to:
To configure the paragraph, just click on the gear icon:
<img src="../assets/themes/zeppelin/img/ui-img/paragraph_configuration_dialog.png" width="180px" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/paragraph_configuration_dialog.png" width="180px" />
From this dialog, you can (in descending order):
@ -132,7 +131,7 @@ From this dialog, you can (in descending order):
At the top of the note, you can find a toolbar which exposes command buttons as well as configuration, security and display options.
<img src="../assets/themes/zeppelin/img/ui-img/note_toolbar.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/note_toolbar.png" />
On the far right is displayed the note name, just click on it to reveal the input form and update it.
@ -148,7 +147,7 @@ In the middle of the toolbar you can find the command buttons:
* delete the note
* schedule the execution of **all paragraph** using a CRON syntax
<img src="../assets/themes/zeppelin/img/ui-img/note_commands.png" width="300px"/>
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/note_commands.png" width="300px"/>
On the right of the note tool bar you can find configuration icons:
@ -157,4 +156,4 @@ On the right of the note tool bar you can find configuration icons:
* configure the note permissions
* switch the node display mode between `default`, `simple` and `report`
<img src="../assets/themes/zeppelin/img/ui-img/note_configuration.png" width="180px"/>
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/ui-img/note_configuration.png" width="180px"/>

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Quick Start"
title: "Install"
description: "This page will help you get started and will guide you through installing Apache Zeppelin and running it in the command line."
group: install
group: quickstart
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -19,13 +19,13 @@ limitations under the License.
-->
{% include JB/setup %}
# Quick Start
# Install
<div id="toc"></div>
Welcome to Apache Zeppelin! On this page are instructions to help you get started.
## Installation
## Requirements
Apache Zeppelin officially supports and is tested on the following environments:
@ -46,15 +46,14 @@ Apache Zeppelin officially supports and is tested on the following environments:
### Downloading Binary Package
Two binary packages are available on the [Apache Zeppelin Download Page](http://zeppelin.apache.org/download.html). Only difference between these two binaries is interpreters are included in the package file.
Two binary packages are available on the [download page](http://zeppelin.apache.org/download.html). Only difference between these two binaries is interpreters are included in the package file.
- #### Package with `all` interpreters.
- **all interpreter package**: unpack it in a directory of your choice and you're ready to go.
- **net-install interpreter package**: unpack and follow [install additional interpreters](../usage/interpreter/installation.html) to install interpreters. If you're unsure, just run `./bin/install-interpreter.sh --all` and install all interpreters.
### Building Zeppelin from source
Just unpack it in a directory of your choice and you're ready to go.
- #### Package with `net-install` interpreters.
Unpack and follow [install additional interpreters](../manual/interpreterinstallation.html) to install interpreters. If you're unsure, just run `./bin/install-interpreter.sh --all` and install all interpreters.
follow the instructions [How to Build](../setup/basics/how_to_build.html), If you want to build from source instead of using binary package.
## Starting Apache Zeppelin
@ -80,9 +79,9 @@ After Zeppelin has started successfully, go to [http://localhost:8080](http://lo
bin/zeppelin-daemon.sh stop
```
#### Start Apache Zeppelin with a service manager
## Start Apache Zeppelin with a service manager
> **Note :** The below description was written based on Ubuntu Linux.
> **Note :** The below description was written based on Ubuntu.
Apache Zeppelin can be auto-started as a service with an init script, using a service manager like **upstart**.
@ -127,32 +126,17 @@ exec bin/zeppelin-daemon.sh upstart
Congratulations, you have successfully installed Apache Zeppelin! Here are few steps you might find useful:
#### New to Apache Zeppelin...
* For an in-depth overview, head to [Explore Apache Zeppelin UI](../quickstart/explorezeppelinui.html).
* And then, try run [tutorial](http://localhost:8080/#/notebook/2A94M5J1Z) notebook in your Zeppelin.
* And see how to change [configurations](./configuration.html) like port number, etc.
* For an in-depth overview, head to [Explore Zeppelin UI](../quickstart/explore_ui.html).
* And then, try run [Tutorial Notebook](http://localhost:8080/#/notebook/2A94M5J1Z) in your Zeppelin.
* And see how to change [configurations](../setup/operation/configuration.html) like port number, etc.
#### Zeppelin with Apache Spark ...
* To know more about deep integration with [Apache Spark](http://spark.apache.org/), check [Spark Interpreter](../interpreter/spark.html).
#### Spark, Python, SQL, and more
* [Spark support in Zeppelin](./spark_with_zeppelin.html), to know more about deep integration with [Apache Spark](http://spark.apache.org/).
* [SQL support in Zeppelin](./sql_with_zeppelin.html) for SQL support
* [Python support in Zeppelin](./python_with_zeppelin.html), for Matplotlib, Pandas, Conda/Docker integration.
* [All Available Interpreters](../#available-interpreters)
#### Zeppelin with JDBC data sources ...
* Check [JDBC Interpreter](../interpreter/jdbc.html) to know more about configure and uses multiple JDBC data sources.
#### Zeppelin with Python ...
* Check [Python interpreter](../interpreter/python.html) to know more about Matplotlib, Pandas, Conda/Docker environment integration.
#### Multi-user support ...
* Check [Multi-user support](../setup/basics/multi_user_support.html)
#### Multi-user environment ...
* Turn on [authentication](../security/shiroauthentication.html).
* Manage your [notebook permission](../security/notebook_authorization.html).
* For more informations, go to **More** -> **Security** section.
#### Other useful informations ...
* Learn how [Display System](../displaysystem/basicdisplaysystem.html) works.
* Use [Service Manager](#start-apache-zeppelin-with-a-service-manager) to start Zeppelin.
* If you're using previous version please see [Upgrade Zeppelin version](./upgrade.html).
## Building Apache Zeppelin from Source
If you want to build from source instead of using binary package, follow the instructions [here](./build.html).

View file

@ -0,0 +1,43 @@
---
layout: page
title: "Python with Zeppelin"
description: ""
group: quickstart
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Python support in Zeppelin
<div id="toc"></div>
<br/>
The following guides explain how to use Apache Zeppelin that enables you to write in Python:
- supports flexible python environments using [conda](../interpreter/python.html#conda), [docker](../interpreter/python.html#docker)
- can query using [PandasSQL](../interpreter/python.html#sql-over-pandas-dataframes)
- also, provides [PySpark](../interpreter/spark.html)
- with [matplotlib integration](../interpreter/python.html#matplotlib-integration)
- can create results including **UI widgets** using [Dynamic Form](../interpreter/python.html#using-zeppelin-dynamic-forms)
<br/>
For the further information about Spark support in Zeppelin, please check
- [Python Interpreter](../interpreter/python.html)

View file

@ -0,0 +1,47 @@
---
layout: page
title: "Spark with Zeppelin"
description: ""
group: quickstart
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Spark support in Zeppelin
<div id="toc"></div>
<br/>
For a brief overview of Apache Spark fundamentals with Apache Zeppelin, see the following guide:
- **built-in** Apache Spark integration.
- with [SparkSQL](http://spark.apache.org/sql/), [PySpark](https://spark.apache.org/docs/latest/api/python/pyspark.html), [SparkR](https://spark.apache.org/docs/latest/sparkr.html)
- inject [SparkContext](https://spark.apache.org/docs/latest/api/java/org/apache/spark/SparkContext.html) and [SQLContext](https://spark.apache.org/docs/latest/sql-programming-guide.html) automatically
- dependencies loading (jars) at runtime using [dependency loader](../interpreter/spark.html#dependencyloading)
- canceling job and displaying its progress
- supporting [Spark Cluster Mode](../setup/deployment/spark_cluster_mode.html#apache-zeppelin-on-spark-cluster-mode) for external spark clusters
- supports [different context per user / note](../usage/interpreter/interpreter_binding_mode.html)
- sharing variables among PySpark, SparkR and Spark through [ZeppelinContext](../interpreter/spark.html#zeppelincontext)
- [Livy Interpreter](../interpreter/livy.html)
<br/>
For the further information about Spark support in Zeppelin, please check
- [Spark Interpreter](../interpreter/spark.html)

View file

@ -0,0 +1,64 @@
---
layout: page
title: "SQL with Zeppelin"
description: ""
group: quickstart
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# SQL support in Zeppelin
<div id="toc"></div>
<br/>
The following guides explain how to use Apache Zeppelin that enables you to write in SQL:
- provides [JDBC Interpreter](../interpreter/jdbc.html) which allows you can connect any JDBC data sources seamlessly
* [Postgres](../interpreter/jdbc.html#postgres)
* [MySQL](../interpreter/jdbc.html#mysql)
* [MariaDB](../interpreter/jdbc.html#mariadb)
* [AWS Redshift](../interpreter/jdbc.html#redshift)
* [Apache Hive](../interpreter/jdbc.html#hive)
* [Apache Phoenix](../interpreter/jdbc.html#apache-phoenix)
* [Apache Drill](../interpreter/jdbc.html#apache-drill)
* [Apache Tajo](../interpreter/jdbc.html#apache-tajo)
* and so on
- [Spark Interpreter](../interpreter/spark.html) supports [SparkSQL](http://spark.apache.org/sql/)
- [Python Interpreter](../interpreter/python.html) supports [pandasSQL](../interpreter/python.html#sql-over-pandas-dataframes)
- can create query result including **UI widgets** using [Dynamic Form](../usage/dynamic_form/intro.html)
```sql
%sql
select age, count(1) value
from bank
where age < ${maxAge=30}
group by age
order by age
```
<br/>
For the further information about SQL support in Zeppelin, please check
- [JDBC Interpreter](../interpreter/jdbc.html)
- [Spark Interpreter](../interpreter/spark.html)
- [Python Interpreter](../interpreter/python.html)
- [IgniteSQL Interpreter](../interpreter/ignite.html#ignite-sql-interpreter) for [Apache Ignite](https://ignite.apache.org/)
- [Kylin Interpreter](../interpreter/kylin.html) for [Apache Kylin](http://kylin.apache.org/)

View file

@ -23,7 +23,7 @@ limitations under the License.
<div id="toc"></div>
This tutorial walks you through some of the fundamental Zeppelin concepts. We will assume you have already installed Zeppelin. If not, please see [here](../install/install.html) first.
This tutorial walks you through some of the fundamental Zeppelin concepts. We will assume you have already installed Zeppelin. If not, please see [here](./install.html) first.
Current main backend processing engine of Zeppelin is [Apache Spark](https://spark.apache.org). If you're new to this system, you might want to start by getting an idea of how it processes data to get the most out of Zeppelin.

View file

@ -20,22 +20,22 @@ limitations under the License.
<div class="row">
<div class="col-md-3">
<a href="assets/themes/zeppelin/img/screenshots/sparksql.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/sparksql.png" /></a>
<a href="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/sparksql.png"><img class="thumbnail" src="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/sparksql.png" /></a>
<center>Spark SQL with inline visualization</center>
</div>
<div class="col-md-3">
<a href="assets/themes/zeppelin/img/screenshots/spark.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/spark.png" /></a>
<a href="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/spark.png"><img class="thumbnail" src="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/spark.png" /></a>
<center>Scala code runs with Spark</center>
</div>
<div class="col-md-3">
<a href="assets/themes/zeppelin/img/screenshots/markdown.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/markdown.png" /></a>
<a href="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/markdown.png"><img class="thumbnail" src="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/markdown.png" /></a>
<center>Markdown supported</center>
</div>
</div>
<br />
<div class="row">
<div class="col-md-3">
<a href="assets/themes/zeppelin/img/screenshots/notebook.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/notebook.png" /></a>
<a href="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/notebook.png"><img class="thumbnail" src="{{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/notebook.png" /></a>
<center>Notebook</center>
</div>
<div class="col-md-3">

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Build from Source"
title: "How to Build Zeppelin from source"
description: "How to build Zeppelin from source"
group: install
group: setup/basics
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -19,10 +19,12 @@ limitations under the License.
-->
{% include JB/setup %}
## Building from Source
## How to Build Zeppelin from Source
<div id="toc"></div>
#### 0. Requirements
If you want to build from source, you must first install the following dependencies:
<table class="table-configuration">
@ -47,14 +49,13 @@ If you want to build from source, you must first install the following dependenc
If you haven't installed Git and Maven yet, check the [Build requirements](#build-requirements) section and follow the step by step instructions from there.
####1. Clone the Apache Zeppelin repository
#### 1. Clone the Apache Zeppelin repository
```
git clone https://github.com/apache/zeppelin.git
```
####2. Build source
#### 2. Build source
You can build Zeppelin with following maven command:
@ -69,10 +70,10 @@ If you're unsure about the options, use the same commands that creates official
# update all pom.xml to use scala 2.11
./dev/change_scala_version.sh 2.11
# build zeppelin with all interpreters and include latest version of Apache spark support for local mode.
mvn clean package -DskipTests -Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr -Pscala-2.11
mvn clean package -DskipTests -Pspark-2.0 -Phadoop-2.4 -Pr -Pscala-2.11
```
####3. Done
#### 3. Done
You can directly start Zeppelin by running after successful build:
```bash
@ -82,7 +83,7 @@ You can directly start Zeppelin by running after successful build:
Check [build-profiles](#build-profiles) section for further build options.
If you are behind proxy, follow instructions in [Proxy setting](#proxy-setting-optional) section.
If you're interested in contribution, please check [Contributing to Apache Zeppelin (Code)](../development/howtocontribute.html) and [Contributing to Apache Zeppelin (Website)](../../development/contributewebsite.html).
If you're interested in contribution, please check [Contributing to Apache Zeppelin (Code)](../../development/contribution/how_to_contribute_code.html) and [Contributing to Apache Zeppelin (Website)](../../development/contribution/how_to_contribute_website.html).
### Build profiles
@ -140,23 +141,10 @@ Available profiles are
-Pscala-2.11
```
##### `-Pyarn` (optional)
enable YARN support for local mode
> YARN for local mode is not supported for Spark v1.5.0 or higher. Set `SPARK_HOME` instead.
##### `-Ppyspark` (optional)
enable [PySpark](http://spark.apache.org/docs/latest/api/python/) support for local mode.
##### `-Pr` (optional)
enable [R](https://www.r-project.org/) support with [SparkR](https://spark.apache.org/docs/latest/sparkr.html) integration.
##### `-Psparkr` (optional)
another [R](https://www.r-project.org/) support with [SparkR](https://spark.apache.org/docs/latest/sparkr.html) integration as well as local mode support.
##### `-Pvendor-repo` (optional)
enable 3rd party vendor repository (cloudera)
@ -188,14 +176,14 @@ Here are some examples with several options:
```bash
# build with spark-2.1, scala-2.11
./dev/change_scala_version.sh 2.11
mvn clean package -Pspark-2.1 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pscala-2.11 -DskipTests
mvn clean package -Pspark-2.1 -Phadoop-2.4 -Pscala-2.11 -DskipTests
# build with spark-2.0, scala-2.11
./dev/change_scala_version.sh 2.11
mvn clean package -Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pscala-2.11 -DskipTests
mvn clean package -Pspark-2.0 -Phadoop-2.4 -Pscala-2.11 -DskipTests
# build with spark-1.6, scala-2.10
mvn clean package -Pspark-1.6 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -DskipTests
mvn clean package -Pspark-1.6 -Phadoop-2.4 -DskipTests
# spark-cassandra integration
mvn clean package -Pcassandra-spark-1.5 -Dhadoop.version=2.6.0 -Phadoop-2.6 -DskipTests -DskipTests
@ -210,7 +198,7 @@ mvn clean package -Pspark-1.5 -Pmapr50 -DskipTests
Ignite Interpreter
```bash
mvn clean package -Dignite.version=1.8.0 -DskipTests
mvn clean package -Dignite.version=1.9.0 -DskipTests
```
Scalding Interpreter
@ -328,10 +316,10 @@ mvn clean package -Pbuild-distr
To build a distribution with specific profiles, run:
```sh
mvn clean package -Pbuild-distr -Pspark-1.5 -Phadoop-2.4 -Pyarn -Ppyspark
mvn clean package -Pbuild-distr -Pspark-1.5 -Phadoop-2.4
```
The profiles `-Pspark-1.5 -Phadoop-2.4 -Pyarn -Ppyspark` can be adjusted if you wish to build to a specific spark versions, or omit support such as `yarn`.
The profiles `-Pspark-1.5 -Phadoop-2.4` can be adjusted if you wish to build to a specific spark versions.
The archive is generated under _`zeppelin-distribution/target`_ directory

View file

@ -0,0 +1,34 @@
---
layout: page
title: "Multi-user Support"
description: ""
group: setup/basics
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Multi-user Support
<div id="toc"></div>
This page describes about multi-user support.
- multiple users login / logout using [Shiro Authentication](../setup/security/shiro_authentication.html)
- managing [Notebook Permission](../setup/security/notebook_authorization.html)
- how to setup [impersonation for interpreters](../../usage/interpreter/user_impersonation.html)
- different contexts per user / note using [Interpreter Binding Mode](../../usage/interpreter/interpreter_binding_mode.html)
- a paragraph in a notebook can be [Personalized](../../usage/other_features/personalized_mode.html)
- propagates changes in notebooks through websocket in real-time

View file

@ -2,7 +2,7 @@
layout: page
title: "Apache Zeppelin on CDH"
description: "This document will guide you how you can build and configure the environment on CDH with Apache Zeppelin using docker scripts."
group: install
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -85,16 +85,16 @@ export SPARK_HOME=[your_spark_home_path]
Don't forget to set Spark `master` as `yarn-client` in Zeppelin **Interpreters** setting page like below.
<img src="../assets/themes/zeppelin/img/docs-img/zeppelin_yarn_conf.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/zeppelin_yarn_conf.png" />
### 5. Run Zeppelin with Spark interpreter
After running a single paragraph with Spark interpreter in Zeppelin,
<img src="../assets/themes/zeppelin/img/docs-img/zeppelin_with_cdh.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/zeppelin_with_cdh.png" />
<br/>
browse `http://<hostname>:8088/cluster/apps` to check Zeppelin application is running well or not.
<img src="../assets/themes/zeppelin/img/docs-img/cdh_yarn_applications.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/cdh_yarn_applications.png" />

View file

@ -2,7 +2,7 @@
layout: page
title: "Apache Zeppelin Releases Docker Images"
description: "This document contains instructions about making docker containers for Zeppelin. It mainly provides guidance into how to create, publish and run docker images for zeppelin releases."
group: install
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -19,7 +19,7 @@ limitations under the License.
-->
{% include JB/setup %}
# Apache Zeppelin Releases Docker Images
# Docker Image for Apache Zeppelin Releases
<div id="toc"></div>
@ -27,44 +27,35 @@ limitations under the License.
This document contains instructions about making docker containers for Zeppelin. It mainly provides guidance into how to create, publish and run docker images for zeppelin releases.
## Quick Start
### Installing Docker
You need to [install docker](https://docs.docker.com/engine/installation/) on your machine.
### Creating and Publishing Zeppelin docker image
* In order to be able to create and/or publish an image, you need to set the **DockerHub** credentials `DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_EMAIL` variables as environment variables.
* To create an image for some release use :
`create_release.sh <release-version> <git-tag>`.
* To publish the created image use :
`publish_release.sh <release-version> <git-tag>`
### Running a Zeppelin docker image
* To start Zeppelin, you need to pull the zeppelin release image:
```
docker pull ${DOCKER_USERNAME}/zeppelin-release:<release-version>
docker run --rm -it -p 7077:7077 -p 8080:8080 ${DOCKER_USERNAME}/zeppelin-release:<release-version> -c bash
```
* Then a docker container will start with a Zeppelin release on path :
`/usr/local/zeppelin/`
* Run zeppelin inside docker:
```
/usr/local/zeppelin/bin/zeppelin.sh
```
* To Run Zeppelin in daemon mode
Mounting logs and notebooks zeppelin to folders on your host machine
### Running docker image
```
docker run -p 7077:7077 -p 8080:8080 --privileged=true -v $PWD/logs:/logs -v $PWD/notebook:/notebook \
-e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
-e ZEPPELIN_LOG_DIR='/logs' \
-d ${DOCKER_USERNAME}/zeppelin-release:<release-version> \
/usr/local/zeppelin/bin/zeppelin.sh
docker run -p 8080:8080 --rm --name zeppelin apache/zeppelin:<release-version>
```
* Zeppelin will run at `http://localhost:8080`.
If you want to specify `logs` and `notebook` dir,
```
docker run -p 8080:8080 --rm \
-v $PWD/logs:/logs \
-v $PWD/notebook:/notebook \
-e ZEPPELIN_LOG_DIR='/logs' \
-e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
--name zeppelin apache/zeppelin:<release-version> # e.g '0.7.1'
```
### Building dockerfile locally
```
cd $ZEPPELIN_HOME
cd scripts/docker/zeppelin/bin
docker build -t my-zeppelin:my-tag ./
```

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Install Zeppelin with Flink and Spark in cluster mode"
description: "Tutorial is valid for Spark 1.6.x and Flink 1.1.2"
group: tutorial
description: ""
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -100,7 +100,7 @@ sudo ln -s /usr/local/apache-maven-3.3.9/bin/mvn /usr/bin/mvn
```
### Installing Zeppelin
This provides a quick overview of Zeppelin installation from source, however the reader is encouraged to review the [Zeppelin Installation Guide](../install/install.html)
This provides a quick overview of Zeppelin installation from source, however the reader is encouraged to review the [Zeppelin Installation Guide](../../quickstart/install.html)
From the command prompt:
Clone Zeppelin.
@ -130,12 +130,11 @@ mvn clean package -DskipTests -Pspark-1.6 -Dflink.version=1.1.3 -Pscala-2.10
-`-Pscala-2.10` tells maven to build with Scala v2.10.
**Note:** You may wish to include additional build flags such as `-Ppyspark` or `-Psparkr`. See [the build section of github for more details](https://github.com/apache/zeppelin#build).
**Note:** You can build against any version of Spark that has a Zeppelin build profile available. The key is to make sure you check out the matching version of Spark to build. At the time of this writing, Spark 1.6 was the most recent Spark version available.
**Note:** On build failures. Having installed Zeppelin close to 30 times now, I will tell you that sometimes the build fails for seemingly no reason.
As long as you didn't edit any code, it is unlikely the build is failing because of something you did. What does tend to happen, is some dependency that maven is trying to download is unreachable. If your build fails on this step here are some tips:
- Don't get discouraged.
- Scroll up and read through the logs. There will be clues there.
- Retry (that is, run the `mvn clean package -DskipTests -Pspark-1.6` again)
@ -154,7 +153,7 @@ Use `ifconfig` to determine the host machine's IP address. If you are not famili
Open a web-browser on a machine connected to the same network as the host (or in the host operating system if using a virtual machine). Navigate to http://`yourip`:8080, where yourip is the IP address you found in `ifconfig`.
See the [Zeppelin tutorial](../tutorial/tutorial.md) for basic Zeppelin usage. It is also advised that you take a moment to check out the tutorial notebook that is included with each Zeppelin install, and to familiarize yourself with basic notebook functionality.
See the [Zeppelin tutorial](../../quickstart/tutorial.html) for basic Zeppelin usage. It is also advised that you take a moment to check out the tutorial notebook that is included with each Zeppelin install, and to familiarize yourself with basic notebook functionality.
##### Flink Test
Create a new notebook named "Flink Test" and copy and paste the following code.
@ -292,7 +291,7 @@ build-target/bin/start-cluster.sh
In a browser, navigate to http://`yourip`:8082 to see the Flink Web-UI. Click on 'Task Managers' in the left navigation bar. Ensure there is at least one Task Manager present.
<center>![alt text](../assets/themes/zeppelin/img/screenshots/flink-webui.png "The Flink Web-UI")</center>
<center>![alt text]({{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/flink-webui.png "The Flink Web-UI")</center>
If no task managers are present, restart the Flink cluster with the following commands:
@ -370,7 +369,7 @@ spark/sbin/start-master.sh --webui-port 8082
Open a browser and navigate to http://`yourip`:8082 to ensure the Spark master is running.
<center>![alt text](../assets/themes/zeppelin/img/screenshots/spark-master-webui1.png "It should look like this...")</center>
<center>![alt text]({{BASE_PATH}}/assets/themes/zeppelin/img/screenshots/spark-master-webui1.png "It should look like this...")</center>
Toward the top of the page there will be a *URL*: spark://`yourhost`:7077. Note this URL, the Spark Master URI, it will be needed in subsequent steps.
@ -417,6 +416,6 @@ You should be able check the Flink and Spark webuis (at something like http://`y
### Next Steps
Check out the [tutorial](./tutorial.md) for more cool things you can do with your new toy!
Check out the [tutorial](../../quickstart/tutorial.html) for more cool things you can do with your new toy!
[Join the community](http://zeppelin.apache.org/community.html), ask questions and contribute! Every little bit helps.

View file

@ -2,7 +2,7 @@
layout: page
title: "Apache Zeppelin on Spark cluster mode"
description: "This document will guide you how you can build and configure the environment on 3 types of Spark cluster manager(Standalone, Hadoop Yarn, Apache Mesos) with Apache Zeppelin using docker scripts."
group: install
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -61,12 +61,12 @@ Note that `sparkmaster` hostname used here to run docker container should be def
### 3. Configure Spark interpreter in Zeppelin
Set Spark master as `spark://<hostname>:7077` in Zeppelin **Interpreters** setting page.
<img src="../assets/themes/zeppelin/img/docs-img/standalone_conf.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/standalone_conf.png" />
### 4. Run Zeppelin with Spark interpreter
After running single paragraph with Spark interpreter in Zeppelin, browse `https://<hostname>:8080` and check whether Spark cluster is running well or not.
<img src="../assets/themes/zeppelin/img/docs-img/spark_ui.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/spark_ui.png" />
You can also simply verify that Spark is running well in Docker with below command.
@ -139,12 +139,12 @@ export SPARK_HOME=[your_spark_home_path]
Don't forget to set Spark `master` as `yarn-client` in Zeppelin **Interpreters** setting page like below.
<img src="../assets/themes/zeppelin/img/docs-img/zeppelin_yarn_conf.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/zeppelin_yarn_conf.png" />
### 5. Run Zeppelin with Spark interpreter
After running a single paragraph with Spark interpreter in Zeppelin, browse `http://<hostname>:8088/cluster/apps` and check Zeppelin application is running well or not.
<img src="../assets/themes/zeppelin/img/docs-img/yarn_applications.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/yarn_applications.png" />
@ -201,13 +201,13 @@ export SPARK_HOME=[PATH OF SPARK HOME]
Don't forget to set Spark `master` as `mesos://127.0.1.1:5050` in Zeppelin **Interpreters** setting page like below.
<img src="../assets/themes/zeppelin/img/docs-img/zeppelin_mesos_conf.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/zeppelin_mesos_conf.png" />
### 5. Run Zeppelin with Spark interpreter
After running a single paragraph with Spark interpreter in Zeppelin, browse `http://<hostname>:5050/#/frameworks` and check Zeppelin application is running well or not.
<img src="../assets/themes/zeppelin/img/docs-img/mesos_frameworks.png" />
<img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/mesos_frameworks.png" />
### Troubleshooting for Spark on Mesos

View file

@ -2,7 +2,7 @@
layout: page
title: "Apache Zeppelin on Vagrant Virtual Machine"
description: "Apache Zeppelin provides a script for running a virtual machine for development through Vagrant. The script will create a virtual machine with core dependencies pre-installed, required for developing Apache Zeppelin."
group: install
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -110,7 +110,7 @@ This assumes you've already cloned the project either on the host machine in the
```
cd /zeppelin
mvn clean package -Pspark-1.6 -Ppyspark -Phadoop-2.4 -Psparkr -DskipTests
mvn clean package -Pspark-1.6 -Phadoop-2.4 -DskipTests
./bin/zeppelin-daemon.sh start
```

View file

@ -2,7 +2,7 @@
layout: page
title: "Install Zeppelin to connect with existing YARN cluster"
description: "This page describes how to pre-configure a bare metal node, configure Apache Zeppelin and connect it to existing YARN cluster running Hortonworks flavour of Hadoop."
group: install
group: setup/deployment
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");

View file

@ -2,7 +2,7 @@
layout: page
title: "Apache Zeppelin Configuration"
description: "This page will guide you to configure Apache Zeppelin using either environment variables or Java properties. Also, you can configure SSL for Zeppelin."
group: install
group: setup/operation
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -26,10 +26,11 @@ limitations under the License.
## Zeppelin Properties
There are two locations you can configure Apache Zeppelin.
* **Environment variables** can be defined `conf/zeppelin-env.sh`(`conf\zeppelin-env.cmd` for Windows).
* **Environment variables** can be defined `conf/zeppelin-env.sh`(`conf\zeppelin-env.cmd` for Windows).
* **Java properties** can ba defined in `conf/zeppelin-site.xml`.
If both are defined, then the **environment variables** will take priority.
> Mouse hover on each property and click <i class="fa fa-link fa-flip-horizontal"></i> then you can get a link for that.
<table class="table-configuration">
<tr>
@ -39,206 +40,208 @@ If both are defined, then the **environment variables** will take priority.
<th class="col-md-4">Description</th>
</tr>
<tr>
<td>ZEPPELIN_PORT</td>
<td>zeppelin.server.port</td>
<td><h6 class="properties">ZEPPELIN_PORT</h6></td>
<td><h6 class="properties">zeppelin.server.port</h6></td>
<td>8080</td>
<td>Zeppelin server port</td>
<td>Zeppelin server port </br>
<span style="font-style:italic; color: gray"> Note: Please make sure you're not using the same port with
<a href="https://zeppelin.apache.org/contribution/webapplication.html#dev-mode" target="_blank">Zeppelin web application development port</a> (default: 9000).</span></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_PORT</td>
<td>zeppelin.server.ssl.port</td>
<td><h6 class="properties">ZEPPELIN_SSL_PORT</h6></td>
<td><h6 class="properties">zeppelin.server.ssl.port</h6></td>
<td>8443</td>
<td>Zeppelin Server ssl port (used when ssl environment/property is set to true)</td>
</tr>
<tr>
<td>ZEPPELIN_MEM</td>
<td><h6 class="properties">ZEPPELIN_MEM</h6></td>
<td>N/A</td>
<td>-Xmx1024m -XX:MaxPermSize=512m</td>
<td>JVM mem options</td>
</tr>
<tr>
<td>ZEPPELIN_INTP_MEM</td>
<td><h6 class="properties">ZEPPELIN_INTP_MEM</h6></td>
<td>N/A</td>
<td>ZEPPELIN_MEM</td>
<td>JVM mem options for interpreter process</td>
</tr>
<tr>
<td>ZEPPELIN_JAVA_OPTS</td>
<td><h6 class="properties">ZEPPELIN_JAVA_OPTS</h6></td>
<td>N/A</td>
<td></td>
<td>JVM options</td>
</tr>
<tr>
<td>ZEPPELIN_ALLOWED_ORIGINS</td>
<td>zeppelin.server.allowed.origins</td>
<td><h6 class="properties">ZEPPELIN_ALLOWED_ORIGINS</h6></td>
<td><h6 class="properties">zeppelin.server.allowed.origins</h6></td>
<td>*</td>
<td>Enables a way to specify a ',' separated list of allowed origins for REST and websockets. <br /> e.g. http://localhost:8080 </td>
<td>Enables a way to specify a ',' separated list of allowed origins for REST and websockets. <br /> e.g. http://localhost:8080</td>
</tr>
<tr>
<td>N/A</td>
<td>zeppelin.anonymous.allowed</td>
<td><h6 class="properties">zeppelin.anonymous.allowed</h6></td>
<td>true</td>
<td>The anonymous user is allowed by default.</td>
</tr>
<tr>
<td>ZEPPELIN_SERVER_CONTEXT_PATH</td>
<td>zeppelin.server.context.path</td>
<td><h6 class="properties">ZEPPELIN_SERVER_CONTEXT_PATH</h6></td>
<td><h6 class="properties">zeppelin.server.context.path</h6></td>
<td>/</td>
<td>Context path of the web application</td>
</tr>
<tr>
<td>ZEPPELIN_SSL</td>
<td>zeppelin.ssl</td>
<td><h6 class="properties">ZEPPELIN_SSL</h6></td>
<td><h6 class="properties">zeppelin.ssl</h6></td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_CLIENT_AUTH</td>
<td>zeppelin.ssl.client.auth</td>
<td><h6 class="properties">ZEPPELIN_SSL_CLIENT_AUTH</h6></td>
<td><h6 class="properties">zeppelin.ssl.client.auth</h6></td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_KEYSTORE_PATH</td>
<td>zeppelin.ssl.keystore.path</td>
<td><h6 class="properties">ZEPPELIN_SSL_KEYSTORE_PATH</h6></td>
<td><h6 class="properties">zeppelin.ssl.keystore.path</h6></td>
<td>keystore</td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_KEYSTORE_TYPE</td>
<td>zeppelin.ssl.keystore.type</td>
<td><h6 class="properties">ZEPPELIN_SSL_KEYSTORE_TYPE</h6></td>
<td><h6 class="properties">zeppelin.ssl.keystore.type</h6></td>
<td>JKS</td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_KEYSTORE_PASSWORD</td>
<td>zeppelin.ssl.keystore.password</td>
<td><h6 class="properties">ZEPPELIN_SSL_KEYSTORE_PASSWORD</h6></td>
<td><h6 class="properties">zeppelin.ssl.keystore.password</h6></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_KEY_MANAGER_PASSWORD</td>
<td>zeppelin.ssl.key.manager.password</td>
<td><h6 class="properties">ZEPPELIN_SSL_KEY_MANAGER_PASSWORD</h6></td>
<td><h6 class="properties">zeppelin.ssl.key.manager.password</h6></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_TRUSTSTORE_PATH</td>
<td>zeppelin.ssl.truststore.path</td>
<td><h6 class="properties">ZEPPELIN_SSL_TRUSTSTORE_PATH</h6></td>
<td><h6 class="properties">zeppelin.ssl.truststore.path</h6></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_TRUSTSTORE_TYPE</td>
<td>zeppelin.ssl.truststore.type</td>
<td><h6 class="properties">ZEPPELIN_SSL_TRUSTSTORE_TYPE</h6></td>
<td><h6 class="properties">zeppelin.ssl.truststore.type</h6></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_SSL_TRUSTSTORE_PASSWORD</td>
<td>zeppelin.ssl.truststore.password</td>
<td><h6 class="properties">ZEPPELIN_SSL_TRUSTSTORE_PASSWORD</h6></td>
<td><h6 class="properties">zeppelin.ssl.truststore.password</h6></td>
<td></td>
<td></td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_HOMESCREEN</td>
<td>zeppelin.notebook.homescreen</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_HOMESCREEN</h6></td>
<td><h6 class="properties">zeppelin.notebook.homescreen</h6></td>
<td></td>
<td>Display note IDs on the Apache Zeppelin homescreen <br />e.g. 2A94M5J1Z</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE</td>
<td>zeppelin.notebook.homescreen.hide</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE</h6></td>
<td><h6 class="properties">zeppelin.notebook.homescreen.hide</h6></td>
<td>false</td>
<td>Hide the note ID set by <code>ZEPPELIN_NOTEBOOK_HOMESCREEN</code> on the Apache Zeppelin homescreen. <br />For the further information, please read <a href="../manual/notebookashomepage.html">Customize your Zeppelin homepage</a>.</td>
<td>Hide the note ID set by <code>ZEPPELIN_NOTEBOOK_HOMESCREEN</code> on the Apache Zeppelin homescreen. <br />For the further information, please read <a href="../usage/other_features/customizing_homepage.html">Customize your Zeppelin homepage</a>.</td>
</tr>
<tr>
<td>ZEPPELIN_WAR_TEMPDIR</td>
<td>zeppelin.war.tempdir</td>
<td><h6 class="properties">ZEPPELIN_WAR_TEMPDIR</h6></td>
<td><h6 class="properties">zeppelin.war.tempdir</h6></td>
<td>webapps</td>
<td>Location of the jetty temporary directory</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_DIR</td>
<td>zeppelin.notebook.dir</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_DIR</h6></td>
<td><h6 class="properties">zeppelin.notebook.dir</h6></td>
<td>notebook</td>
<td>The root directory where notebook directories are saved</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_BUCKET</td>
<td>zeppelin.notebook.s3.bucket</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_BUCKET</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.bucket</h6></td>
<td>zeppelin</td>
<td>S3 Bucket where notebook files will be saved</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_USER</td>
<td>zeppelin.notebook.s3.user</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_USER</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.user</h6></td>
<td>user</td>
<td>User name of an S3 bucket<br />e.g. <code>bucket/user/notebook/2A94M5J1Z/note.json</code></td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_ENDPOINT</td>
<td>zeppelin.notebook.s3.endpoint</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_ENDPOINT</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.endpoint</h6></td>
<td>s3.amazonaws.com</td>
<td>Endpoint for the bucket</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_KMS_KEY_ID</td>
<td>zeppelin.notebook.s3.kmsKeyID</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_KMS_KEY_ID</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.kmsKeyID</h6></td>
<td></td>
<td>AWS KMS Key ID to use for encrypting data in S3 (optional)</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_EMP</td>
<td>zeppelin.notebook.s3.encryptionMaterialsProvider</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_EMP</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.encryptionMaterialsProvider</h6></td>
<td></td>
<td>Class name of a custom S3 encryption materials provider implementation to use for encrypting data in S3 (optional)</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_S3_SSE</td>
<td>zeppelin.notebook.s3.sse</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_S3_SSE</h6></td>
<td><h6 class="properties">zeppelin.notebook.s3.sse</h6></td>
<td>false</td>
<td>Save notebooks to S3 with server-side encryption enabled</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING</td>
<td>zeppelin.notebook.azure.connectionString</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING</h6></td>
<td><h6 class="properties">zeppelin.notebook.azure.connectionString</h6></td>
<td></td>
<td>The Azure storage account connection string<br />e.g. <br/><code>DefaultEndpointsProtocol=https;<br/>AccountName=&lt;accountName&gt;;<br/>AccountKey=&lt;accountKey&gt;</code></td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_AZURE_SHARE</td>
<td>zeppelin.notebook.azure.share</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_AZURE_SHARE</h6></td>
<td><h6 class="properties">zeppelin.notebook.azure.share</h6></td>
<td>zeppelin</td>
<td>Azure Share where the notebook files will be saved</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_AZURE_USER</td>
<td>zeppelin.notebook.azure.user</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_AZURE_USER</h6></td>
<td><h6 class="properties">zeppelin.notebook.azure.user</h6></td>
<td>user</td>
<td>Optional user name of an Azure file share<br />e.g. <code>share/user/notebook/2A94M5J1Z/note.json</code></td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_STORAGE</td>
<td>zeppelin.notebook.storage</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_STORAGE</h6></td>
<td><h6 class="properties">zeppelin.notebook.storage</h6></td>
<td>org.apache.zeppelin.notebook.repo.GitNotebookRepo</td>
<td>Comma separated list of notebook storage locations</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC</td>
<td>zeppelin.notebook.one.way.sync</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC</h6></td>
<td><h6 class="properties">zeppelin.notebook.one.way.sync</h6></td>
<td>false</td>
<td>If there are multiple notebook storage locations, should we treat the first one as the only source of truth?</td>
</tr>
<tr>
<td>ZEPPELIN_NOTEBOOK_PUBLIC</td>
<td>zeppelin.notebook.public</td>
<td><h6 class="properties">ZEPPELIN_NOTEBOOK_PUBLIC</h6></td>
<td><h6 class="properties">zeppelin.notebook.public</h6></td>
<td>true</td>
<td>Make notebook public (set only <code>owners</code>) by default when created/imported. If set to <code>false</code> will add <code>user</code> to <code>readers</code> and <code>writers</code> as well, making it private and invisible to other users unless permissions are granted.</td>
</tr>
<tr>
<td>ZEPPELIN_INTERPRETERS</td>
<td>zeppelin.interpreters</td>
<td><h6 class="properties">ZEPPELIN_INTERPRETERS</h6></td>
<td><h6 class="properties">zeppelin.interpreters</h6></td>
<description></description>
<td>org.apache.zeppelin.spark.SparkInterpreter,<br />org.apache.zeppelin.spark.PySparkInterpreter,<br />org.apache.zeppelin.spark.SparkSqlInterpreter,<br />org.apache.zeppelin.spark.DepInterpreter,<br />org.apache.zeppelin.markdown.Markdown,<br />org.apache.zeppelin.shell.ShellInterpreter,<br />
...
@ -249,26 +252,62 @@ If both are defined, then the **environment variables** will take priority.
</td>
</tr>
<tr>
<td>ZEPPELIN_INTERPRETER_DIR</td>
<td>zeppelin.interpreter.dir</td>
<td><h6 class="properties">ZEPPELIN_INTERPRETER_DIR</h6></td>
<td><h6 class="properties">zeppelin.interpreter.dir</h6></td>
<td>interpreter</td>
<td>Interpreter directory</td>
</tr>
<tr>
<td>ZEPPELIN_INTERPRETER_OUTPUT_LIMIT</td>
<td>zeppelin.interpreter.output.limit</td>
<td><h6 class="properties">ZEPPELIN_INTERPRETER_DEP_MVNREPO</h6></td>
<td><h6 class="properties">zeppelin.interpreter.dep.mvnRepo</h6></td>
<td>http://repo1.maven.org/maven2/</td>
<td>Remote principal repository for interpreter's additional dependency loading</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_INTERPRETER_OUTPUT_LIMIT</h6></td>
<td><h6 class="properties">zeppelin.interpreter.output.limit</h6></td>
<td>102400</td>
<td>Output message from interpreter exceeding the limit will be truncated</td>
</tr>
<tr>
<td>ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE</td>
<td>zeppelin.websocket.max.text.message.size</td>
<td>1024000</td>
<td>Size (in characters) of the maximum text message that can be received by websocket.</td>
<td><h6 class="properties">ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT</h6></td>
<td><h6 class="properties">zeppelin.interpreter.connect.timeout</h6></td>
<td>30000</td>
<td>Output message from interpreter exceeding the limit will be truncated</td>
</tr>
<tr>
<td>ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED</td>
<td>zeppelin.server.default.dir.allowed</td>
<td><h6 class="properties">ZEPPELIN_DEP_LOCALREPO</h6></td>
<td><h6 class="properties">zeppelin.dep.localrepo</h6></td>
<td>local-repo</td>
<td>Local repository for dependency loader.<br>ex)visualiztion modules of npm.</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_HELIUM_NODE_INSTALLER_URL</h6></td>
<td><h6 class="properties">zeppelin.helium.node.installer.url</h6></td>
<td>https://nodejs.org/dist/</td>
<td>Remote Node installer url for Helium dependency loader</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_HELIUM_NPM_INSTALLER_URL</h6></td>
<td><h6 class="properties">zeppelin.helium.npm.installer.url</h6></td>
<td>http://registry.npmjs.org/</td>
<td>Remote Npm installer url for Helium dependency loader</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_HELIUM_YARNPKG_INSTALLER_URL</h6></td>
<td><h6 class="properties">zeppelin.helium.yarnpkg.installer.url</h6></td>
<td>https://github.com/yarnpkg/yarn/releases/download/</td>
<td>Remote Yarn package installer url for Helium dependency loader</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE</h6></td>
<td><h6 class="properties">zeppelin.websocket.max.text.message.size</h6></td>
<td>1024000</td>
<td>Size(in characters) of the maximum text message that can be received by websocket.</td>
</tr>
<tr>
<td><h6 class="properties">ZEPPELIN_SERVER_DEFAULT_DIR_ALLOWED</h6></td>
<td><h6 class="properties">zeppelin.server.default.dir.allowed</h6></td>
<td>false</td>
<td>Enable directory listings on server.</td>
</tr>
@ -376,7 +415,7 @@ The following properties needs to be updated in the `zeppelin-site.xml` in order
### Obfuscating Passwords using the Jetty Password Tool
Security best practices advise to not use plain text passwords and Jetty provides a password tool to help obfuscating the passwords used to access the KeyStore and TrustStore.
The Password tool documentation can be found [here](http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html).
After using the tool:

View file

@ -0,0 +1,32 @@
---
layout: page
title: "Proxy Setting in Apache Zeppelin"
description: "Apache Zeppelin supports Helium plugins which fetch required installer packages from remote registry/repositories"
group: security
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Proxy Setting
<div id="toc"></div>
## How to Configure Proxies?
Set `http_proxy` and `https_proxy` env variables. (See [more](https://wiki.archlinux.org/index.php/proxy_settings))
Currently, Proxy is supported only for these features.
- Helium: downloading `helium.json`, installing `npm`, `node`, `yarn`

View file

@ -1,9 +1,15 @@
---
layout: page
title: "Trouble Shooting"
description: ""
group: setup/operation
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -11,5 +17,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<input type="text" class="note-name-query form-control" ng-click="$event.stopPropagation()"
placeholder="&#xf002 Filter" ng-model="$parent.query.q" />
{% include JB/setup %}
# Trouble Shooting
<div id="toc"></div>

View file

@ -2,7 +2,7 @@
layout: page
title: "Manual Zeppelin version upgrade procedure"
description: "This document will guide you through a procedure of manual upgrade your Apache Zeppelin instance to a newer version. Apache Zeppelin keeps backward compatibility for the notebook file format."
group: install
group: setup/operation
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -27,26 +27,19 @@ Basically, newer version of Zeppelin works with previous version notebook direct
So, copying `notebook` and `conf` directory should be enough.
## Instructions
1. Stop Zeppelin
```
bin/zeppelin-daemon.sh stop
```
1. Copy your `notebook` and `conf` directory into a backup directory
1. Download newer version of Zeppelin and Install. See [Install page](./install.html#installation).
1. Copy backup `notebook` and `conf` directory into newer version of Zeppelin `notebook` and `conf` directory
1. Start Zeppelin
```
bin/zeppelin-daemon.sh start
```
1. Stop Zeppelin: `bin/zeppelin-daemon.sh stop`
2. Copy your `notebook` and `conf` directory into a backup directory
3. Download newer version of Zeppelin and Install. See [Install Guide](../../quickstart/install.html#install).
4. Copy backup `notebook` and `conf` directory into newer version of Zeppelin `notebook` and `conf` directory
5. Start Zeppelin: `bin/zeppelin-daemon.sh start`
## Migration Guide
### Upgrading from Zeppelin 0.7 to 0.8
- From 0.8, we recommend to use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` instead of `zeppelin.pyspark.python` as `zeppelin.pyspark.python` only effects driver. You can use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` as using them in spark.
- From 0.8, depending on your device, the keyboard shortcut `Ctrl-L` or `Command-L` which goes to the line somewhere user wants is not supported.
### Upgrading from Zeppelin 0.6 to 0.7
- From 0.7, we don't use `ZEPPELIN_JAVA_OPTS` as default value of `ZEPPELIN_INTP_JAVA_OPTS` and also the same for `ZEPPELIN_MEM`/`ZEPPELIN_INTP_MEM`. If user want to configure the jvm opts of interpreter process, please set `ZEPPELIN_INTP_JAVA_OPTS` and `ZEPPELIN_INTP_MEM` explicitly. If you don't set `ZEPPELIN_INTP_MEM`, Zeppelin will set it to `-Xms1024m -Xmx1024m -XX:MaxPermSize=512m` by default.

View file

@ -1,8 +1,8 @@
---
layout: page
title: "Authentication for NGINX"
title: "HTTP Basic Auth using NGINX"
description: "There are multiple ways to enable authentication in Apache Zeppelin. This page describes HTTP basic auth using NGINX."
group: security
group: setup/security
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
@ -23,7 +23,7 @@ limitations under the License.
<div id="toc"></div>
[Build in authentication mechanism](./shiroauthentication.html) is recommended way for authentication. In case of you want authenticate using NGINX and [HTTP basic auth](https://en.wikipedia.org/wiki/Basic_access_authentication), please read this document.
[Build in authentication mechanism](./shiro_authentication.html) is recommended way for authentication. In case of you want authenticate using NGINX and [HTTP basic auth](https://en.wikipedia.org/wiki/Basic_access_authentication), please read this document.
## HTTP Basic Authentication using NGINX
@ -121,7 +121,7 @@ This instruction based on Ubuntu 14.04 LTS but may work with other OS with few c
1. More security consideration
* Using HTTPS connection with Basic Authentication is highly recommended since basic auth without encryption may expose your important credential information over the network.
* Using [Shiro Security feature built-into Zeppelin](./shiroauthentication.html) is recommended if you prefer all-in-one solution for authentication but NGINX may provides ad-hoc solution for re-use authentication served by your system's NGINX server or in case of you need to separate authentication from zeppelin server.
* Using [Shiro Security feature built-into Zeppelin](./shiro_authentication.html) is recommended if you prefer all-in-one solution for authentication but NGINX may provides ad-hoc solution for re-use authentication served by your system's NGINX server or in case of you need to separate authentication from zeppelin server.
* It is recommended to isolate direct connection to Zeppelin server from public internet or external services to secure your zeppelin instance from unexpected attack or problems caused by public zone.
## Another option

Some files were not shown because too many files have changed in this diff Show more