Java 类org.apache.hadoop.hbase.regionserver.TestMasterAddressTracker.NodeCreationListener 实例源码

项目:ditb    文件:TestSplitLogManager.java   
private String submitTaskAndWait(TaskBatch batch, String name) throws KeeperException,
    InterruptedException {
  String tasknode = ZKSplitLog.getEncodedNodeName(zkw, name);
  NodeCreationListener listener = new NodeCreationListener(zkw, tasknode);
  zkw.registerListener(listener);
  ZKUtil.watchAndCheckExists(zkw, tasknode);

  slm.enqueueSplitTask(name, batch);
  assertEquals(1, batch.installed);
  assertTrue(slm.findOrCreateOrphanTask(tasknode).batch == batch);
  assertEquals(1L, tot_mgr_node_create_queued.get());

  LOG.debug("waiting for task node creation");
  listener.waitForCreation();
  LOG.debug("task created");
  return tasknode;
}
项目:pbase    文件:TestSplitLogManager.java   
private String submitTaskAndWait(TaskBatch batch, String name) throws KeeperException,
    InterruptedException {
  String tasknode = ZKSplitLog.getEncodedNodeName(zkw, name);
  NodeCreationListener listener = new NodeCreationListener(zkw, tasknode);
  zkw.registerListener(listener);
  ZKUtil.watchAndCheckExists(zkw, tasknode);

  slm.enqueueSplitTask(name, batch);
  assertEquals(1, batch.installed);
  assertTrue(slm.findOrCreateOrphanTask(tasknode).batch == batch);
  assertEquals(1L, tot_mgr_node_create_queued.get());

  LOG.debug("waiting for task node creation");
  listener.waitForCreation();
  LOG.debug("task created");
  return tasknode;
}
项目:HIndex    文件:TestSplitLogManager.java   
private String submitTaskAndWait(TaskBatch batch, String name)
throws KeeperException, InterruptedException {
  String tasknode = ZKSplitLog.getEncodedNodeName(zkw, name);
  NodeCreationListener listener = new NodeCreationListener(zkw, tasknode);
  zkw.registerListener(listener);
  ZKUtil.watchAndCheckExists(zkw, tasknode);

  slm.enqueueSplitTask(name, batch);
  assertEquals(1, batch.installed);
  assertTrue(slm.findOrCreateOrphanTask(tasknode).batch == batch);
  assertEquals(1L, tot_mgr_node_create_queued.get());

  LOG.debug("waiting for task node creation");
  listener.waitForCreation();
  LOG.debug("task created");
  return tasknode;
}
项目:hbase    文件:TestSplitLogManager.java   
private String submitTaskAndWait(TaskBatch batch, String name) throws KeeperException,
    InterruptedException {
  String tasknode = ZKSplitLog.getEncodedNodeName(zkw, name);
  NodeCreationListener listener = new NodeCreationListener(zkw, tasknode);
  zkw.registerListener(listener);
  ZKUtil.watchAndCheckExists(zkw, tasknode);

  slm.enqueueSplitTask(name, batch);
  assertEquals(1, batch.installed);
  assertTrue(findOrCreateOrphanTask(tasknode).batch == batch);
  assertEquals(1L, tot_mgr_node_create_queued.sum());

  LOG.debug("waiting for task node creation");
  listener.waitForCreation();
  LOG.debug("task created");
  return tasknode;
}
项目:PyroDB    文件:TestSplitLogManager.java   
private String submitTaskAndWait(TaskBatch batch, String name)
throws KeeperException, InterruptedException {
  String tasknode = ZKSplitLog.getEncodedNodeName(zkw, name);
  NodeCreationListener listener = new NodeCreationListener(zkw, tasknode);
  zkw.registerListener(listener);
  ZKUtil.watchAndCheckExists(zkw, tasknode);

  slm.enqueueSplitTask(name, batch);
  assertEquals(1, batch.installed);
  assertTrue(slm.findOrCreateOrphanTask(tasknode).batch == batch);
  assertEquals(1L, tot_mgr_node_create_queued.get());

  LOG.debug("waiting for task node creation");
  listener.waitForCreation();
  LOG.debug("task created");
  return tasknode;
}