~bigdata-dev/charms/trusty/hdp-accumulo/trunk

« back to all changes in this revision

Viewing changes to hooks/zookeeper-relation-changed

  • Committer: amir sanjar
  • Date: 2014-10-02 23:42:56 UTC
  • Revision ID: amir.sanjar@canonical.com-20141002234256-i14jaqm93ajlw15u
workaround for a accumulo hdfs issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        if v.find('localhost') != -1: 
39
39
            setHadoopConfigXML(accumuli_env_script_path, "instance.zookeeper.host", ZK_address+":2181")
40
40
        else:
41
 
            setHadoopConfigXML(accumuli_env_script_path, "instance.zookeeper.host", v+","+ZK_address+":2181")
42
 
            fileSetKV(bash_rc, "ZOOKEEPER_HOSTS=", v+","+ZK_address+":2181")
 
41
            ########################################################
 
42
            # This is a workaround - accumula requires all configuration
 
43
            # files within the cluster to be identical - even the order of ZK hostnames
 
44
            #######################################################
 
45
            zk_hosts = v+","+ZK_address+":2181"
 
46
            l = zk_hosts.split(",")
 
47
            l.sort()
 
48
            zk_hosts = ",".join(l)
 
49
            setHadoopConfigXML(accumuli_env_script_path, "instance.zookeeper.host", zk_hosts)
 
50
            fileSetKV(bash_rc, "ZOOKEEPER_HOSTS=", zk_hosts)
43
51
            
44
52
     
45
53