Java 类org.apache.hadoop.hdfs.tools.DFSHAAdmin 实例源码

项目:hadoop    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:big-c    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hadoop-plus    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:FlexMap    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hadoop-TCP    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hardfs    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hadoop-on-lustre2    文件:TestDFSZKFailoverController.java   
@Test(timeout=30000)
public void testManualFailoverWithDFSHAAdmin() throws Exception {
  DFSHAAdmin tool = new DFSHAAdmin();
  tool.setConf(conf);
  assertEquals(0, 
      tool.run(new String[]{"-failover", "nn1", "nn2"}));
  waitForHAState(0, HAServiceState.STANDBY);
  waitForHAState(1, HAServiceState.ACTIVE);
  assertEquals(0,
      tool.run(new String[]{"-failover", "nn2", "nn1"}));
  waitForHAState(0, HAServiceState.ACTIVE);
  waitForHAState(1, HAServiceState.STANDBY);
}
项目:hadoop    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:aliyun-oss-hadoop-fs    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:big-c    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:hadoop-plus    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:FlexMap    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:hadoop-TCP    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:hardfs    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}
项目:hadoop-on-lustre2    文件:BootstrapStandby.java   
@Override
public void setConf(Configuration conf) {
  this.conf = DFSHAAdmin.addSecurityConfiguration(conf);
}