ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-17639. Fix Spark Interpreter fails with "HiveException:org.apache.thrift.transport.TTransportException" (Renjith Kamath via pallavkul)
Date Mon, 11 Jul 2016 14:35:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e5350040d -> 8e3b1ff61


AMBARI-17639. Fix Spark Interpreter fails with "HiveException:org.apache.thrift.transport.TTransportException"
(Renjith Kamath via pallavkul)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e3b1ff6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e3b1ff6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e3b1ff6

Branch: refs/heads/trunk
Commit: 8e3b1ff61f2c987fa740b74f8ef099303831379c
Parents: e535004
Author: Pallav Kulshreshtha <pallav.kul@gmail.com>
Authored: Mon Jul 11 20:04:35 2016 +0530
Committer: Pallav Kulshreshtha <pallav.kul@gmail.com>
Committed: Mon Jul 11 20:04:35 2016 +0530

----------------------------------------------------------------------
 .../0.6.0.2.5/package/scripts/master.py         | 16 ++++++--
 .../0.6.0.2.5/package/scripts/params.py         |  1 +
 .../0.6.0.2.5/package/scripts/setup_snapshot.sh | 40 ++------------------
 3 files changed, 16 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8e3b1ff6/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 57082da..88ef49e 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -52,10 +52,7 @@ class Master(Script):
             + params.spark_home + ' >> ' + params.zeppelin_log_file, user=params.zeppelin_user)
 
     # run setup_snapshot.sh
-    Execute(format("{service_packagedir}/scripts/setup_snapshot.sh {zeppelin_dir} "
-                   "{hive_metastore_host} {hive_metastore_port} {hive_server_port} "
-                   "{zeppelin_host} {zeppelin_port} {setup_view} {service_packagedir} "
-                   "{java64_home} >> {zeppelin_log_file}"),
+    Execute(format("{service_packagedir}/scripts/setup_snapshot.sh {zeppelin_dir} {setup_view}
>> {zeppelin_log_file}"),
             user=params.zeppelin_user)
 
   def create_zeppelin_dir(self, params):
@@ -135,6 +132,17 @@ class Master(Script):
     File(format("{params.conf_dir}/log4j.properties"), content=params.log4j_properties_content,
          owner=params.zeppelin_user, group=params.zeppelin_group)
 
+    # copy hive-site.xml
+    hive_site_xml_content = open("/etc/spark/conf/hive-site.xml").read()
+    File(format("{params.conf_dir}/hive-site.xml"), content=hive_site_xml_content,
+         owner=params.zeppelin_user, group=params.zeppelin_group)
+
+    if str(params.hbase_master_hosts[0]):
+      # copy hbase-site.xml
+      hbase_site_xml_content = open("/etc/hbase/conf/hbase-site.xml").read()
+      File(format("{params.conf_dir}/hbase-site.xml"), content=hbase_site_xml_content,
+           owner=params.zeppelin_user, group=params.zeppelin_group)
+
   def stop(self, env):
     import params
     self.create_zeppelin_log_dir(env)

http://git-wip-us.apache.org/repos/asf/ambari/blob/8e3b1ff6/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 85e6fcf..536ffab 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -140,6 +140,7 @@ full_stack_version = default("/commandParams/version", None)
 
 spark_client_version = get_stack_version('spark-client')
 
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
 livy_hosts = default("/clusterHostInfo/livy_server_hosts", [])
 
 livy_livyserver_host = None

http://git-wip-us.apache.org/repos/asf/ambari/blob/8e3b1ff6/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/setup_snapshot.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/setup_snapshot.sh
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/setup_snapshot.sh
index 891fb29..47a6ed9 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/setup_snapshot.sh
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/setup_snapshot.sh
@@ -22,24 +22,9 @@ set -e
 #e.g. /opt/incubator-zeppelin
 export INSTALL_DIR=$1
 
-#e.g. sandbox.hortonworks.com
-export HIVE_METASTORE_HOST=$2
-
-#e.g. 9083
-export HIVE_METASTORE_PORT=$3
-
-#e.g. 10000
-export HIVE_SERVER_PORT=$4
-
-export ZEPPELIN_HOST=$5
-
-export ZEPPELIN_PORT=$6
-
 #if true, will setup Ambari view and import notebooks
-export SETUP_VIEW=$7
+export SETUP_VIEW=$2
 
-export PACKAGE_DIR=$8
-export java64_home=$9
 
 SETUP_VIEW=`awk '{ print tolower($0) }' <<< "$SETUP_VIEW"`
 echo "SETUP_VIEW is $SETUP_VIEW"
@@ -49,35 +34,16 @@ SetupZeppelin () {
   echo "Setting up zeppelin at $INSTALL_DIR"
   cd $INSTALL_DIR
 
-  rm -rf notebook/*
-
-  if [ "$HIVE_METASTORE_HOST" != "0.0.0.0" ]
-  then
-    echo "Hive metastore detected: $HIVE_METASTORE_HOST. Setting up conf/hive-site.xml"
-    echo "<configuration>" > conf/hive-site.xml
-    echo "<property>" >> conf/hive-site.xml
-    echo "   <name>hive.metastore.uris</name>" >> conf/hive-site.xml
-    echo "   <value>thrift://$HIVE_METASTORE_HOST:$HIVE_METASTORE_PORT</value>"
>> conf/hive-site.xml
-    echo "</property>" >> conf/hive-site.xml
-    echo "<property>" >> conf/hive-site.xml
-    echo "   <name>hive.server2.thrift.http.port</name>" >> conf/hive-site.xml
-    echo "   <value>$HIVE_SERVER_PORT</value>" >> conf/hive-site.xml
-    echo "</property>" >> conf/hive-site.xml
-    echo "</configuration>" >> conf/hive-site.xml
-  else
-    echo "HIVE_METASTORE_HOST is $HIVE_METASTORE_HOST: Skipping hive-site.xml setup as Hive
does not seem to be installed"
-  fi
-
   if [[ $SETUP_VIEW == "true" ]]
   then
     echo "Importing notebooks"
     mkdir -p notebook
     cd notebook
     wget https://codeload.github.com/hortonworks-gallery/zeppelin-notebooks/zip/master -O
notebooks.zip
-    unzip notebooks.zip
+    unzip -o notebooks.zip
 
     if [ -d "zeppelin-notebooks-master" ]; then
-      mv zeppelin-notebooks-master/* .
+      yes | cp -rf zeppelin-notebooks-master/* .
       rm -rf zeppelin-notebooks-master
     fi
 


Mime
View raw message