Repository: ambari
Updated Branches:
  refs/heads/trunk 77e8dee9c -> 348326af8


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/348326af
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/348326af
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/348326af

Branch: refs/heads/trunk
Commit: 348326af8374880be69870e16be19997053f2635
Parents: 77e8dee
Author: Alejandro Fernandez <afernan...@hortonworks.com>
Authored: Wed Jan 18 17:31:53 2017 -0800
Committer: Alejandro Fernandez <afernan...@hortonworks.com>
Committed: Wed Jan 18 17:31:53 2017 -0800

----------------------------------------------------------------------
 .../services/SPARK/configuration/livy-conf.xml  |  8 ++
 .../services/SPARK/configuration/livy-env.xml   | 96 ++++++++++++++++++++
 .../SPARK2/configuration/livy2-conf.xml         |  8 ++
 .../services/SPARK2/configuration/livy2-env.xml |  2 +
 4 files changed, 114 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/348326af/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 b7bfa73..23583c0 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
@@ -70,4 +70,12 @@
      </description>
      <on-ambari-upgrade add="true"/>
   </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/348326af/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/348326af/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 457869d..231ef70 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
@@ -78,5 +78,13 @@
         </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="false"/>
+    </property>
 </configuration>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/348326af/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 afb1d17..2f865b7 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}}

Reply via email to