public class Nfs3Utils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
INODEID_PATH_PREFIX |
|
static java.lang.String |
READ_RPC_END |
|
static java.lang.String |
READ_RPC_START |
|
static java.lang.String |
WRITE_RPC_END |
|
static java.lang.String |
WRITE_RPC_START |
| Constructor | Description |
|---|---|
Nfs3Utils() |
| Modifier and Type | Method | 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,
java.lang.String fileIdPath,
org.apache.hadoop.security.IdMappingServiceProvider iug) |
|
static int |
getAccessRights(int mode,
int type) |
|
static int |
getAccessRightsForUserGroup(int uid,
int gid,
int[] auxGids,
org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr) |
|
static long |
getDirSize(int childNum) |
HDFS directory size is always zero.
|
static long |
getElapsedTime(long startTimeNano) |
|
static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes |
getFileAttr(org.apache.hadoop.hdfs.DFSClient client,
java.lang.String fileIdPath,
org.apache.hadoop.security.IdMappingServiceProvider iug) |
|
static java.lang.String |
getFileIdPath(long fileId) |
|
static java.lang.String |
getFileIdPath(org.apache.hadoop.nfs.nfs3.FileHandle handle) |
|
static org.apache.hadoop.hdfs.protocol.HdfsFileStatus |
getFileStatus(org.apache.hadoop.hdfs.DFSClient client,
java.lang.String fileIdPath) |
|
static int |
getNamenodeId(org.apache.hadoop.conf.Configuration conf) |
|
static int |
getNamenodeId(org.apache.hadoop.conf.Configuration conf,
java.net.URI namenodeURI) |
|
static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes |
getNfs3FileAttrFromFileStatus(org.apache.hadoop.hdfs.protocol.HdfsFileStatus fs,
org.apache.hadoop.security.IdMappingServiceProvider iug) |
|
static java.net.URI |
getResolvedURI(org.apache.hadoop.fs.FileSystem fs,
java.lang.String exportPath) |
|
static org.apache.hadoop.nfs.nfs3.response.WccAttr |
getWccAttr(org.apache.hadoop.hdfs.DFSClient client,
java.lang.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(io.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(io.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid) |
public static final java.lang.String INODEID_PATH_PREFIX
public static final java.lang.String READ_RPC_START
public static final java.lang.String READ_RPC_END
public static final java.lang.String WRITE_RPC_START
public static final java.lang.String WRITE_RPC_END
public static java.lang.String getFileIdPath(org.apache.hadoop.nfs.nfs3.FileHandle handle)
public static java.lang.String getFileIdPath(long fileId)
public static org.apache.hadoop.hdfs.protocol.HdfsFileStatus getFileStatus(org.apache.hadoop.hdfs.DFSClient client,
java.lang.String fileIdPath)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes getNfs3FileAttrFromFileStatus(org.apache.hadoop.hdfs.protocol.HdfsFileStatus fs,
org.apache.hadoop.security.IdMappingServiceProvider iug)
public static org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes getFileAttr(org.apache.hadoop.hdfs.DFSClient client,
java.lang.String fileIdPath,
org.apache.hadoop.security.IdMappingServiceProvider iug)
throws java.io.IOException
java.io.IOExceptionpublic static long getDirSize(int childNum)
childNum - number of children of the directorypublic static org.apache.hadoop.nfs.nfs3.response.WccAttr getWccAttr(org.apache.hadoop.hdfs.DFSClient client,
java.lang.String fileIdPath)
throws java.io.IOException
java.io.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,
java.lang.String fileIdPath,
org.apache.hadoop.security.IdMappingServiceProvider iug)
throws java.io.IOException
java.io.IOExceptionpublic static void writeChannel(io.netty.channel.Channel channel,
org.apache.hadoop.oncrpc.XDR out,
int xid)
channel - channel to which the buffer needs to be writtenout - xdr object to be written to the channelxid - transaction identifierpublic static void writeChannelCommit(io.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,
int[] auxGids,
org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes attr)
public static long bytesToLong(byte[] data)
public static byte[] longToByte(long v)
public static long getElapsedTime(long startTimeNano)
public static int getNamenodeId(org.apache.hadoop.conf.Configuration conf)
public static int getNamenodeId(org.apache.hadoop.conf.Configuration conf,
java.net.URI namenodeURI)
public static java.net.URI getResolvedURI(org.apache.hadoop.fs.FileSystem fs,
java.lang.String exportPath)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.