AMBARI-20285. Spark2 Thrift Server stops due incompletely uploaded 
spark2-hdp-yarn-archive.tar.gz


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 07076bd769c0ce73430af9b79f77b0d021648046
Parents: 0e4819a
Author: Attila Doroszlai <[email protected]>
Authored: Thu Mar 2 15:42:03 2017 +0100
Committer: Attila Doroszlai <[email protected]>
Committed: Fri Mar 3 11:12:41 2017 +0100

----------------------------------------------------------------------
 .../common-services/SPARK2/2.0.0/package/scripts/spark_service.py  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/07076bd7/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
index 12988c8..c8a2b33 100755
--- 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
@@ -41,9 +41,11 @@ def make_tarfile(output_filename, source_dir):
   parent_dir=os.path.dirname(output_filename)
   if not os.path.exists(parent_dir):
     os.makedirs(parent_dir)
+    os.chmod(parent_dir, 0711)
   with closing(tarfile.open(output_filename, "w:gz")) as tar:
     for file in os.listdir(source_dir):
       tar.add(os.path.join(source_dir,file),arcname=file)
+  os.chmod(output_filename, 0644)
 
 
 def spark_service(name, upgrade_type=None, action=None):

Reply via email to