hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5135) Umbrella JIRA for NFS end to end unit test frameworks
Date Sat, 23 Aug 2014 00:38:14 GMT

    [ https://issues.apache.org/jira/browse/HDFS-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14107757#comment-14107757

Brandon Li commented on HDFS-5135:

[~zhz], the fragment decoder will always send the whole buffer to the next message handler,
but the buffer read position will be moved by 4 bytes.
In your case, the XDR is built on a ByteBuffer instead of ChannelBuffer, e.g:
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
      ChannelBuffer buf = (ChannelBuffer) e.getMessage();
      ByteBuffer b = buf.toByteBuffer().asReadOnlyBuffer();
      XDR rsp = new XDR(b, XDR.State.READING);
      // Get handle from create response
        RpcReply reply = RpcReply.read(rsp);

Also, in order to support parallel testing, the test should use a ephemeral port:
    config.setInt("nfs3.server.port", 0);

If currently there is not way to know which port is bound by NFS, we should add a method to
either Nfs3/RpcProgramNfs3 to get it. 
[~zhezhang], please feel free to create sub-tasks for your patches.

> Umbrella JIRA for NFS end to end unit test frameworks
> -----------------------------------------------------
>                 Key: HDFS-5135
>                 URL: https://issues.apache.org/jira/browse/HDFS-5135
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: nfs
>    Affects Versions: 2.2.0
>            Reporter: Brandon Li
>            Assignee: Zhe Zhang
>         Attachments: TestRPCMessagesInNFS.java
> Currently, we have to manually start portmap and nfs3 processes to test patch and new
functionalities. This JIRA is to track the effort to introduce a test framework to NFS unit
test without starting standalone nfs3 processes.

This message was sent by Atlassian JIRA

View raw message