ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-4383. Datanode data directory is not created correctly (Eugene Chekanskiy via aonishuk)
Date Wed, 22 Jan 2014 17:40:43 GMT
Updated Branches:
  refs/heads/trunk 46a80f7a8 -> e84f5368c


AMBARI-4383. Datanode data directory is not created correctly (Eugene
Chekanskiy via aonishuk)


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

Branch: refs/heads/trunk
Commit: e84f5368cc0560d7798e8e86951ede4e86f5b714
Parents: 46a80f7
Author: Andrew Onischuk <aonishuk@hortonworks.com>
Authored: Wed Jan 22 09:39:36 2014 -0800
Committer: Andrew Onischuk <aonishuk@hortonworks.com>
Committed: Wed Jan 22 09:39:36 2014 -0800

----------------------------------------------------------------------
 .../services/HDFS/package/scripts/hdfs_datanode.py | 17 +++++++++--------
 .../1.3.3/services/HDFS/package/scripts/utils.py   |  2 +-
 .../services/HDFS/package/scripts/hdfs_datanode.py | 11 ++++++-----
 .../2.1.1/services/HDFS/package/scripts/utils.py   |  2 +-
 4 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e84f5368/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_datanode.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_datanode.py
index aa7b5e6..b033185 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_datanode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_datanode.py
@@ -30,14 +30,15 @@ def datanode(action=None):
               mode=0750,
               owner=params.hdfs_user,
               group=params.user_group)
-    Directory(os.path.dirname(params.dfs_data_dir),
-              recursive=True,
-              mode=0755)
-    Directory(params.dfs_data_dir,
-              recursive=False,
-              mode=0750,
-              owner=params.hdfs_user,
-              group=params.user_group)
+    for data_dir in params.dfs_data_dir.split(","):
+      Directory(os.path.dirname(data_dir),
+                recursive=True,
+                mode=0755)
+      Directory(data_dir,
+                recursive=False,
+                mode=0750,
+                owner=params.hdfs_user,
+                group=params.user_group)
 
   if action == "start":
     service(

http://git-wip-us.apache.org/repos/asf/ambari/blob/e84f5368/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/utils.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/utils.py
index 058fa66..a67d3b2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/utils.py
@@ -81,7 +81,7 @@ def hdfs_directory(name=None, owner=None, group=None,
   dir_absent_in_stub = format(
     "grep -q '^{name}$' {stub_dir}/{stub_filename} > /dev/null 2>&1; test $? -ne
0")
   record_dir_in_stub = format("echo '{name}' >> {stub_dir}/{stub_filename}")
-  tries = 3
+  tries = 30
   try_sleep = 10
   dfs_check_nn_status_cmd = "true"
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e84f5368/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/hdfs_datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/hdfs_datanode.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/hdfs_datanode.py
index e0b6c39..f7d9f15 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/hdfs_datanode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/hdfs_datanode.py
@@ -30,11 +30,12 @@ def datanode(action=None):
               mode=0750,
               owner=params.hdfs_user,
               group=params.user_group)
-    Directory(params.dfs_data_dir,
-              recursive=True,
-              mode=0755,
-              owner=params.hdfs_user,
-              group=params.user_group)
+    for data_dir in params.dfs_data_dir.split(","):
+      Directory(data_dir,
+                recursive=True,
+                mode=0755,
+                owner=params.hdfs_user,
+                group=params.user_group)
 
   if action == "start":
     service(

http://git-wip-us.apache.org/repos/asf/ambari/blob/e84f5368/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/utils.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/utils.py
index 0c035b4..017a47a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/utils.py
@@ -81,7 +81,7 @@ def hdfs_directory(name=None, owner=None, group=None,
   dir_absent_in_stub = format(
     "grep -q '^{name}$' {stub_dir}/{stub_filename} > /dev/null 2>&1; test $? -ne
0")
   record_dir_in_stub = format("echo '{name}' >> {stub_dir}/{stub_filename}")
-  tries = 3
+  tries = 30
   try_sleep = 10
   dfs_check_nn_status_cmd = "true"
 


Mime
View raw message