本文整理汇总了Java中org.apache.hadoop.hdfs.protocolPB.JournalProtocolTranslatorPB类的典型用法代码示例。如果您正苦于以下问题:Java JournalProtocolTranslatorPB类的具体用法?Java JournalProtocolTranslatorPB怎么用?Java JournalProtocolTranslatorPB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JournalProtocolTranslatorPB类属于org.apache.hadoop.hdfs.protocolPB包,在下文中一共展示了JournalProtocolTranslatorPB类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNNProxyWithJournalProtocol
import org.apache.hadoop.hdfs.protocolPB.JournalProtocolTranslatorPB; //导入依赖的package包/类
private static JournalProtocol createNNProxyWithJournalProtocol(
InetSocketAddress address, Configuration conf, UserGroupInformation ugi)
throws IOException {
JournalProtocolPB proxy = (JournalProtocolPB) createNameNodeProxy(address,
conf, ugi, JournalProtocolPB.class);
return new JournalProtocolTranslatorPB(proxy);
}
示例2: tesJournalProtocol
import org.apache.hadoop.hdfs.protocolPB.JournalProtocolTranslatorPB; //导入依赖的package包/类
@Test
public void tesJournalProtocol() throws IOException {
JournalProtocolTranslatorPB translator = (JournalProtocolTranslatorPB)
NameNodeProxies.createNonHAProxy(conf, nnAddress, JournalProtocol.class,
UserGroupInformation.getCurrentUser(), true).getProxy();
//Nameode doesn't implement JournalProtocol
assertFalse(translator.isMethodSupported("startLogSegment"));
}
示例3: createNNProxyWithJournalProtocol
import org.apache.hadoop.hdfs.protocolPB.JournalProtocolTranslatorPB; //导入依赖的package包/类
private static JournalProtocol createNNProxyWithJournalProtocol(
InetSocketAddress address, Configuration conf, UserGroupInformation ugi)
throws IOException {
JournalProtocolPB proxy = (JournalProtocolPB) createNameNodeProxy(address,
conf, ugi, JournalProtocolPB.class, 30000);
return new JournalProtocolTranslatorPB(proxy);
}