public class Nfs3Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
INODEID_PATH_PREFIX |
static String |
READ_RPC_END |
static String |
READ_RPC_START |
static String |
WRITE_RPC_END |
static String |
WRITE_RPC_START |
| Constructor and Description |
|---|
Nfs3Utils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
bytesToLong(byte[] data) |
static org.apache.hadoop.nfs.nfs3.response.WccData |
createWccData(org.apache.hadoop.nfs.nfs3.response.WccAttr preOpAttr,
org.apache.hadoop.hdfs.DFSClient dfsClient,
String fileIdPath,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug) |
static int |
getAccessRights(int mode,
int type) |
static int |
getAccessRightsForUserGroup(int uid,
int gid,
org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr) |
static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes |
getFileAttr(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug) |
static String |
getFileIdPath(org.apache.hadoop.nfs.nfs3.FileHandle handle) |
static String |
getFileIdPath(long fileId) |
static org.apache.hadoop.hdfs.protocol.HdfsFileStatus |
getFileStatus(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath) |
static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes |
getNfs3FileAttrFromFileStatus(org.apache.hadoop.hdfs.protocol.HdfsFileStatus fs,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug) |
static org.apache.hadoop.nfs.nfs3.response.WccAttr |
getWccAttr(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath) |
static org.apache.hadoop.nfs.nfs3.response.WccAttr |
getWccAttr(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr) |
static byte[] |
longToByte(long v) |
static void |
writeChannel(org.jboss.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid)
Send a write response to the netty network socket channel
|
static void |
writeChannelCommit(org.jboss.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid) |
public static final String INODEID_PATH_PREFIX
public static final String READ_RPC_START
public static final String READ_RPC_END
public static final String WRITE_RPC_START
public static final String WRITE_RPC_END
public static String getFileIdPath(org.apache.hadoop.nfs.nfs3.FileHandle handle)
public static String getFileIdPath(long fileId)
public static org.apache.hadoop.hdfs.protocol.HdfsFileStatus getFileStatus(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath)
throws IOException
IOExceptionpublic static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes getNfs3FileAttrFromFileStatus(org.apache.hadoop.hdfs.protocol.HdfsFileStatus fs,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug)
public static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes getFileAttr(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug)
throws IOException
IOExceptionpublic static org.apache.hadoop.nfs.nfs3.response.WccAttr getWccAttr(org.apache.hadoop.hdfs.DFSClient client,
String fileIdPath)
throws IOException
IOExceptionpublic static org.apache.hadoop.nfs.nfs3.response.WccAttr getWccAttr(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr)
public static org.apache.hadoop.nfs.nfs3.response.WccData createWccData(org.apache.hadoop.nfs.nfs3.response.WccAttr preOpAttr,
org.apache.hadoop.hdfs.DFSClient dfsClient,
String fileIdPath,
org.apache.hadoop.nfs.nfs3.IdUserGroup iug)
throws IOException
IOExceptionpublic static void writeChannel(org.jboss.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid)
public static void writeChannelCommit(org.jboss.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid)
public static int getAccessRights(int mode,
int type)
public static int getAccessRightsForUserGroup(int uid,
int gid,
org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr)
public static long bytesToLong(byte[] data)
public static byte[] longToByte(long v)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.