Java 类org.apache.hadoop.hdfs.server.namenode.FSNamesystem.NameNodeEditLogRoller 实例源码

项目:hadoop    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}
项目:aliyun-oss-hadoop-fs    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}
项目:big-c    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}
项目:FlexMap    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}
项目:hadoop-on-lustre2    文件:TestEditLogAutoroll.java   
@Test(timeout=60000)
public void testEditLogAutoroll() throws Exception {
  // Make some edits
  final long startTxId = editLog.getCurSegmentTxId();
  for (int i=0; i<11; i++) {
    fs.mkdirs(new Path("testEditLogAutoroll-" + i));
  }
  // Wait for the NN to autoroll
  GenericTestUtils.waitFor(new Supplier<Boolean>() {
    @Override
    public Boolean get() {
      return editLog.getCurSegmentTxId() > startTxId;
    }
  }, 1000, 5000);
  // Transition to standby and make sure the roller stopped
  nn0.transitionToStandby();
  GenericTestUtils.assertNoThreadsMatching(
      ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*");
}