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

BELUGA BEHR commented on HIVE-16855:
------------------------------------

The only thing I can't figure out here is:

{code:java}
  private void loadDirectly(MapJoinTableContainer[] mapJoinTables, String 
inputFileName)
      throws Exception {
...
    MapJoinTableContainer[] tables = sink.getMapJoinTables();
    for (int i = 0; i < sink.getNumParent(); i++) {
      if (sink.getParentOperators().get(i) != null) {
        mapJoinTables[i] = tables[i];
      }
    }

    Arrays.fill(tables, null);
{code}

Why is the 'tables' array being filled with NULL values?  This is poor 
encapsulation that the sink's internal array is being manipulated outside of 
the sink code itself.  There is no comment why this is being done.  It could be 
that the array is being NULL'ed out to allow for GC, but all of the object 
references are being copied into 'mapJoinTables', which is an argument to the 
method, so no GC will be occurring anyway.  I've just removed this call.

> org.apache.hadoop.hive.ql.exec.mr.HashTableLoader Improvements
> --------------------------------------------------------------
>
>                 Key: HIVE-16855
>                 URL: https://issues.apache.org/jira/browse/HIVE-16855
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 2.1.1, 3.0.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: HIVE-16855.1.patch, HIVE-16855.2.patch
>
>
> # Improve (Simplify) Logging
> # Remove custom buffer size for {{BufferedInputStream}} and instead rely on 
> JVM default which is often larger these days (8192)
> # Simplify looping logic



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to