You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by cs...@apache.org on 2019/09/12 13:53:15 UTC

[impala] branch master updated: IMPALA-8940: Fix MetastoreEventsProcessorTest.testPartitionEvents in CDP builds

This is an automated email from the ASF dual-hosted git repository.

csringhofer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dc0af4  IMPALA-8940: Fix MetastoreEventsProcessorTest.testPartitionEvents in CDP builds
4dc0af4 is described below

commit 4dc0af494bc9d0651a435cd3a90e37199b499b63
Author: Csaba Ringhofer <cs...@cloudera.com>
AuthorDate: Wed Sep 11 16:46:43 2019 +0200

    IMPALA-8940: Fix MetastoreEventsProcessorTest.testPartitionEvents in CDP builds
    
    The problem was caused by "numFilesErasureCoded" property, which does
    not exist in CDP builds, and trivial event filtering only skipped
    events where a "trivial" property was changed, but not when it was
    added.
    
    Change-Id: Ie93e7237944142f616a80dec675280b397fe5995
    Reviewed-on: http://gerrit.cloudera.org:8080/14213
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../java/org/apache/impala/catalog/events/MetastoreEvents.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
index 6f23bf8..373dcd7 100644
--- a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
+++ b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
@@ -1378,8 +1378,12 @@ public class MetastoreEvents {
      static void setTrivialParameters(Map<String, String> parametersBefore,
         Map<String, String> parametersAfter) {
       for (String parameter: parametersToIgnore) {
-        parametersAfter.put(parameter,
-            parametersBefore.get(parameter));
+        String val = parametersBefore.get(parameter);
+        if (val == null) {
+          parametersAfter.remove(parameter);
+        } else {
+          parametersAfter.put(parameter, val);
+        }
       }
     }