You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "hongwu (JIRA)" <ji...@apache.org> on 2016/11/27 02:02:58 UTC

[jira] [Comment Edited] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

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

hongwu edited comment on HAWQ-1173 at 11/27/16 2:02 AM:
--------------------------------------------------------

Hi [~pidefrem] , I think it is a known issue. In the current version of libhdfs3, we didn't implement the logic to support "port=0". I took a look at libhdfs (JNI) code, and I think libhdfs (JNI) has supported it(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L560).

Since libhdfs3 has some gaps with upstream HDFS while libhdfs (JNI) keeps the pace with upstream HDFS, we need more contributor to upgrade libhdfs3. Welcome pull request! 


was (Author: xunzhang):
Hi [~pidefrem] , I think it is a known issue. In the current version of libhdfs3, we didn't implement the logic to support "port=0" which means the server will start on a randomly free port in this case. I took a look at libhdfs (JNI) code, and I think libhdfs (JNI) has supported it(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L560).

Since libhdfs3 has some gaps with upstream HDFS while libhdfs (JNI) keeps the pace with upstream HDFS, we need more contributor to upgrade libhdfs3. If you could implement this feature, that will be so great. Welcome pull request! 

> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0
> -------------------------------------------------------------------------------------------------
>
>                 Key: HAWQ-1173
>                 URL: https://issues.apache.org/jira/browse/HAWQ-1173
>             Project: Apache HAWQ
>          Issue Type: Improvement
>          Components: libhdfs
>            Reporter: Pierre de Freminville
>            Assignee: Zhanwei Wang
>            Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)