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

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

 sizeof(struct hrpc_proxy) always larger than RPC_PROXY_USERDATA_MAX?
{code}
void *hrpc_proxy_alloc_userdata(struct hrpc_proxy *proxy, size_t size)
{
    if (size > RPC_PROXY_USERDATA_MAX) {
        return NULL;
    }
    return proxy->userdata;
}

struct hrpc_sync_ctx *hrpc_proxy_alloc_sync_ctx(struct hrpc_proxy *proxy)
{
    struct hrpc_sync_ctx *ctx = 
        hrpc_proxy_alloc_userdata(proxy, sizeof(struct hrpc_proxy));
    if (!ctx) {
        return NULL;
    }
    if (uv_sem_init(&ctx->sem, 0)) {
        return NULL;
    }
    memset(&ctx, 0, sizeof(ctx));
    return ctx;
}
{code}

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

Reply via email to