[ https://issues.apache.org/jira/browse/HDFS-4762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13693362#comment-13693362 ]
Tsz Wo (Nicholas), SZE commented on HDFS-4762: ---------------------------------------------- Some more comments: - In READDIR3Response and READDIRPLUS3Response, use System.arraycopy(..) for coping entries. {code} + for (int i = 0; i < entries.length; i++) { + this.entries[i] = entries[i]; + } {code} - Use the following for Nfs3Utils.bytesToLong(..) and do not use ByteBuffer. {code} public static long bytesToLong(byte[] data) { long n = 0xffL & data[0]; for(int i = 1; i < 8; i++) { n = (n << 8) | (0xffL & data[i]); } return n; } {code} - In OffsetRange.hasOverlap(..), it seems that the case min == rangeMax and the case max == rangeMin are not handled correctly. Indeed, hasOverlap(..) can be considered as !(noOverlap) and noOverlap must be min > rangeMax || max < rangeMin, i.e. {code} boolean noOverlap(OffsetRange range) { return min > range.max || max < range.min; } boolean hasOverlap(OffsetRange range) { return !noOverlap(range); } {code} - OffsetRange may not implement Comparable correctly. The return value of compareTo has to follow the rules in [compareTo javadoc|http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html#compareTo%28T%29]. We cannot define it as "0: identical -1: on the left 1: on the right 2: overlapped". In particular, if x.compareTo( y) return 2 (i.e. when x and y overlapped), then y.compare( x) also return 2. Such x and y do not follow compareTo rules. > Provide HDFS based NFSv3 and Mountd implementation > -------------------------------------------------- > > Key: HDFS-4762 > URL: https://issues.apache.org/jira/browse/HDFS-4762 > Project: Hadoop HDFS > Issue Type: Sub-task > Affects Versions: 3.0.0 > Reporter: Brandon Li > Assignee: Brandon Li > Attachments: HDFS-4762.patch, HDFS-4762.patch.2, HDFS-4762.patch.3, > HDFS-4762.patch.3 > > > This is to track the implementation of NFSv3 to HDFS. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira