@Override public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) { if (!protocol.equals(MRClientProtocolPB.class)) { return null; } return new TokenInfo() { @Override public Class<? extends Annotation> annotationType() { return null; } @Override public Class<? extends TokenSelector<? extends TokenIdentifier>> value() { return ClientToAMTokenSelector.class; } }; }
public MRClientProtocolPBClientImpl(long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException { RPC.setProtocolEngine(conf, MRClientProtocolPB.class, ProtobufRpcEngine.class); proxy = RPC.getProxy(MRClientProtocolPB.class, clientVersion, addr, conf); }