You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "James Clampffer (JIRA)" <ji...@apache.org> on 2016/08/03 20:14:20 UTC
[jira] [Commented] (HDFS-9271) Implement basic NN operations
[ https://issues.apache.org/jira/browse/HDFS-9271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15406547#comment-15406547 ]
James Clampffer commented on HDFS-9271:
---------------------------------------
Overall the patch looks good to me. Just some really minor things:
1) nit: weird space between namespace and type in hdfs.cc
{code}
void set_working_directory(std:: string new_directory) { working_directory = new_directory; }
{code}
2) Right now hdfsFile_internal tracks bytes read. Should this get pushed into FileHandle?
3) pedantic nit: 2 vs 4 space tabs in CheckSystemAndHandle
{code}
+ if (!CheckSystem(fs))
+ return false;
+
+ if (!CheckHandle(file))
+ return false;
{code}
4) Might still be worth doing calling CheckSystem in hdfsAvailable even if it's not implemented so latent bugs don't show up in surprising ways once it is implemented. Same thing for any other functions that are just stubbed in for now like hdfsUnbufferFile.
5) Might be worth turning NameNodeOperations::IsHighBitSet into a simple function in common/util.h. There's other places where that would be nice to use like checking before casting an unsigned into a signed type (related to HDFS-10554). Templating the function so it could check any integral type would be nice too but I can do that later on when I work on the conversion stuff.
Also if you're as bad at counting at counting a long row of 0s as I am it might be easier to replace the hex literal with something that makes your intention very clear:
{code}
uint64_t firstBit = 0x8000000000000000;
{code}
with
{code}
uint64_t firstBit = 0x1 << 63;
{code}
Any non-toy compiler will get rid of the shift with a constant folding pass.
> Implement basic NN operations
> -----------------------------
>
> Key: HDFS-9271
> URL: https://issues.apache.org/jira/browse/HDFS-9271
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: Bob Hansen
> Assignee: Anatoli Shein
> Attachments: HDFS-9271.HDFS-8707.000.patch, HDFS-9271.HDFS-8707.001.patch, HDFS-9271.HDFS-8707.002.patch, HDFS-9271.HDFS-8707.003.patch, HDFS-9271.HDFS-8707.004.patch, HDFS-9271.HDFS-8707.005.patch, HDFS-9271.HDFS-8707.006.patch, HDFS-9271.HDFS-8707.007.patch
>
>
> Expose via C and C++ API:
> * mkdirs
> * rename
> * delete
> * stat
> * chmod
> * chown
> * getListing
> * setOwner
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org