Пример #1
0
 /// <exception cref="System.IO.IOException"/>
 public virtual bool IsMethodSupported(string methodName)
 {
     // ProtocolMetaInterface
     return(RpcClientUtil.IsMethodSupported(rpcProxy, typeof(DatanodeProtocolPB), RPC.RpcKind
                                            .RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(DatanodeProtocolPB)), methodName
                                            ));
 }
Пример #2
0
        public virtual void TestClientNamenodeProtocol()
        {
            ClientProtocol cp = NameNodeProxies.CreateNonHAProxy <ClientProtocol>(conf, nnAddress
                                                                                  , UserGroupInformation.GetCurrentUser(), true).GetProxy();

            RpcClientUtil.IsMethodSupported(cp, typeof(ClientNamenodeProtocolPB), RPC.RpcKind
                                            .RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(ClientNamenodeProtocolPB)), "mkdirs"
                                            );
        }
Пример #3
0
        public virtual void TestNamenodeProtocol()
        {
            NamenodeProtocol np = NameNodeProxies.CreateNonHAProxy <NamenodeProtocol>(conf, nnAddress
                                                                                      , UserGroupInformation.GetCurrentUser(), true).GetProxy();
            bool exists = RpcClientUtil.IsMethodSupported(np, typeof(NamenodeProtocolPB), RPC.RpcKind
                                                          .RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(NamenodeProtocolPB)), "rollEditLog"
                                                          );

            NUnit.Framework.Assert.IsTrue(exists);
            exists = RpcClientUtil.IsMethodSupported(np, typeof(NamenodeProtocolPB), RPC.RpcKind
                                                     .RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(NamenodeProtocolPB)), "bogusMethod"
                                                     );
            NUnit.Framework.Assert.IsFalse(exists);
        }
Пример #4
0
 /// <exception cref="System.IO.IOException"/>
 public virtual bool IsMethodSupported(string methodName)
 {
     return(RpcClientUtil.IsMethodSupported(rpcProxy, typeof(GetUserMappingsProtocolPB
                                                             ), RPC.RpcKind.RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(GetUserMappingsProtocolPB
                                                                                                                             )), methodName));
 }
Пример #5
0
 /// <exception cref="System.IO.IOException"/>
 public virtual bool IsMethodSupported(string methodName)
 {
     return(RpcClientUtil.IsMethodSupported(rpcProxy, typeof(RefreshAuthorizationPolicyProtocolPB
                                                             ), RPC.RpcKind.RpcProtocolBuffer, RPC.GetProtocolVersion(typeof(RefreshAuthorizationPolicyProtocolPB
                                                                                                                             )), methodName));
 }