Search in sources :

Example 21 with VerifierNone

use of org.apache.hadoop.oncrpc.security.VerifierNone in project hadoop by apache.

the class TestOutOfOrderWrite method write.

static XDR write(FileHandle handle, int xid, long offset, int count, byte[] data) {
    XDR request = new XDR();
    RpcCall.getInstance(xid, Nfs3Constant.PROGRAM, Nfs3Constant.VERSION, Nfs3Constant.NFSPROC3.CREATE.getValue(), new CredentialsNone(), new VerifierNone()).write(request);
    WRITE3Request write1 = new WRITE3Request(handle, offset, count, WriteStableHow.UNSTABLE, ByteBuffer.wrap(data));
    write1.serialize(request);
    return request;
}
Also used : XDR(org.apache.hadoop.oncrpc.XDR) VerifierNone(org.apache.hadoop.oncrpc.security.VerifierNone) WRITE3Request(org.apache.hadoop.nfs.nfs3.request.WRITE3Request) CredentialsNone(org.apache.hadoop.oncrpc.security.CredentialsNone)

Aggregations

VerifierNone (org.apache.hadoop.oncrpc.security.VerifierNone)21 XDR (org.apache.hadoop.oncrpc.XDR)15 WccData (org.apache.hadoop.nfs.nfs3.response.WccData)8 WRITE3Response (org.apache.hadoop.nfs.nfs3.response.WRITE3Response)6 IOException (java.io.IOException)5 CredentialsNone (org.apache.hadoop.oncrpc.security.CredentialsNone)5 Test (org.junit.Test)5 FileHandle (org.apache.hadoop.nfs.nfs3.FileHandle)4 RpcCall (org.apache.hadoop.oncrpc.RpcCall)4 ChannelBuffer (org.jboss.netty.buffer.ChannelBuffer)4 WriteStableHow (org.apache.hadoop.nfs.nfs3.Nfs3Constant.WriteStableHow)3 WccAttr (org.apache.hadoop.nfs.nfs3.response.WccAttr)3 RpcResponse (org.apache.hadoop.oncrpc.RpcResponse)3 InetAddress (java.net.InetAddress)2 InetSocketAddress (java.net.InetSocketAddress)2 Nfs3FileAttributes (org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)2 COMMIT3Response (org.apache.hadoop.nfs.nfs3.response.COMMIT3Response)2 Credentials (org.apache.hadoop.oncrpc.security.Credentials)2 Verifier (org.apache.hadoop.oncrpc.security.Verifier)2 File (java.io.File)1