hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-24065) Bloom filters can be cached after deserialization in VectorInBloomFilterColDynamicValue
Date Tue, 25 Aug 2020 08:27:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-24065?focusedWorklogId=474201&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-474201
]

ASF GitHub Bot logged work on HIVE-24065:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Aug/20 08:26
            Start Date: 25/Aug/20 08:26
    Worklog Time Spent: 10m 
      Work Description: abstractdog commented on a change in pull request #1423:
URL: https://github.com/apache/hive/pull/1423#discussion_r476270406



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorInBloomFilterColDynamicValue.java
##########
@@ -100,26 +103,39 @@ public void init(Configuration conf) {
     default:
       throw new IllegalStateException("Unsupported type " + colVectorType);
     }
+
+    String queryId = HiveConf.getVar(conf, HiveConf.ConfVars.HIVEQUERYID);
+    runtimeCache = ObjectCacheFactory.getCache(conf, queryId, false, true);
   }
 
-  private void initValue()  {
-    InputStream in = null;
+  private void initValue() {
     try {
-      Object val = bloomFilterDynamicValue.getValue();
-      if (val != null) {
-        BinaryObjectInspector boi = (BinaryObjectInspector) bloomFilterDynamicValue.getObjectInspector();
-        byte[] bytes = boi.getPrimitiveJavaObject(val);
-        in = new NonSyncByteArrayInputStream(bytes);
-        bloomFilter = BloomKFilter.deserialize(in);
-      } else {
-        bloomFilter = null;
-      }
-      initialized = true;
-    } catch (Exception err) {
-      throw new RuntimeException(err);
-    } finally {
-      IOUtils.closeStream(in);

Review comment:
       good catch, I think it's needed, or at least I removed it accidentally




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 474201)
    Time Spent: 50m  (was: 40m)

> Bloom filters can be cached after deserialization in VectorInBloomFilterColDynamicValue
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-24065
>                 URL: https://issues.apache.org/jira/browse/HIVE-24065
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2020-08-05-10-05-25-080.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Same bloom filter is loaded multiple times across tasks. It would be good to check if
we can optimise this, to avoid deserializing.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message