HDFS-7356. Use DirectoryListing.hasMore() directly in nfs. Contributed by Li Lu.
This commit is contained in:
parent
ad21d28e07
commit
27f106e226
|
@ -1584,8 +1584,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
||||||
*/
|
*/
|
||||||
HdfsFileStatus[] fstatus = dlisting.getPartialListing();
|
HdfsFileStatus[] fstatus = dlisting.getPartialListing();
|
||||||
int n = (int) Math.min(fstatus.length, count-2);
|
int n = (int) Math.min(fstatus.length, count-2);
|
||||||
boolean eof = (n < fstatus.length) ? false : (dlisting
|
boolean eof = (n >= fstatus.length) && !dlisting.hasMore();
|
||||||
.getRemainingEntries() == 0);
|
|
||||||
|
|
||||||
Entry3[] entries;
|
Entry3[] entries;
|
||||||
if (cookie == 0) {
|
if (cookie == 0) {
|
||||||
|
@ -1733,8 +1732,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
||||||
// Set up the dirents in the response
|
// Set up the dirents in the response
|
||||||
HdfsFileStatus[] fstatus = dlisting.getPartialListing();
|
HdfsFileStatus[] fstatus = dlisting.getPartialListing();
|
||||||
int n = (int) Math.min(fstatus.length, dirCount-2);
|
int n = (int) Math.min(fstatus.length, dirCount-2);
|
||||||
boolean eof = (n < fstatus.length) ? false : (dlisting
|
boolean eof = (n >= fstatus.length) && !dlisting.hasMore();
|
||||||
.getRemainingEntries() == 0);
|
|
||||||
|
|
||||||
READDIRPLUS3Response.EntryPlus3[] entries;
|
READDIRPLUS3Response.EntryPlus3[] entries;
|
||||||
if (cookie == 0) {
|
if (cookie == 0) {
|
||||||
|
|
|
@ -331,6 +331,8 @@ Release 2.7.0 - UNRELEASED
|
||||||
HDFS-6917. Add an hdfs debug command to validate blocks, call recoverlease,
|
HDFS-6917. Add an hdfs debug command to validate blocks, call recoverlease,
|
||||||
etc. (cmccabe)
|
etc. (cmccabe)
|
||||||
|
|
||||||
|
HDFS-7356. Use DirectoryListing.hasMore() directly in nfs. (Li Lu via jing9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
Loading…
Reference in New Issue