hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihang Karajgaonkar (JIRA)" <>
Subject [jira] [Commented] (HIVE-20257) Improvements to
Date Fri, 24 Aug 2018 18:00:00 GMT


Vihang Karajgaonkar commented on HIVE-20257:

Hi [~belugabehr] Thanks for providing the patch. I took a quick look and I have some suggestions

1. The patch changes the return type of one of the method to {{Collections.singletonList(part);}}
which is a immutable list. This is semantically different than what was happening previously
and I am not sure if the calling method hierarchy assumes a immutable list. I would suggest
to to keep it the way it is or change to \{{Arrays.asList(part)}}.

2. I think changing {{final List<Future<ObjectPair<Path, Path>>> futures
= new LinkedList<>();}} to \{{final List<Future<ObjectPair<Path, Path>>>
futures = new ArrayList<>();}} is unnecessary.

Also, Is there a particular advantage of using StringUtils, ArrayUtils and MapUtils to check
for null or empty objects? Is the change only for improving readability of there is something
more to it.

> Improvements to
> -------------------------
>                 Key: HIVE-20257
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 3.0.0, 4.0.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>             Fix For: 4.0.0
>         Attachments: HIVE-20257.1.patch, HIVE-20257.2.patch, HIVE-20257.3.patch, HIVE-20257.4.patch
> Various fixes to {{}}
>  * Use Log4J parameters in logging statements
>  * Fix check styles
>  * Make code more concise
>  * Remove "log and throw" code
>  * Replaced calls to deprecated code
>  * Removed superfluous calls to {{toString}}
> "log and throw" is considered and anti-pattern.  Only the highest level catch should
be providing detailed logging otherwise we print the same stack trace to the logs several
times and with different context (for example when an exception is wrapped, we get two different
logging events).

This message was sent by Atlassian JIRA

View raw message