You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2023/09/20 17:43:28 UTC

[impala] branch branch-4.3.0 updated: Revert "IMPALA-12399: Add filter to skip OPEN_TXN events from HMS"

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

michaelsmith pushed a commit to branch branch-4.3.0
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/branch-4.3.0 by this push:
     new 056a9cc26 Revert "IMPALA-12399: Add filter to skip OPEN_TXN events from HMS"
056a9cc26 is described below

commit 056a9cc26f40cd491b52f5fa80d73646680ac13e
Author: Michael Smith <mi...@cloudera.com>
AuthorDate: Wed Sep 20 10:38:23 2023 -0700

    Revert "IMPALA-12399: Add filter to skip OPEN_TXN events from HMS"
    
    This reverts commit 73430a2cdcb4be876cd73303a664414c3f94f9fd as issues
    were found that will take time to address (see IMPALA-12399 for
    details).
---
 .../java/org/apache/impala/compat/MetastoreShim.java    |  1 -
 .../impala/catalog/events/MetastoreEventsProcessor.java |  5 -----
 .../catalog/events/MetastoreEventsProcessorTest.java    | 17 -----------------
 3 files changed, 23 deletions(-)

diff --git a/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java b/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
index d36b46444..71bac5179 100644
--- a/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
+++ b/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
@@ -586,7 +586,6 @@ public class MetastoreShim extends Hive3MetastoreShimBase {
    */
   public static NotificationEventResponse getNextNotification(IMetaStoreClient msClient,
       NotificationEventRequest eventRequest) throws TException {
-    eventRequest.setEventTypeSkipList(MetastoreEventsProcessor.getEventSkipList());
     return msClient.getThriftClient().get_next_notification(eventRequest);
   }
 
diff --git a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
index d3debde25..c392ef980 100644
--- a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
+++ b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
@@ -265,9 +265,6 @@ public class MetastoreEventsProcessor implements ExternalEventsProcessor {
 
   private static final long SECOND_IN_NANOS = 1000 * 1000 * 1000L;
 
-  // List of event types to skip while fetching notification events from metastore
-  private static final List<String> EVENT_SKIP_LIST = Arrays.asList("OPEN_TXN");
-
   /**
    * Wrapper around {@link
    * MetastoreEventsProcessor#getNextMetastoreEventsInBatches(CatalogServiceCatalog,
@@ -1129,6 +1126,4 @@ public class MetastoreEventsProcessor implements ExternalEventsProcessor {
   public static MessageDeserializer getMessageDeserializer() {
     return MESSAGE_DESERIALIZER;
   }
-
-  public static List<String> getEventSkipList() { return EVENT_SKIP_LIST; }
 }
diff --git a/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java b/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
index b1dd8b097..bfd44f86c 100644
--- a/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
+++ b/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
@@ -3259,23 +3259,6 @@ public class MetastoreEventsProcessorTest {
     }
   }
 
-  /**
-   * Test whether open transaction event is skipped while fetching notification events
-   * @throws Exception
-   */
-  @Test
-  public void testSkipFetchOpenTransactionEvent() throws Exception {
-    try (MetaStoreClient client = catalog_.getMetaStoreClient()) {
-      // Make an empty transaction
-      long txnId = MetastoreShim.openTransaction(client.getHiveClient());
-      MetastoreShim.commitTransaction(client.getHiveClient(), txnId);
-    }
-    List<NotificationEvent> events = eventsProcessor_.getNextMetastoreEvents();
-    assertEquals(1, events.size());
-    assertEquals(MetastoreEventType.COMMIT_TXN,
-        MetastoreEventType.from(events.get(0).getEventType()));
-  }
-
   private void createDatabase(String catName, String dbName,
       Map<String, String> params) throws TException {
     try(MetaStoreClient msClient = catalog_.getMetaStoreClient()) {