当前位置: 首页>>代码示例>>Java>>正文


Java SplitLogTask.Resigned方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.SplitLogTask.Resigned方法的典型用法代码示例。如果您正苦于以下问题:Java SplitLogTask.Resigned方法的具体用法?Java SplitLogTask.Resigned怎么用?Java SplitLogTask.Resigned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.SplitLogTask的用法示例。


在下文中一共展示了SplitLogTask.Resigned方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testTaskResigned

import org.apache.hadoop.hbase.SplitLogTask; //导入方法依赖的package包/类
@Test (timeout=180000)
public void testTaskResigned() throws Exception {
  LOG.info("TestTaskResigned - resubmit task node once in RESIGNED state");
  assertEquals(tot_mgr_resubmit.get(), 0);
  slm = new SplitLogManager(ds, conf, stopper, master, DUMMY_MASTER);
  assertEquals(tot_mgr_resubmit.get(), 0);
  TaskBatch batch = new TaskBatch();
  String tasknode = submitTaskAndWait(batch, "foo/1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  final ServerName worker1 = ServerName.valueOf("worker1,1,1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  SplitLogTask slt = new SplitLogTask.Resigned(worker1, this.mode);
  assertEquals(tot_mgr_resubmit.get(), 0);
  ZKUtil.setData(zkw, tasknode, slt.toByteArray());
  int version = ZKUtil.checkExists(zkw, tasknode);
  // Could be small race here.
  if (tot_mgr_resubmit.get() == 0) {
    waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
  }
  assertEquals(tot_mgr_resubmit.get(), 1);

  byte[] taskstate = ZKUtil.getData(zkw, tasknode);
  slt = SplitLogTask.parseFrom(taskstate);
  assertTrue(slt.isUnassigned(DUMMY_MASTER));
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:26,代码来源:TestSplitLogManager.java

示例2: testTaskResigned

import org.apache.hadoop.hbase.SplitLogTask; //导入方法依赖的package包/类
@Test
public void testTaskResigned() throws Exception {
  LOG.info("TestTaskResigned - resubmit task node once in RESIGNED state");
  assertEquals(tot_mgr_resubmit.get(), 0);
  slm = new SplitLogManager(zkw, conf, stopper, master, DUMMY_MASTER);
  assertEquals(tot_mgr_resubmit.get(), 0);
  TaskBatch batch = new TaskBatch();
  String tasknode = submitTaskAndWait(batch, "foo/1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  final ServerName worker1 = ServerName.valueOf("worker1,1,1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  SplitLogTask slt = new SplitLogTask.Resigned(worker1);
  assertEquals(tot_mgr_resubmit.get(), 0);
  ZKUtil.setData(zkw, tasknode, slt.toByteArray());
  int version = ZKUtil.checkExists(zkw, tasknode);
  // Could be small race here.
  if (tot_mgr_resubmit.get() == 0) {
    waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
  }
  assertEquals(tot_mgr_resubmit.get(), 1);

  byte[] taskstate = ZKUtil.getData(zkw, tasknode);
  slt = SplitLogTask.parseFrom(taskstate);
  assertTrue(slt.isUnassigned(DUMMY_MASTER));
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:26,代码来源:TestSplitLogManager.java

示例3: testTaskResigned

import org.apache.hadoop.hbase.SplitLogTask; //导入方法依赖的package包/类
@Test (timeout=180000)
public void testTaskResigned() throws Exception {
  LOG.info("TestTaskResigned - resubmit task node once in RESIGNED state");
  assertEquals(0, tot_mgr_resubmit.sum());
  slm = new SplitLogManager(master, conf);
  assertEquals(0, tot_mgr_resubmit.sum());
  TaskBatch batch = new TaskBatch();
  String tasknode = submitTaskAndWait(batch, "foo/1");
  assertEquals(0, tot_mgr_resubmit.sum());
  final ServerName worker1 = ServerName.valueOf("worker1,1,1");
  assertEquals(0, tot_mgr_resubmit.sum());
  SplitLogTask slt = new SplitLogTask.Resigned(worker1);
  assertEquals(0, tot_mgr_resubmit.sum());
  ZKUtil.setData(zkw, tasknode, slt.toByteArray());
  ZKUtil.checkExists(zkw, tasknode);
  // Could be small race here.
  if (tot_mgr_resubmit.sum() == 0) {
    waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
  }
  assertEquals(1, tot_mgr_resubmit.sum());

  byte[] taskstate = ZKUtil.getData(zkw, tasknode);
  slt = SplitLogTask.parseFrom(taskstate);
  assertTrue(slt.isUnassigned(master.getServerName()));
}
 
开发者ID:apache,项目名称:hbase,代码行数:26,代码来源:TestSplitLogManager.java

示例4: testTaskResigned

import org.apache.hadoop.hbase.SplitLogTask; //导入方法依赖的package包/类
@Test
public void testTaskResigned() throws Exception {
  LOG.info("TestTaskResigned - resubmit task node once in RESIGNED state");
  assertEquals(tot_mgr_resubmit.get(), 0);
  slm = new SplitLogManager(zkw, conf, stopper, master, DUMMY_MASTER);
  assertEquals(tot_mgr_resubmit.get(), 0);
  TaskBatch batch = new TaskBatch();
  String tasknode = submitTaskAndWait(batch, "foo/1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  final ServerName worker1 = ServerName.valueOf("worker1,1,1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  SplitLogTask slt = new SplitLogTask.Resigned(worker1);
  assertEquals(tot_mgr_resubmit.get(), 0);
  ZKUtil.setData(zkw, tasknode, slt.toByteArray());
  int version = ZKUtil.checkExists(zkw, tasknode);
  // Could be small race here.
  if (tot_mgr_resubmit.get() == 0) waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
  assertEquals(tot_mgr_resubmit.get(), 1);
  int version1 = ZKUtil.checkExists(zkw, tasknode);
  assertTrue("version1=" + version1 + ", version=" + version, version1 > version);

  byte[] taskstate = ZKUtil.getData(zkw, tasknode);
  slt = SplitLogTask.parseFrom(taskstate);
  assertTrue(slt.isUnassigned(DUMMY_MASTER));
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:26,代码来源:TestSplitLogManager.java

示例5: testTaskResigned

import org.apache.hadoop.hbase.SplitLogTask; //导入方法依赖的package包/类
@Test
public void testTaskResigned() throws Exception {
  LOG.info("TestTaskResigned - resubmit task node once in RESIGNED state");
  assertEquals(tot_mgr_resubmit.get(), 0);
  slm = new SplitLogManager(zkw, conf, stopper, master, DUMMY_MASTER, null);
  slm.finishInitialization();
  assertEquals(tot_mgr_resubmit.get(), 0);
  TaskBatch batch = new TaskBatch();
  String tasknode = submitTaskAndWait(batch, "foo/1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  final ServerName worker1 = new ServerName("worker1,1,1");
  assertEquals(tot_mgr_resubmit.get(), 0);
  SplitLogTask slt = new SplitLogTask.Resigned(worker1);
  assertEquals(tot_mgr_resubmit.get(), 0);
  ZKUtil.setData(zkw, tasknode, slt.toByteArray());
  int version = ZKUtil.checkExists(zkw, tasknode);
  // Could be small race here.
  if (tot_mgr_resubmit.get() == 0) waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
  assertEquals(tot_mgr_resubmit.get(), 1);
  int version1 = ZKUtil.checkExists(zkw, tasknode);
  assertTrue("version1=" + version1 + ", version=" + version, version1 > version);

  byte[] taskstate = ZKUtil.getData(zkw, tasknode);
  slt = SplitLogTask.parseFrom(taskstate);
  assertTrue(slt.isUnassigned(DUMMY_MASTER));
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:27,代码来源:TestSplitLogManager.java


注:本文中的org.apache.hadoop.hbase.SplitLogTask.Resigned方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。