You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Steven Phillips (JIRA)" <ji...@apache.org> on 2014/04/05 20:11:15 UTC

[jira] [Commented] (DRILL-490) Possible nulls as keys and values while calculating affinity.

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

Steven Phillips commented on DRILL-490:
---------------------------------------

I think this is a duplicate of DRILL-483. I submitted a patch but it hasn't been merged to master yet.

> Possible nulls as keys and values while calculating affinity.
> -------------------------------------------------------------
>
>                 Key: DRILL-490
>                 URL: https://issues.apache.org/jira/browse/DRILL-490
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.0.0-milestone-1
>            Reporter: Bhallamudi Venkata Siva Kamesh
>         Attachments: DRILL-490.patch
>
>
> {code:title=HBaseGroupScan.java|borderStyle=solid}
> for (ServerName sn : regionsMap.values()) {
>       String host = sn.getHostname();
>       DrillbitEndpoint ep = endpointMap.get(host);
>       EndpointAffinity affinity = affinityMap.get(ep);
>       if (affinity == null) {
>         affinityMap.put(ep, new EndpointAffinity(ep, 1));
>       } else {
>         affinity.addAffinity(1);
>       }
> }
> {code}
> I think, from the above code if drill bits are not running nodes where regions are present, we get *ep* as null. Because of this, affinity map contains *null* as key and new EndpointAffinity(*null*, 1) as value. This causes NPE at Wrapper.addEndpointAffinity.



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