You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Binglin Chang (JIRA)" <ji...@apache.org> on 2014/06/03 10:30:02 UTC

[jira] [Commented] (HADOOP-10640) Implement Namenode RPCs in HDFS native client

    [ https://issues.apache.org/jira/browse/HADOOP-10640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14016318#comment-14016318 ] 

Binglin Chang commented on HADOOP-10640:
----------------------------------------

Thanks for the patch Colin. Have not finished reviewing, some comments:

CMakeLists.txt: #add_subdirectory(fs) fs/CMakeLists.txt redundant?
CMakeLists.txt:  #include(Libhdfs.cmake)  do not have this file
CMakeList.txt: -fvisibility=hidden macosx also support this(if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") to detected), you can add this or I can add it later.
fs/fs.h:136 use hdfsFile/hdfsFs instead of struct hdfsFile_internal */struct hdfs_internal ?
config.h.cmake HCONF_XML_TEST_PATH we can set CLASSPATH env in tests, it better than static config macro

when compiling(looks like clang can find more code bugs than gcc...):

should add ${JNI_INCLUDE_DIRS} in include_directories:

In file included from /Users/decster/projects/hadoop-trunk/hadoop-native-core/test/native_mini_dfs.c:21:
/Users/decster/projects/hadoop-trunk/hadoop-native-core/jni/exception.h:37:10: fatal error: 'jni.h' file not found
#include <jni.h>


should unified to tTime:

/Users/decster/projects/hadoop-trunk/hadoop-native-core/ndfs/ndfs.c:1055:14: warning: incompatible pointer types initializing 'int (*)(struct hdfs_internal *, const char *, int64_t, int64_t)' with
      an expression of type 'int (hdfsFS, const char *, tTime, tTime)' [-Wincompatible-pointer-types]
    .utime = ndfs_utime,
             ^~~~~~~~~~

wrong memset usage:

/Users/decster/projects/hadoop-trunk/hadoop-native-core/fs/common.c:39:36: warning: 'memset' call operates on objects of type 'hdfsFileInfo' (aka 'struct file_info') while the size is based on a
      different type 'hdfsFileInfo *' (aka 'struct file_info *') [-Wsizeof-pointer-memaccess]
    memset(hdfsFileInfo, 0, sizeof(hdfsFileInfo));
           ~~~~~~~~~~~~            ^~~~~~~~~~~~
/Users/decster/projects/hadoop-trunk/hadoop-native-core/rpc/proxy.c:102:27: warning: 'memset' call operates on objects of type 'struct hrpc_sync_ctx' while the size is based on a different type
      'struct hrpc_sync_ctx *' [-Wsizeof-pointer-memaccess]
    memset(ctx, 0, sizeof(ctx));
           ~~~            ^~~




> Implement Namenode RPCs in HDFS native client
> ---------------------------------------------
>
>                 Key: HADOOP-10640
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10640
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: native
>    Affects Versions: HADOOP-10388
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HADOOP-10640-pnative.001.patch
>
>
> Implement the parts of libhdfs that just involve making RPCs to the Namenode, such as mkdir, rename, etc.



--
This message was sent by Atlassian JIRA
(v6.2#6252)