本文整理汇总了Java中org.apache.hadoop.oncrpc.RpcAcceptedReply.voidReply方法的典型用法代码示例。如果您正苦于以下问题:Java RpcAcceptedReply.voidReply方法的具体用法?Java RpcAcceptedReply.voidReply怎么用?Java RpcAcceptedReply.voidReply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.oncrpc.RpcAcceptedReply
的用法示例。
在下文中一共展示了RpcAcceptedReply.voidReply方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleInternal
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
@Override
public XDR handleInternal(RpcCall rpcCall, XDR xdr, XDR out,
InetAddress client, Channel channel) {
int procedure = rpcCall.getProcedure();
int xid = rpcCall.getXid();
if (procedure == MNTPROC_NULL) {
out = nullOp(out, xid, client);
} else if (procedure == MNTPROC_MNT) {
out = mnt(xdr, out, xid, client);
} else if (procedure == MNTPROC_DUMP) {
out = dump(out, xid, client);
} else if (procedure == MNTPROC_UMNT) {
out = umnt(xdr, out, xid, client);
} else if (procedure == MNTPROC_UMNTALL) {
umntall(out, xid, client);
} else if (procedure == MNTPROC_EXPORT) {
out = MountResponse.writeExportList(out, xid, exports);
} else {
// Invalid procedure
RpcAcceptedReply.voidReply(out, xid,
RpcAcceptedReply.AcceptState.PROC_UNAVAIL); }
return out;
}
示例2: umnt
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public XDR umnt(XDR xdr, XDR out, int xid, InetAddress client) {
String path = xdr.readString();
if (LOG.isDebugEnabled()) {
LOG.debug("MOUNT UMNT path: " + path + " client: " + client);
}
String host = client.getHostName();
mounts.remove(new MountEntry(host, path));
RpcAcceptedReply.voidReply(out, xid);
return out;
}
示例3: umntall
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public XDR umntall(XDR out, int xid, InetAddress client) {
if (LOG.isDebugEnabled()) {
LOG.debug("MOUNT UMNTALL : " + " client: " + client);
}
mounts.clear();
return RpcAcceptedReply.voidReply(out, xid);
}
示例4: writeMNTResponse
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
/** Response for RPC call {@link MountInterface#MNTPROC_MNT} */
public static XDR writeMNTResponse(int status, XDR xdr, int xid,
byte[] handle) {
RpcAcceptedReply.voidReply(xdr, xid);
xdr.writeInt(status);
if (status == MNT_OK) {
xdr.writeInt(handle.length);
xdr.writeFixedOpaque(handle);
// Only MountV3 returns a list of supported authFlavors
xdr.writeInt(1);
xdr.writeInt(AuthFlavor.AUTH_SYS.getValue());
}
return xdr;
}
示例5: writeMountList
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
/** Response for RPC call {@link MountInterface#MNTPROC_DUMP} */
public static XDR writeMountList(XDR xdr, int xid, List<MountEntry> mounts) {
RpcAcceptedReply.voidReply(xdr, xid);
for (MountEntry mountEntry : mounts) {
xdr.writeBoolean(true); // Value follows yes
xdr.writeString(mountEntry.host());
xdr.writeString(mountEntry.path());
}
xdr.writeBoolean(false); // Value follows no
return xdr;
}
示例6: writeExportList
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
/** Response for RPC call {@link MountInterface#MNTPROC_EXPORT} */
public static XDR writeExportList(XDR xdr, int xid, List<String> exports) {
RpcAcceptedReply.voidReply(xdr, xid);
for (String export : exports) {
xdr.writeBoolean(true); // Value follows - yes
xdr.writeString(export);
xdr.writeInt(0);
}
xdr.writeBoolean(false); // Value follows - no
return xdr;
}
示例7: handleInternal
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
@Override
public XDR handleInternal(RpcCall rpcCall, XDR in, XDR out,
InetAddress client, Channel channel) {
Procedure procedure = Procedure.fromValue(rpcCall.getProcedure());
int xid = rpcCall.getXid();
switch (procedure) {
case PMAPPROC_NULL:
out = nullOp(xid, in, out);
break;
case PMAPPROC_SET:
out = set(xid, in, out);
break;
case PMAPPROC_UNSET:
out = unset(xid, in, out);
break;
case PMAPPROC_DUMP:
out = dump(xid, in, out);
break;
case PMAPPROC_GETPORT:
out = getport(xid, in, out);
break;
case PMAPPROC_GETVERSADDR:
out = getport(xid, in, out);
break;
default:
LOG.info("PortmapHandler unknown rpc procedure=" + procedure);
RpcAcceptedReply.voidReply(out, xid,
RpcAcceptedReply.AcceptState.PROC_UNAVAIL);
}
return out;
}
示例8: pmapList
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public static XDR pmapList(XDR xdr, int xid, Collection<PortmapMapping> list) {
RpcAcceptedReply.voidReply(xdr, xid);
for (PortmapMapping mapping : list) {
System.out.println(mapping);
xdr.writeBoolean(true); // Value follows
mapping.serialize(xdr);
}
xdr.writeBoolean(false); // No value follows
return xdr;
}
示例9: nullOp
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public XDR nullOp(XDR out, int xid, InetAddress client) {
if (LOG.isDebugEnabled()) {
LOG.debug("MOUNT NULLOP : " + " client: " + client);
}
return RpcAcceptedReply.voidReply(out, xid);
}
示例10: handleInternal
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
@Override
public XDR handleInternal(RpcCall rpcCall, final XDR xdr, XDR out,
InetAddress client, Channel channel) {
int procedure = rpcCall.getProcedure();
int xid = rpcCall.getXid();
RpcAuthSys authSys = null;
// Ignore auth only for NFSPROC3_NULL, especially for Linux clients.
if (procedure != Nfs3Constant.NFSPROC3_NULL) {
if (rpcCall.getCredential().getFlavor() != AuthFlavor.AUTH_SYS) {
LOG.info("Wrong RPC AUTH flavor, "
+ rpcCall.getCredential().getFlavor() + " is not AUTH_SYS.");
XDR reply = new XDR();
reply = RpcDeniedReply.voidReply(reply, xid,
RpcReply.ReplyState.MSG_ACCEPTED,
RpcDeniedReply.RejectState.AUTH_ERROR);
return reply;
}
authSys = RpcAuthSys.from(rpcCall.getCredential().getBody());
}
NFS3Response response = null;
if (procedure == Nfs3Constant.NFSPROC3_NULL) {
response = nullProcedure();
} else if (procedure == Nfs3Constant.NFSPROC3_GETATTR) {
response = getattr(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_SETATTR) {
response = setattr(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_LOOKUP) {
response = lookup(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_ACCESS) {
response = access(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_READLINK) {
response = readlink(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_READ) {
response = read(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_WRITE) {
response = write(xdr, channel, xid, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_CREATE) {
response = create(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_MKDIR) {
response = mkdir(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_SYMLINK) {
response = symlink(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_MKNOD) {
response = mknod(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_REMOVE) {
response = remove(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_RMDIR) {
response = rmdir(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_RENAME) {
response = rename(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_LINK) {
response = link(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_READDIR) {
response = readdir(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_READDIRPLUS) {
response = readdirplus(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_FSSTAT) {
response = fsstat(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_FSINFO) {
response = fsinfo(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_PATHCONF) {
response = pathconf(xdr, authSys);
} else if (procedure == Nfs3Constant.NFSPROC3_COMMIT) {
response = commit(xdr, authSys);
} else {
// Invalid procedure
RpcAcceptedReply.voidReply(out, xid,
RpcAcceptedReply.AcceptState.PROC_UNAVAIL);
}
if (response != null) {
out = response.send(out, xid);
}
return out;
}
示例11: send
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public XDR send(XDR out, int xid) {
RpcAcceptedReply.voidReply(out, xid);
out.writeInt(this.getStatus());
return out;
}
示例12: send
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
@Override
public XDR send(XDR out, int xid) {
RpcAcceptedReply.voidReply(out, xid);
return out;
}
示例13: voidReply
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public static XDR voidReply(XDR xdr, int xid) {
RpcAcceptedReply.voidReply(xdr, xid);
return xdr;
}
示例14: intReply
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public static XDR intReply(XDR xdr, int xid, int value) {
RpcAcceptedReply.voidReply(xdr, xid);
xdr.writeInt(value);
return xdr;
}
示例15: booleanReply
import org.apache.hadoop.oncrpc.RpcAcceptedReply; //导入方法依赖的package包/类
public static XDR booleanReply(XDR xdr, int xid, boolean value) {
RpcAcceptedReply.voidReply(xdr, xid);
xdr.writeBoolean(value);
return xdr;
}