confmaster/src/main/java/com/navercorp/nbasearc/confmaster/server/command/ConfmasterService.java
public void updateZNodeDirectoryStructure()
            throws NodeExistsException, MgmtZooKeeperException {
        List<Cluster> clusterList = container.getAllCluster();
        for (Cluster cluster : clusterList) {
            String affinityPath = PathUtil.pathOfGwAffinity(cluster.getName());
            if (zk.isExists(affinityPath)) {
                return;
            }

            String gatewayAffinity = cluster.getGatewayAffinity(context);

            try {
                zk.createPersistentZNode(affinityPath,
                        gatewayAffinity.getBytes(config.getCharset()));
            } catch (UnsupportedEncodingException e) {
                throw new AssertionError(config.getCharset() + " is unkown.");
            }
        }
    }
public void updateZNodeDirectoryStructure()
            throws NodeExistsException, MgmtZooKeeperException {
        List<Cluster> clusterList = container.getAllCluster();
        for (Cluster cluster : clusterList) {
            String affinityPath = PathUtil.pathOfGwAffinity(cluster.getName());
            if (zk.isExists(affinityPath)) {
                return;
            }

            String gatewayAffinity = cluster.getGatewayAffinity(context);

            try {
                zk.createPersistentZNode(affinityPath,
                        gatewayAffinity.getBytes(config.getCharset()));
            } catch (UnsupportedEncodingException e) {
                throw new AssertionError(config.getCharset() + " is unkown.");
            }
        }
    }
/*
@date 20140812
@version 1.2 ~ 1.3
@desc Gateway Affinity 적용을 위해 주키퍼의 znode 구조에 변경이 생겼다. 기존 버전에는 이 노드가 없으니까 만들어주자.