Search in sources :

Example 1 with Specdata3

use of org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes.Specdata3 in project hadoop by apache.

the class MKNOD3Request method deserialize.

public static MKNOD3Request deserialize(XDR xdr) throws IOException {
    FileHandle handle = readHandle(xdr);
    String name = xdr.readString();
    int type = xdr.readInt();
    SetAttr3 objAttr = new SetAttr3();
    Specdata3 spec = null;
    if (type == NfsFileType.NFSCHR.toValue() || type == NfsFileType.NFSBLK.toValue()) {
        objAttr.deserialize(xdr);
        spec = new Specdata3(xdr.readInt(), xdr.readInt());
    } else if (type == NfsFileType.NFSSOCK.toValue() || type == NfsFileType.NFSFIFO.toValue()) {
        objAttr.deserialize(xdr);
    }
    return new MKNOD3Request(handle, name, type, objAttr, spec);
}
Also used : FileHandle(org.apache.hadoop.nfs.nfs3.FileHandle) Specdata3(org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes.Specdata3)

Aggregations

FileHandle (org.apache.hadoop.nfs.nfs3.FileHandle)1 Specdata3 (org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes.Specdata3)1