本文整理汇总了Java中org.apache.hadoop.fs.CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT属性的典型用法代码示例。如果您正苦于以下问题:Java CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT属性的具体用法?Java CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT怎么用?Java CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.fs.CommonConfigurationKeys
的用法示例。
在下文中一共展示了CommonConfigurationKeys.HA_FC_ELECTOR_ZK_OP_RETRIES_DEFAULT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
@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);
}
}
示例2: ActiveStandbyElectorTester
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);
}
示例3: testWithoutZKServer
/**
* 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);
}
}