Java Code Examples for org.apache.hadoop.fs.CommonConfigurationKeys#HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT

The following examples show how to use org.apache.hadoop.fs.CommonConfigurationKeys#HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestActiveStandbyElectorRealZK.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public void setUp() throws Exception {
  super.setUp();
  
  zkServer = getServer(serverFactory);

  for (int i = 0; i < NUM_ELECTORS; i++) {
    cbs[i] =  Mockito.mock(ActiveStandbyElectorCallback.class);
    appDatas[i] = Ints.toByteArray(i);
    electors[i] = new ActiveStandbyElector(hostPort, 5000, PARENT_DIR,
        Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), cbs[i],
        CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
  }
}
 
Example 2
Source File: TestActiveStandbyElector.java    From hadoop with Apache License 2.0 5 votes vote down vote up
ActiveStandbyElectorTester(String hostPort, int timeout, String parent,
    List<ACL> acl, ActiveStandbyElectorCallback app) throws IOException,
    KeeperException {
  super(hostPort, timeout, parent, acl, Collections
      .<ZKAuthInfo> emptyList(), app,
      CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
}
 
Example 3
Source File: TestActiveStandbyElector.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 * verify the zookeeper connection establishment
 */
@Test
public void testWithoutZKServer() throws Exception {
  try {
    new ActiveStandbyElector("127.0.0.1", 2000, ZK_PARENT_NAME,
        Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), mockApp,
        CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
    Assert.fail("Did not throw zookeeper connection loss exceptions!");
  } catch (KeeperException ke) {
    GenericTestUtils.assertExceptionContains( "ConnectionLoss", ke);
  }
}
 
Example 4
Source File: TestActiveStandbyElectorRealZK.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public void setUp() throws Exception {
  super.setUp();
  
  zkServer = getServer(serverFactory);

  for (int i = 0; i < NUM_ELECTORS; i++) {
    cbs[i] =  Mockito.mock(ActiveStandbyElectorCallback.class);
    appDatas[i] = Ints.toByteArray(i);
    electors[i] = new ActiveStandbyElector(hostPort, 5000, PARENT_DIR,
        Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), cbs[i],
        CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
  }
}
 
Example 5
Source File: TestActiveStandbyElector.java    From big-c with Apache License 2.0 5 votes vote down vote up
ActiveStandbyElectorTester(String hostPort, int timeout, String parent,
    List<ACL> acl, ActiveStandbyElectorCallback app) throws IOException,
    KeeperException {
  super(hostPort, timeout, parent, acl, Collections
      .<ZKAuthInfo> emptyList(), app,
      CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
}
 
Example 6
Source File: TestActiveStandbyElector.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 * verify the zookeeper connection establishment
 */
@Test
public void testWithoutZKServer() throws Exception {
  try {
    new ActiveStandbyElector("127.0.0.1", 2000, ZK_PARENT_NAME,
        Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), mockApp,
        CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT);
    Assert.fail("Did not throw zookeeper connection loss exceptions!");
  } catch (KeeperException ke) {
    GenericTestUtils.assertExceptionContains( "ConnectionLoss", ke);
  }
}