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); }
@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")); }
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); }