You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2017/02/14 19:19:29 UTC
ambari git commit: AMBARI-19417. Enable hiveContext in Livy for HDP
2.6 (Jeff Zhang via alejandro)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 fcb93f1a7 -> 98dda7fa8
AMBARI-19417. Enable hiveContext in Livy for HDP 2.6 (Jeff Zhang via alejandro)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98dda7fa
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98dda7fa
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98dda7fa
Branch: refs/heads/branch-2.5
Commit: 98dda7fa8efa2c28475b20a8c80162dbe66f9cde
Parents: fcb93f1
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Wed Jan 18 17:31:53 2017 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Tue Feb 14 11:08:57 2017 -0800
----------------------------------------------------------------------
.../services/SPARK/configuration/livy-conf.xml | 8 ++
.../services/SPARK/configuration/livy-env.xml | 96 ++++++++++++++++++++
.../SPARK2/configuration/livy2-conf.xml | 10 +-
.../services/SPARK2/configuration/livy2-env.xml | 2 +
4 files changed, 115 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/98dda7fa/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-conf.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-conf.xml
index 315ad66..c5ef998 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-conf.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-conf.xml
@@ -94,4 +94,12 @@
</description>
<on-ambari-upgrade add="false"/>
</property>
+ <property>
+ <name>livy.repl.enableHiveContext</name>
+ <value>true</value>
+ <description>
+ Whether to enable HiveContext in livy interpreter
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/98dda7fa/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-env.xml
new file mode 100644
index 0000000..23a4cc1
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/configuration/livy-env.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_adding_forbidden="true">
+ <property>
+ <name>livy_user</name>
+ <display-name>Livy User</display-name>
+ <value>livy</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>livy_group</name>
+ <display-name>Livy Group</display-name>
+ <value>livy</value>
+ <property-type>GROUP</property-type>
+ <description>livy group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>livy_log_dir</name>
+ <value>/var/log/livy</value>
+ <description>Livy Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>livy_pid_dir</name>
+ <value>/var/run/livy</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spark_home</name>
+ <value>/usr/hdp/current/spark-client</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <!-- livy-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for livy-env.sh file</description>
+ <value>
+ #!/usr/bin/env bash
+
+ # - SPARK_HOME Spark which you would like to use in livy
+ # - SPARK_CONF_DIR Directory containing the Spark configuration to use.
+ # - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
+ # - LIVY_LOG_DIR Where log files are stored. (Default: ${LIVY_HOME}/logs)
+ # - LIVY_PID_DIR Where the pid file is stored. (Default: /tmp)
+ # - LIVY_SERVER_JAVA_OPTS Java Opts for running livy server (You can set jvm related setting here, like jvm memory/gc algorithm and etc.)
+ export SPARK_HOME=/usr/hdp/current/spark-client
+ export SPARK_CONF_DIR=/etc/spark/conf
+ export JAVA_HOME={{java_home}}
+ export HADOOP_CONF_DIR=/etc/hadoop/conf
+ export LIVY_LOG_DIR={{livy_log_dir}}
+ export LIVY_PID_DIR={{livy_pid_dir}}
+ export LIVY_SERVER_JAVA_OPTS="-Xmx2g"
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/98dda7fa/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml
index 0b51fdd..428ab44 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml
@@ -101,6 +101,14 @@
Where Livy should store state for recovery.
</description>
<on-ambari-upgrade add="false"/>
- </property>
+ </property>
+ <property>
+ <name>livy.repl.enableHiveContext</name>
+ <value>true</value>
+ <description>
+ Whether to enable HiveContext in livy interpreter
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/98dda7fa/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-env.xml
index 6ba9141..751d005 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-env.xml
@@ -75,11 +75,13 @@
#!/usr/bin/env bash
# - SPARK_HOME Spark which you would like to use in livy
+ # - SPARK_CONF_DIR Directory containing the Spark configuration to use.
# - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
# - LIVY_LOG_DIR Where log files are stored. (Default: ${LIVY_HOME}/logs)
# - LIVY_PID_DIR Where the pid file is stored. (Default: /tmp)
# - LIVY_SERVER_JAVA_OPTS Java Opts for running livy server (You can set jvm related setting here, like jvm memory/gc algorithm and etc.)
export SPARK_HOME=/usr/hdp/current/spark2-client
+ export SPARK_CONF_DIR=/etc/spark2/conf
export JAVA_HOME={{java_home}}
export HADOOP_CONF_DIR=/etc/hadoop/conf
export LIVY_LOG_DIR={{livy2_log_dir}}