You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org> on 2021/07/20 22:37:33 UTC

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Vihang Karajgaonkar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17707


Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................

IMPALA-10815: Ignore events on non-default hive catalogs

Hive-3 supports a new type in metastore called catalogs. Even
though impala does not support custom catalogs, it is still possible
that some external HMS client creates objects within a non-default
catalog. This can become problematic when the objects within
the custom catalog match with the name of other objects in the default
catalog. For example, dropping a custom catalog generates a
DROP_DATABASE event on default database of that catalog. When such
event is processed, the events processor can remove the default
database.

This patch adds logic to ignore all the events which are
generated on such non-default catalog objects. The default value of
catalog is defined in the hive-site.xml of the metastore client which
is used by catalogd. If the value is not present it default to "hive".

Additionally, it also adds the code to validate that the default
catalog name defined in the hive-site.xml of the catalogd is same
as in metastore server side. If the values do not match, the
events processor does not come up.

Testing:
1. Added a new test which creates a custom hive catalog and events
on it. The test makes sure that such events do not affect objects in
catalogd.

Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventProcessorConfig.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 140 insertions(+), 35 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/17707/2
-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 2
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
File fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java:

http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java@225
PS2, Line 225:   private static void dropDatabaseCascade(String catName, String dbName) throws TException {
> line too long (92 > 90)
Done


http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java@3028
PS2, Line 3028:   private void createTable(String dbName, String tblName, boolean isPartitioned) throws TException {
> line too long (100 > 90)
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 2
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 22:40:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 3:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/9132/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 3
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 23:08:15 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
File fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java:

http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java@225
PS2, Line 225:   private static void dropDatabaseCascade(String catName, String dbName) throws TException {
line too long (92 > 90)


http://gerrit.cloudera.org:8080/#/c/17707/2/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java@3028
PS2, Line 3028:   private void createTable(String dbName, String tblName, boolean isPartitioned) throws TException {
line too long (100 > 90)



-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 2
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 22:38:20 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 5:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/7331/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 5
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Jul 2021 18:40:52 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 5: Code-Review+2

LGTM. Carrying Zoltan's +1. Thanks for fixing this!


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 5
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Jul 2021 01:44:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 6: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 6
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Jul 2021 10:23:31 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 6:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/7333/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 6
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Jul 2021 10:23:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 4: Code-Review+1

(2 comments)

LGTM!

http://gerrit.cloudera.org:8080/#/c/17707/4/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
File fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java:

http://gerrit.cloudera.org:8080/#/c/17707/4/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@231
PS4, Line 231:             && catalog_.isBlacklistedTable(eventDb, eventTbl))) {
Should we include a check for catalogName here as well? So we don't log this message if the db/tbl belongs to a different catalog.

Or probably we should just do the catalog check first.


http://gerrit.cloudera.org:8080/#/c/17707/4/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
File fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java:

http://gerrit.cloudera.org:8080/#/c/17707/4/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java@367
PS4, Line 367:     if (MetastoreShim.getMajorVersion() >= 2) {
We dropped support for Hive 2, so it will always be true.



-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 4
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Jul 2021 16:58:44 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................

IMPALA-10815: Ignore events on non-default hive catalogs

Hive-3 supports a new type in metastore called catalogs. Even
though impala does not support custom catalogs, it is still possible
that some external HMS client creates objects within a non-default
catalog. This can become problematic when the objects within
the custom catalog match with the name of other objects in the default
catalog. For example, dropping a custom catalog generates a
DROP_DATABASE event on default database of that catalog. When such
event is processed, the events processor can remove the default
database.

This patch adds logic to ignore all the events which are
generated on such non-default catalog objects. The default value of
catalog is defined in the hive-site.xml of the metastore client which
is used by catalogd. If the value is not present it default to "hive".

Additionally, it also adds the code to validate that the default
catalog name defined in the hive-site.xml of the catalogd is same
as in metastore server side. If the values do not match, the
events processor does not come up.

This patch also removes some config validations which are specific
to hive-2 since we don't support hive-2 anymore in master.

Testing:
1. Added a new test which creates a custom hive catalog and events
on it. The test makes sure that such events do not affect objects in
catalogd.

Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventProcessorConfig.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 150 insertions(+), 89 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/17707/5
-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 5
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 6: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 6
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Jul 2021 16:36:22 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................

IMPALA-10815: Ignore events on non-default hive catalogs

Hive-3 supports a new type in metastore called catalogs. Even
though impala does not support custom catalogs, it is still possible
that some external HMS client creates objects within a non-default
catalog. This can become problematic when the objects within
the custom catalog match with the name of other objects in the default
catalog. For example, dropping a custom catalog generates a
DROP_DATABASE event on default database of that catalog. When such
event is processed, the events processor can remove the default
database.

This patch adds logic to ignore all the events which are
generated on such non-default catalog objects. The default value of
catalog is defined in the hive-site.xml of the metastore client which
is used by catalogd. If the value is not present it default to "hive".

Additionally, it also adds the code to validate that the default
catalog name defined in the hive-site.xml of the catalogd is same
as in metastore server side. If the values do not match, the
events processor does not come up.

Testing:
1. Added a new test which creates a custom hive catalog and events
on it. The test makes sure that such events do not affect objects in
catalogd.

Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventProcessorConfig.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 142 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/17707/3
-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 3
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 5:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/9136/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 5
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Jul 2021 19:08:09 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 3: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/7327/


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 3
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Jul 2021 04:49:13 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/9131/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 2
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 23:05:56 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 5: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 5
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Jul 2021 00:59:08 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................

IMPALA-10815: Ignore events on non-default hive catalogs

Hive-3 supports a new type in metastore called catalogs. Even
though impala does not support custom catalogs, it is still possible
that some external HMS client creates objects within a non-default
catalog. This can become problematic when the objects within
the custom catalog match with the name of other objects in the default
catalog. For example, dropping a custom catalog generates a
DROP_DATABASE event on default database of that catalog. When such
event is processed, the events processor can remove the default
database.

This patch adds logic to ignore all the events which are
generated on such non-default catalog objects. The default value of
catalog is defined in the hive-site.xml of the metastore client which
is used by catalogd. If the value is not present it default to "hive".

Additionally, it also adds the code to validate that the default
catalog name defined in the hive-site.xml of the catalogd is same
as in metastore server side. If the values do not match, the
events processor does not come up.

This patch also removes some config validations which are specific
to hive-2 since we don't support hive-2 anymore in master.

Testing:
1. Added a new test which creates a custom hive catalog and events
on it. The test makes sure that such events do not affect objects in
catalogd.

Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Reviewed-on: http://gerrit.cloudera.org:8080/17707
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventProcessorConfig.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 150 insertions(+), 89 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 7
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/7327/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 3
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 22:41:16 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................


Patch Set 4:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/9133/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 4
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Jul 2021 23:23:02 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10815: Ignore events on non-default hive catalogs

Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/17707 )

Change subject: IMPALA-10815: Ignore events on non-default hive catalogs
......................................................................

IMPALA-10815: Ignore events on non-default hive catalogs

Hive-3 supports a new type in metastore called catalogs. Even
though impala does not support custom catalogs, it is still possible
that some external HMS client creates objects within a non-default
catalog. This can become problematic when the objects within
the custom catalog match with the name of other objects in the default
catalog. For example, dropping a custom catalog generates a
DROP_DATABASE event on default database of that catalog. When such
event is processed, the events processor can remove the default
database.

This patch adds logic to ignore all the events which are
generated on such non-default catalog objects. The default value of
catalog is defined in the hive-site.xml of the metastore client which
is used by catalogd. If the value is not present it default to "hive".

Additionally, it also adds the code to validate that the default
catalog name defined in the hive-site.xml of the catalogd is same
as in metastore server side. If the values do not match, the
events processor does not come up.

Testing:
1. Added a new test which creates a custom hive catalog and events
on it. The test makes sure that such events do not affect objects in
catalogd.

Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
---
M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventProcessorConfig.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 142 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/17707/4
-- 
To view, visit http://gerrit.cloudera.org:8080/17707
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ided463b2a98331d3d305bbe92fbf3a5d2e197acf
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 4
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>