[
https://issues.apache.org/jira/browse/HDFS-5330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795575#comment-13795575
]
Jing Zhao commented on HDFS-5330:
---------------------------------
nit:
{code}
+ hdfs.delete(new Path(testdir), true);
+ hdfs.mkdirs(new Path(testdir));
+ DFSTestUtil.createFile(hdfs, new Path(testdir + "/f1"), 0, (short) 1, 0);
+ DFSTestUtil.createFile(hdfs, new Path(testdir + "/f2"), 0, (short) 1, 0);
+ DFSTestUtil.createFile(hdfs, new Path(testdir + "/f3"), 0, (short) 1, 0);
+
+ // Get inodeId of /tmp
+ HdfsFileStatus status = nn.getRpcServer().getFileInfo(testdir);
+ long dirId = status.getFileId();
+
+ // Create related part of the XDR request
+ XDR xdr_req = new XDR();
+ FileHandle handle = new FileHandle(dirId);
+ handle.serialize(xdr_req);
+ xdr_req.writeLongAsHyper(0); // cookie
+ xdr_req.writeLongAsHyper(0); // verifier
+ xdr_req.writeInt(100); // count
{code}
This section of code can be put into a @Before method since currently it is
contained in both of the two unit tests. +1 with or without this change.
> fix readdir and readdirplus for large directories
> -------------------------------------------------
>
> Key: HDFS-5330
> URL: https://issues.apache.org/jira/browse/HDFS-5330
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: nfs
> Reporter: Brandon Li
> Assignee: Brandon Li
> Attachments: HDFS-5330.001.patch, HDFS-5330.002.patch,
> HDFS-5330.003.patch, HDFS-5330.004.patch, HDFS-5330.005.patch
>
>
> These two calls need to use cookies to do multiple round trips to namenode to
> get the complete list of the dirents. Currently implementation passes an
> inode path as "startAfter" for listPath(), however, namenode doesn't resolve
> startAfter as an inode path. Better use file name as "startAfter".
--
This message was sent by Atlassian JIRA
(v6.1#6144)