当前位置: 首页>>代码示例>>Java>>正文


Java ReplyState类代码示例

本文整理汇总了Java中org.apache.hadoop.oncrpc.RpcReply.ReplyState的典型用法代码示例。如果您正苦于以下问题:Java ReplyState类的具体用法?Java ReplyState怎么用?Java ReplyState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ReplyState类属于org.apache.hadoop.oncrpc.RpcReply包,在下文中一共展示了ReplyState类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testConstructor

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testConstructor() {
  RpcDeniedReply reply = new RpcDeniedReply(0, ReplyState.MSG_ACCEPTED,
      RejectState.AUTH_ERROR, new VerifierNone());
  Assert.assertEquals(0, reply.getXid());
  Assert.assertEquals(RpcMessage.Type.RPC_REPLY, reply.getMessageType());
  Assert.assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
  Assert.assertEquals(RejectState.AUTH_ERROR, reply.getRejectState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:TestRpcDeniedReply.java

示例2: testRpcReply

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testRpcReply() {
  RpcReply reply = new RpcReply(0, ReplyState.MSG_ACCEPTED,
      new VerifierNone()) {
        @Override
        public XDR write(XDR xdr) {
          return null;
        }
  };
  Assert.assertEquals(0, reply.getXid());
  Assert.assertEquals(RpcMessage.Type.RPC_REPLY, reply.getMessageType());
  Assert.assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestRpcReply.java

示例3: testConstructor

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testConstructor() {
  Verifier verifier = new VerifierNone();
  RpcAcceptedReply reply = new RpcAcceptedReply(0, 
      ReplyState.MSG_ACCEPTED, verifier, AcceptState.SUCCESS);
  assertEquals(0, reply.getXid());
  assertEquals(RpcMessage.Type.RPC_REPLY, reply.getMessageType());
  assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
  assertEquals(verifier, reply.getVerifier());
  assertEquals(AcceptState.SUCCESS, reply.getAcceptState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:TestRpcAcceptedReply.java

示例4: testConstructor

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testConstructor() {
  RpcDeniedReply reply = new RpcDeniedReply(0, RpcMessage.RPC_REPLY,
      ReplyState.MSG_ACCEPTED, RejectState.AUTH_ERROR) {
    // Anonymous class
  };
  Assert.assertEquals(0, reply.getXid());
  Assert.assertEquals(RpcMessage.RPC_REPLY, reply.getMessageType());
  Assert.assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
  Assert.assertEquals(RejectState.AUTH_ERROR, reply.getRejectState());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:12,代码来源:TestRpcDeniedReply.java

示例5: testRpcReply

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testRpcReply() {
  RpcReply reply = new RpcReply(0, 1, ReplyState.MSG_ACCEPTED) {
    // Anonymous class
  };
  Assert.assertEquals(0, reply.getXid());
  Assert.assertEquals(1, reply.getMessageType());
  Assert.assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:10,代码来源:TestRpcReply.java

示例6: testConstructor

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testConstructor() {
  RpcAuthInfo verifier = new RpcAuthInfo(AuthFlavor.AUTH_NONE, new byte[0]);
  RpcAcceptedReply reply = new RpcAcceptedReply(0, RpcMessage.RPC_REPLY,
      ReplyState.MSG_ACCEPTED, verifier, AcceptState.SUCCESS);
  assertEquals(0, reply.getXid());
  assertEquals(RpcMessage.RPC_REPLY, reply.getMessageType());
  assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
  assertEquals(verifier, reply.getVerifier());
  assertEquals(AcceptState.SUCCESS, reply.getAcceptState());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:12,代码来源:TestRpcAcceptedReply.java

示例7: testReplyStateFromValue

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test
public void testReplyStateFromValue() {
  Assert.assertEquals(ReplyState.MSG_ACCEPTED, ReplyState.fromValue(0));
  Assert.assertEquals(ReplyState.MSG_DENIED, ReplyState.fromValue(1));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:TestRpcReply.java

示例8: testReplyStateFromInvalidValue1

import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test(expected=IndexOutOfBoundsException.class)
public void testReplyStateFromInvalidValue1() {
  ReplyState.fromValue(2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:TestRpcReply.java


注:本文中的org.apache.hadoop.oncrpc.RpcReply.ReplyState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。