本文整理汇总了Java中org.apache.hadoop.hdfs.server.namenode.ha.IPFailoverProxyProvider类的典型用法代码示例。如果您正苦于以下问题:Java IPFailoverProxyProvider类的具体用法?Java IPFailoverProxyProvider怎么用?Java IPFailoverProxyProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPFailoverProxyProvider类属于org.apache.hadoop.hdfs.server.namenode.ha包,在下文中一共展示了IPFailoverProxyProvider类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testIPFailoverProxyProviderLogicalUri
import org.apache.hadoop.hdfs.server.namenode.ha.IPFailoverProxyProvider; //导入依赖的package包/类
/**
* Test to verify IPFailoverProxyProvider is not requiring logical URI.
*/
@Test
public void testIPFailoverProxyProviderLogicalUri() throws Exception {
// setup the config with the IP failover proxy provider class
Configuration config = new HdfsConfiguration(conf);
URI nnUri = cluster.getURI(0);
config.set(DFS_CLIENT_FAILOVER_PROXY_PROVIDER_KEY_PREFIX + "." +
nnUri.getHost(),
IPFailoverProxyProvider.class.getName());
assertFalse("IPFailoverProxyProvider should not use logical URI.",
HAUtil.useLogicalUri(config, nnUri));
}
示例2: testIPFailoverProxyProviderLogicalUri
import org.apache.hadoop.hdfs.server.namenode.ha.IPFailoverProxyProvider; //导入依赖的package包/类
/**
* Test to verify IPFailoverProxyProvider is not requiring logical URI.
*/
@Test
public void testIPFailoverProxyProviderLogicalUri() throws Exception {
// setup the config with the IP failover proxy provider class
Configuration config = new HdfsConfiguration(conf);
URI nnUri = cluster.getURI(0);
config.set(HdfsClientConfigKeys.Failover.PROXY_PROVIDER_KEY_PREFIX + "." +
nnUri.getHost(),
IPFailoverProxyProvider.class.getName());
assertFalse("IPFailoverProxyProvider should not use logical URI.",
HAUtil.useLogicalUri(config, nnUri));
}