keith-turner commented on a change in pull request #270: Support Accumulo 
installs on Microsoft Azure
URL: https://github.com/apache/fluo-muchos/pull/270#discussion_r314089384
 
 

 ##########
 File path: lib/muchos/config.py
 ##########
 @@ -130,17 +134,30 @@ def force_format(self):
                 return 'no'
         return retval
 
-    def worker_data_dirs(self):
+    def data_dirs_common(self, nodeType):
+        data_dirs = []
+
         if self.get_cluster_type() == 'ec2':
-            return self.node_type_map()['worker']['mounts']
+            data_dirs = self.node_type_map()[nodeType]['mounts']
         elif self.get_cluster_type() == 'existing':
-            return self.get('existing', 'data_dirs').split(",")
+            data_dirs = self.get('existing', 'data_dirs').split(",")
+        elif self.get_cluster_type() == 'azure':
+            num_disks = int(self.get("azure","numdisks"))
+            range_var = num_disks + 1
+            for diskNum in range(1, range_var):
+                data_dirs.append(self.get("azure","mount_root") + str(diskNum))
+
+        # we need a minimum of 3 "data directories" in order for the HA 
changes to work correctly. If the number of disks specified is < 3, stub the 
balance entries.
+        for tmpId in range (len(data_dirs) - 1, 2):
 
 Review comment:
   >  I believe post this PR, we will make the entire Hadoop / ZK HA 
configuration switchable wherein we will restore the old behavior if there is a 
non-HA config selected.
   
   I would be in favor of that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to