@Override
      public void run() {
        boolean done = false;
        while (!done) {
          for (Map.Entry<String, Task> entry : slm.getTasks().entrySet()) {
            final ServerName worker1 = ServerName.valueOf("worker1,1,1");
            SplitLogTask slt = new SplitLogTask.Done(worker1);
            boolean encounteredZKException = false;
            try {
              ZKUtil.setData(zkw, entry.getKey(), slt.toByteArray());
            } catch (KeeperException e) {
              LOG.warn(e.toString(), e);
              encounteredZKException = true;
            }
            if (!encounteredZKException) {
              done = true;
            }
          }
        }
      }
Test whether the splitlog correctly creates a task in zookeeper
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java