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

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

                Author: ASF GitHub Bot
            Created on: 11/Sep/20 07:30
            Start Date: 11/Sep/20 07:30
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #1478:
URL: https://github.com/apache/hive/pull/1478#discussion_r486826515



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/event/filters/CatalogFilter.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.messaging.event.filters;
+
+import org.apache.hadoop.hive.metastore.api.NotificationEvent;
+
+/**
+ * Utility function that constructs a notification filter to match a given 
catalog name.
+ */
+public class CatalogFilter extends BasicFilter {
+  private final String catalogName;
+
+  public CatalogFilter(final String catalogName) {
+    this.catalogName = catalogName;
+  }
+
+  @Override
+  boolean shouldAccept(final NotificationEvent event) {
+    if (catalogName == null || event.getCatName() == null || 
catalogName.equalsIgnoreCase(event.getCatName())) {

Review comment:
       catalogName should never be null. If not configured also, it must be 
default which is "hive". I think we should let it fail if filter is initialized 
with catalogName being null .




----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 481933)
    Time Spent: 20m  (was: 10m)

> Dump events from default catalog only
> -------------------------------------
>
>                 Key: HIVE-24127
>                 URL: https://issues.apache.org/jira/browse/HIVE-24127
>             Project: Hive
>          Issue Type: Task
>            Reporter: Aasha Medhi
>            Assignee: Aasha Medhi
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-24127.01.patch, HIVE-24127.02.patch, 
> HIVE-24127.03.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Don't dump events from spark catalog. In bootstrap we skip spark tables. In 
> inceremental load also we should skip spark events.



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

Reply via email to