public void run() {
   try {
     if (isRegistered()) {
       register();
     }
   } catch (IOException e) {
     Log.info("Failed to reRegister " + e.getMessage());
   }
 }
 public void init() {
   if (zk != null) {
     try {
       zk.close();
     } catch (InterruptedException e) {
       logger.warn("can not interrupted ", e);
     }
   }
   zk = ZooKeeperFactory.newZooKeeper(watcher);
 }