You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org> on 2018/09/24 20:37:41 UTC
Review Request 68827: Exclude large-sized parameters from
serialization of
Table and Partition thrift objects in HMS notifications
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
Review request for hive and Alexander Kolbasov.
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
Diff: https://reviews.apache.org/r/68827/diff/1/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Karthik Manamcheri via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209313
-----------------------------------------------------------
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
Lines 515 (patched)
<https://reviews.apache.org/r/68827/#comment293623>
What happens if there is a comma in the list of exclude patterns?
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 939 (patched)
<https://reviews.apache.org/r/68827/#comment293624>
Maybe I am misunderstanding the reduce, but shoudln't you be "AND"ing all the predicates?
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
Lines 323 (patched)
<https://reviews.apache.org/r/68827/#comment293625>
Is there a reason why this filter is applied only to Table or Partition object?
- Karthik Manamcheri
On Oct. 2, 2018, 5:19 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Oct. 2, 2018, 5:19 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/MessageFactory.java 7ff168f7931f91fe17f7d38df848ba2eed33c463
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/5/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
(Updated Oct. 2, 2018, 5:19 a.m.)
Review request for hive and Alexander Kolbasov.
Changes
-------
I added init() method to MessageFactory, and overriding it in JSONMessageFactory to initialize the static variables. Although the exception traces look mostly similar, I guess this adds a bit more clarity and information about the exception if the regex is invalid.
Bugs: HIVE-20545
https://issues.apache.org/jira/browse/HIVE-20545
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs (updated)
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/MessageFactory.java 7ff168f7931f91fe17f7d38df848ba2eed33c463
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
Diff: https://reviews.apache.org/r/68827/diff/5/
Changes: https://reviews.apache.org/r/68827/diff/4-5/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
(Updated Sept. 30, 2018, 6:55 p.m.)
Review request for hive and Alexander Kolbasov.
Changes
-------
corrected the typo.
Bugs: HIVE-20545
https://issues.apache.org/jira/browse/HIVE-20545
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs (updated)
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
Diff: https://reviews.apache.org/r/68827/diff/4/
Changes: https://reviews.apache.org/r/68827/diff/3-4/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Andrew Sherman via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209102
-----------------------------------------------------------
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
Lines 517 (patched)
<https://reviews.apache.org/r/68827/#comment293362>
typo: th
- Andrew Sherman
On Sept. 28, 2018, 4:59 p.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 4:59 p.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/3/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
(Updated Sept. 28, 2018, 4:59 p.m.)
Review request for hive and Alexander Kolbasov.
Changes
-------
Added unit-tests which uses MetaStoreConf To make sure it works with default values
Bugs: HIVE-20545
https://issues.apache.org/jira/browse/HIVE-20545
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs (updated)
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
Diff: https://reviews.apache.org/r/68827/diff/3/
Changes: https://reviews.apache.org/r/68827/diff/2-3/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
(Updated Sept. 28, 2018, 10:17 a.m.)
Review request for hive and Alexander Kolbasov.
Bugs: HIVE-20545
https://issues.apache.org/jira/browse/HIVE-20545
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs (updated)
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
Diff: https://reviews.apache.org/r/68827/diff/2/
Changes: https://reviews.apache.org/r/68827/diff/1-2/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/
-----------------------------------------------------------
(Updated Sept. 28, 2018, 9:38 a.m.)
Review request for hive and Alexander Kolbasov.
Summary (updated)
-----------------
HIVE-20545 : Exclude large-sized parameters from serialization of Table and Partition thrift objects in HMS notifications
Bugs: HIVE-20545
https://issues.apache.org/jira/browse/HIVE-20545
Repository: hive-git
Description
-------
Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
Diffs
-----
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
Diff: https://reviews.apache.org/r/68827/diff/1/
Testing
-------
Thanks,
Bharathkrishna Guruvayoor Murali
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
> > Line 297 (original), 310 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091789#file2091789line310>
> >
> > This is used by the notifications that (we think) we understand, but it is also used by JSONAcidWriteMessage. So what happens if someone uses your new mechanism to reduce the size of messages, but affects JSONAcidWriteMessage? In other words there could be multile uses for notifications in a complex system, and this mechanism affects them all.
For now, I feel this change is reasonable and when there is a specific requirement that it should not filter parameters from other types of messages(if any), it can be taken up later on as an improvement.
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209031
-----------------------------------------------------------
On Sept. 30, 2018, 6:55 p.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 30, 2018, 6:55 p.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 913 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line913>
> >
> > Good doumentation!
> > Are you 100% sure that this Map is never sused by anyone else? What about future code?
By future code, do you mean for someone who might use this in future?
Currently, I have added a note in CreateTableObjJson to warn that the Map could be filtered based on regexes provided.
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 917 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line917>
> >
> > make private
I thought this could be used separately as a utility method, if the user has just one predicate. Should I just keep the other method which accepts a list of predicates and make this one private?
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209031
-----------------------------------------------------------
On Sept. 28, 2018, 9:38 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 9:38 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Andrew Sherman via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 917 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line917>
> >
> > make private
>
> Bharathkrishna Guruvayoor Murali wrote:
> I thought this could be used separately as a utility method, if the user has just one predicate. Should I just keep the other method which accepts a list of predicates and make this one private?
IDK, not super important
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
> > Lines 66 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091790#file2091790line66>
> >
> > add test with the default param map from MetastoreConf
>
> Bharathkrishna Guruvayoor Murali wrote:
> An empty exclude pattern will remove all elements from the map! But when it is done through configuration, the default value returns an empty array, like new String[0].
> Hence, the predicates become an empty List. What can I do if needed to add a test for this.
What I mean is a test that works from a default MetaConf object. This make the test more close to reality.
- Andrew
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209031
-----------------------------------------------------------
On Sept. 28, 2018, 10:17 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 10:17 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 5:51 p.m., Andrew Sherman wrote:
> > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
> > Lines 66 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091790#file2091790line66>
> >
> > add test with the default param map from MetastoreConf
An empty exclude pattern will remove all elements from the map! But when it is done through configuration, the default value returns an empty array, like new String[0].
Hence, the predicates become an empty List. What can I do if needed to add a test for this.
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209031
-----------------------------------------------------------
On Sept. 28, 2018, 10:17 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 10:17 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: Exclude large-sized parameters from
serialization
of Table and Partition thrift objects in HMS notifications
Posted by Andrew Sherman via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209031
-----------------------------------------------------------
Code looks clean, but I have some scary questions.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
Lines 517 (patched)
<https://reviews.apache.org/r/68827/#comment293294>
Make this clearer.
A list of comma separated regeses that are used to reduced the size of Hms Notifiaction messages.
If a partition name (?) or table name (?) matches a regex then the partition or table is excluded from the notification.
Or something
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
Lines 1412 (patched)
<https://reviews.apache.org/r/68827/#comment293295>
Add javadoc
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 913 (patched)
<https://reviews.apache.org/r/68827/#comment293296>
Good doumentation!
Are you 100% sure that this Map is never sused by anyone else? What about future code?
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 917 (patched)
<https://reviews.apache.org/r/68827/#comment293297>
make private
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
Lines 106 (patched)
<https://reviews.apache.org/r/68827/#comment293298>
So what if I make a miskae in a regex in config? This code will fail, what will happen then? How will I know what failed if my server won't start?
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
Line 297 (original), 310 (patched)
<https://reviews.apache.org/r/68827/#comment293302>
This is used by the notifications that (we think) we understand, but it is also used by JSONAcidWriteMessage. So what happens if someone uses your new mechanism to reduce the size of messages, but affects JSONAcidWriteMessage? In other words there could be multile uses for notifications in a complex system, and this mechanism affects them all.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
Lines 35 (patched)
<https://reviews.apache.org/r/68827/#comment293299>
Add javadoc
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
Lines 36 (patched)
<https://reviews.apache.org/r/68827/#comment293300>
We already have TestMetaStoreServerUtils, does this need a new file?
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
Lines 66 (patched)
<https://reviews.apache.org/r/68827/#comment293301>
add test with the default param map from MetastoreConf
- Andrew Sherman
On Sept. 24, 2018, 8:37 p.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2018, 8:37 p.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: Exclude large-sized parameters from
serialization
of Table and Partition thrift objects in HMS notifications
Posted by Alexander Kolbasov <ak...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209037
-----------------------------------------------------------
Please put JIRA ID in the header and also in the Bug field on the right of the review board.
- Alexander Kolbasov
On Sept. 24, 2018, 8:37 p.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2018, 8:37 p.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 917 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line917>
> >
> > I think a better name would be something like truncateMapByKey.
> >
> > Can you guarantee that it always receives non-null map? Then you don't need to check for null.
> >
> > Since you don't care about values, can this be a generic map `<String, T>`?
Since this is a utility method, I wanted to check for null as it could be called from other classes in future.
Making the Map<String, T>
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 918 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line918>
> >
> > You already have this check when you call this function.
I thought this could be used separately as a utility method, if the user has just one predicate. Should I just keep the other method which accepts a list of predicates and make this one private?
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 931 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line931>
> >
> > Naming - may be something like 'truncateMapByKeys'?
filter sounds better to me than truncate! I changed method name to filterMapKeys. Let me know if it is fine.
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
> > Line 297 (original), 310 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091789#file2091789line310>
> >
> > The default exclude filter is empty. When someone sets this variable they should understand what they are doing.
I added a better description for variable in MetastoreConf. Please let know if that is sufficient.
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
> > Lines 37 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091790#file2091790line37>
> >
> > Can you add a test with an empty exclude pattern?
An empty exclude pattern will remove all elements from the map! But when it is done through configuration, the default value returns an empty array, like new String[0].
Hence, the predicates become an empty List. What can I do if needed to add a test for this.
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209055
-----------------------------------------------------------
On Sept. 28, 2018, 9:38 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 9:38 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
> > Lines 44 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091790#file2091790line44>
> >
> > It would be better to use hamcrest asserts and just check that you map matches your expected map with a single assert.
Fixed.
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209055
-----------------------------------------------------------
On Sept. 28, 2018, 9:38 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2018, 9:38 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: HIVE-20545 : Exclude large-sized parameters
from
serialization of Table and Partition thrift objects in HMS notifications
Posted by Bharathkrishna Guruvayoor Murali via Review Board <no...@reviews.apache.org>.
> On Sept. 26, 2018, 11:20 p.m., Alexander Kolbasov wrote:
> > standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
> > Lines 918 (patched)
> > <https://reviews.apache.org/r/68827/diff/1/?file=2091788#file2091788line918>
> >
> > You already have this check when you call this function.
>
> Bharathkrishna Guruvayoor Murali wrote:
> I thought this could be used separately as a utility method, if the user has just one predicate. Should I just keep the other method which accepts a list of predicates and make this one private?
Closing this issue. Maintaining both methods as they can be used as separate utilities if needed.
- Bharathkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209055
-----------------------------------------------------------
On Oct. 2, 2018, 5:19 a.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Oct. 2, 2018, 5:19 a.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Bugs: HIVE-20545
> https://issues.apache.org/jira/browse/HIVE-20545
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f81292b0db54f4eb82468191fda38f9a0d4
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c6b10a4f9494e49a42282cf90027ad7
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/MessageFactory.java 7ff168f7931f91fe17f7d38df848ba2eed33c463
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b053205f48226da442ce65fcc2d7f6e76763
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java 30de1c4cfa1cf019186b10583a06da0bf5491634
>
>
> Diff: https://reviews.apache.org/r/68827/diff/5/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>
Re: Review Request 68827: Exclude large-sized parameters from
serialization
of Table and Partition thrift objects in HMS notifications
Posted by Alexander Kolbasov <ak...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68827/#review209055
-----------------------------------------------------------
Good overall, some small things below.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 917 (patched)
<https://reviews.apache.org/r/68827/#comment293318>
I think a better name would be something like truncateMapByKey.
Can you guarantee that it always receives non-null map? Then you don't need to check for null.
Since you don't care about values, can this be a generic map `<String, T>`?
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 918 (patched)
<https://reviews.apache.org/r/68827/#comment293321>
You already have this check when you call this function.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 928 (patched)
<https://reviews.apache.org/r/68827/#comment293320>
Looks like this can be a map with any value.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java
Lines 931 (patched)
<https://reviews.apache.org/r/68827/#comment293319>
Naming - may be something like 'truncateMapByKeys'?
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java
Line 297 (original), 310 (patched)
<https://reviews.apache.org/r/68827/#comment293325>
The default exclude filter is empty. When someone sets this variable they should understand what they are doing.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
Lines 37 (patched)
<https://reviews.apache.org/r/68827/#comment293324>
Can you add a test with an empty exclude pattern?
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java
Lines 44 (patched)
<https://reviews.apache.org/r/68827/#comment293322>
It would be better to use hamcrest asserts and just check that you map matches your expected map with a single assert.
- Alexander Kolbasov
On Sept. 24, 2018, 8:37 p.m., Bharathkrishna Guruvayoor Murali wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68827/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2018, 8:37 p.m.)
>
>
> Review request for hive and Alexander Kolbasov.
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> Clients can add large-sized parameters in Table/Partition objects. So we need to enable adding regex patterns through HiveConf to match parameters to be filtered from table and partition objects before serialization in HMS notifications.
>
>
> Diffs
> -----
>
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java 30ea7f8129
> standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java c681a87a1c
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/JSONMessageFactory.java 2668b05320
> standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/TestMetaStoreUtils.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/68827/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bharathkrishna Guruvayoor Murali
>
>