hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Elmahrek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10640) Implement Namenode RPCs in HDFS native client
Date Tue, 10 Jun 2014 17:39:02 GMT

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

Abraham Elmahrek commented on HADOOP-10640:

Awesome stuff Colin. Just a few comments:

* Do we need to call free in hadoop_err_prepend.c for asprintf error cases? Docs say no memory
is allocated in this case.
if (asprintf(&nmsg, "%s: %s", prepend_str, err->msg) < 0) {
    return (struct hadoop_err*)err;

* The hash table implementation has an unbounded while loop. Though, it will probably never
happen since we guarantee there will always be an open spot, would we add a terminal case
to it?
static void htable_insert_internal(struct htable_pair *nelem, 
        uint32_t capacity, htable_hash_fn_t hash_fun, void *key,
        void *val)
    uint32_t i;

    i = hash_fun(key, capacity);
    while (1) {
        if (!nelem[i].key) {
            nelem[i].key = key;
            nelem[i].val = val;
        if (i == capacity) {
            i = 0;

* Should the above hash table be modified to allow custom hash functions in the future? Modifications
would include ensuring the hash function was within bounds, providing an interface, etc.

* The config object seems to be using the builder pattern. Wouldn't it make sense to just
create a configuration object and provide 'set' and 'get' functions? Unless the configuration
object is immutable?

> 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, HADOOP-10640-pnative.002.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

View raw message