use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class READDIR3Request method deserialize.
public static READDIR3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
long cookie = xdr.readHyper();
long cookieVerf = xdr.readHyper();
int count = xdr.readInt();
return new READDIR3Request(handle, cookie, cookieVerf, count);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class READDIRPLUS3Request method deserialize.
public static READDIRPLUS3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
long cookie = xdr.readHyper();
long cookieVerf = xdr.readHyper();
int dirCount = xdr.readInt();
int maxCount = xdr.readInt();
return new READDIRPLUS3Request(handle, cookie, cookieVerf, dirCount, maxCount);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class TestFileHandle method testConstructor.
@Test
public void testConstructor() {
FileHandle handle = new FileHandle(1024);
XDR xdr = new XDR();
handle.serialize(xdr);
Assert.assertEquals(handle.getFileId(), 1024);
// Deserialize it back
FileHandle handle2 = new FileHandle();
handle2.deserialize(xdr.asReadOnlyWrap());
Assert.assertEquals("Failed: Assert 1024 is id ", 1024, handle.getFileId());
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class SYMLINK3Request method deserialize.
public static SYMLINK3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
String name = xdr.readString();
SetAttr3 symAttr = new SetAttr3();
symAttr.deserialize(xdr);
String symData = xdr.readString();
return new SYMLINK3Request(handle, name, symAttr, symData);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class CREATE3Response method deserialize.
public static CREATE3Response deserialize(XDR xdr) {
int status = xdr.readInt();
FileHandle objHandle = new FileHandle();
Nfs3FileAttributes postOpObjAttr = null;
if (status == Nfs3Status.NFS3_OK) {
xdr.readBoolean();
objHandle.deserialize(xdr);
xdr.readBoolean();
postOpObjAttr = Nfs3FileAttributes.deserialize(xdr);
}
WccData dirWcc = WccData.deserialize(xdr);
return new CREATE3Response(status, objHandle, postOpObjAttr, dirWcc);
}
Aggregations