Search in sources :

Example 31 with FileHandle

use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.

the class MKDIR3Response method deserialize.

public static MKDIR3Response deserialize(XDR xdr) {
    int status = xdr.readInt();
    FileHandle objFileHandle = new FileHandle();
    Nfs3FileAttributes objAttr = null;
    WccData dirWcc;
    if (status == Nfs3Status.NFS3_OK) {
        xdr.readBoolean();
        objFileHandle.deserialize(xdr);
        xdr.readBoolean();
        objAttr = Nfs3FileAttributes.deserialize(xdr);
    }
    dirWcc = WccData.deserialize(xdr);
    return new MKDIR3Response(status, objFileHandle, objAttr, dirWcc);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle) Nfs3FileAttributes(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)

Example 32 with FileHandle

use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.

the class MKNOD3Response method deserialize.

public static MKNOD3Response deserialize(XDR xdr) {
    int status = xdr.readInt();
    FileHandle objFileHandle = new FileHandle();
    Nfs3FileAttributes objPostOpAttr = null;
    WccData dirWcc;
    if (status == Nfs3Status.NFS3_OK) {
        xdr.readBoolean();
        objFileHandle.deserialize(xdr);
        xdr.readBoolean();
        objPostOpAttr = Nfs3FileAttributes.deserialize(xdr);
    }
    dirWcc = WccData.deserialize(xdr);
    return new MKNOD3Response(status, objFileHandle, objPostOpAttr, dirWcc);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle) Nfs3FileAttributes(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)

Example 33 with FileHandle

use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.

the class SYMLINK3Response method deserialize.

public static SYMLINK3Response deserialize(XDR xdr) {
    int status = xdr.readInt();
    FileHandle objFileHandle = new FileHandle();
    Nfs3FileAttributes objPostOpAttr = null;
    WccData dirWcc;
    if (status == Nfs3Status.NFS3_OK) {
        xdr.readBoolean();
        objFileHandle.deserialize(xdr);
        xdr.readBoolean();
        objPostOpAttr = Nfs3FileAttributes.deserialize(xdr);
    }
    dirWcc = WccData.deserialize(xdr);
    return new SYMLINK3Response(status, objFileHandle, objPostOpAttr, dirWcc);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle) Nfs3FileAttributes(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)

Example 34 with FileHandle

use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.

the class RMDIR3Request method deserialize.

public static RMDIR3Request deserialize(XDR xdr) throws IOException {
    FileHandle handle = readHandle(xdr);
    String name = xdr.readString();
    return new RMDIR3Request(handle, name);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle)

Example 35 with FileHandle

use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.

the class SETATTR3Request method deserialize.

public static SETATTR3Request deserialize(XDR xdr) throws IOException {
    FileHandle handle = readHandle(xdr);
    SetAttr3 attr = new SetAttr3();
    attr.deserialize(xdr);
    boolean check = xdr.readBoolean();
    NfsTime ctime;
    if (check) {
        ctime = NfsTime.deserialize(xdr);
    } else {
        ctime = null;
    }
    return new SETATTR3Request(handle, attr, check, ctime);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle) NfsTime(org.apache.hadoop.nfs.NfsTime)

Aggregations

FileHandle (org.apache.hadoop.nfs.nfs3.FileHandle)79 HdfsFileStatus (org.apache.hadoop.hdfs.protocol.HdfsFileStatus)34 XDR (org.apache.hadoop.oncrpc.XDR)34 Nfs3FileAttributes (org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)31 Test (org.junit.Test)31 InetSocketAddress (java.net.InetSocketAddress)28 DFSClient (org.apache.hadoop.hdfs.DFSClient)26 IOException (java.io.IOException)24 VisibleForTesting (com.google.common.annotations.VisibleForTesting)19 WccData (org.apache.hadoop.nfs.nfs3.response.WccData)12 SetAttr3 (org.apache.hadoop.nfs.nfs3.request.SetAttr3)11 WRITE3Request (org.apache.hadoop.nfs.nfs3.request.WRITE3Request)8 NfsConfiguration (org.apache.hadoop.hdfs.nfs.conf.NfsConfiguration)7 HdfsDataOutputStream (org.apache.hadoop.hdfs.client.HdfsDataOutputStream)6 CREATE3Request (org.apache.hadoop.nfs.nfs3.request.CREATE3Request)6 READ3Request (org.apache.hadoop.nfs.nfs3.request.READ3Request)5 CREATE3Response (org.apache.hadoop.nfs.nfs3.response.CREATE3Response)5 READ3Response (org.apache.hadoop.nfs.nfs3.response.READ3Response)5 WRITE3Response (org.apache.hadoop.nfs.nfs3.response.WRITE3Response)5 VerifierNone (org.apache.hadoop.oncrpc.security.VerifierNone)5