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 2015/04/29 06:03:41 UTC
ambari git commit: Ambari-10815. Ambari pre-upload script incorrectly
assumes that folders should not exist (Ivan Mitic via smohanty)
Repository: ambari
Updated Branches:
refs/heads/trunk 79b269d8e -> 69ab430fb
Ambari-10815. Ambari pre-upload script incorrectly assumes that folders should not exist (Ivan Mitic via smohanty)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69ab430f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69ab430f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69ab430f
Branch: refs/heads/trunk
Commit: 69ab430fb8f4d80b6650d7af60946db47626e7aa
Parents: 79b269d
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Tue Apr 28 21:03:07 2015 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Tue Apr 28 21:03:07 2015 -0700
----------------------------------------------------------------------
.../src/main/resources/scripts/Ambaripreupload.py | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/69ab430f/ambari-server/src/main/resources/scripts/Ambaripreupload.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index 1c882cd..911aed4 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -188,19 +188,6 @@ def copy_tarballs_to_hdfs(source, dest, hdp_select_component_name, component_use
path='/bin'
)
- #Check if destination folder already exists
- does_hdfs_dir_exist = False
- does_hdfs_file_exist_cmd = "fs -ls %s" % os.path.dirname(destination_file)
- try:
- ExecuteHadoop(does_hdfs_file_exist_cmd,
- user=component_user,
- logoutput=True,
- conf_dir=params.hadoop_conf_dir,
- bin_dir=params.hadoop_bin_dir
- )
- does_hdfs_dir_exist = True
- except Fail:
- pass
does_hdfs_file_exist_cmd = "fs -ls %s" % destination_file
does_hdfs_file_exist = False
@@ -215,7 +202,7 @@ def copy_tarballs_to_hdfs(source, dest, hdp_select_component_name, component_use
except Fail:
pass
- if not does_hdfs_file_exist and not does_hdfs_dir_exist:
+ if not does_hdfs_file_exist:
source_and_dest_pairs = [(component_tar_source_file, destination_file), ]
return _copy_files(source_and_dest_pairs, file_owner, group_owner, kinit_if_needed)
return 1