本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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));
}
示例8: testReplyStateFromInvalidValue1
import org.apache.hadoop.oncrpc.RpcReply.ReplyState; //导入依赖的package包/类
@Test(expected=IndexOutOfBoundsException.class)
public void testReplyStateFromInvalidValue1() {
ReplyState.fromValue(2);
}