You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2018/06/07 06:34:37 UTC

[Impala-ASF-CR](2.x) IMPALA-7110. Fix errors from error-prone

Hello Bharath Vissapragada, Philip Zeyliger, Impala Public Jenkins,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/10634

to review the following change.


Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................

IMPALA-7110. Fix errors from error-prone

* Fixes several cases of Preconditions.checkNotNull(<bool>) which were
  ineffective. Instead, we should use Preconditions.checkState.

* Fixed a case of synchronizing on a non-final class member, which is a
  bad practice.

* Fixed a case of trying to stringify an array instead of using Joiner
  to join it to a human-readable representation.

* Fixed a couple cases where the format string in String.format didn't
  match the number of arguments passed.

* Fixed a test where PrimitiveType objects were being used to look up
  elements in a Map<ScalarType, String>. This would always return null,
  so the test was ineffective.

I elected not to enable error-prone in the default maven profile since
it increases compilation time noticeably. It can be enabled by running
'mvn -Perrorprone'.

Even with this patch there are a bunch of warnings -- this only
addresses the issues that errorprone considers "errors".

Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Reviewed-on: http://gerrit.cloudera.org:8080/10583
Reviewed-by: Bharath Vissapragada <bh...@cloudera.com>
Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/pom.xml
M fe/src/main/java/org/apache/impala/analysis/CreateUdfStmt.java
M fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java
M fe/src/main/java/org/apache/impala/analysis/Path.java
M fe/src/main/java/org/apache/impala/catalog/DiskIdMapper.java
M fe/src/main/java/org/apache/impala/catalog/ScalarFunction.java
M fe/src/main/java/org/apache/impala/catalog/StructType.java
M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
11 files changed, 51 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/34/10634/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10634
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>

[Impala-ASF-CR](2.x) IMPALA-7110. Fix errors from error-prone

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

Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/2616/


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10634
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Jun 2018 06:35:37 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](2.x) IMPALA-7110. Fix errors from error-prone

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/10634 )

Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................

IMPALA-7110. Fix errors from error-prone

* Fixes several cases of Preconditions.checkNotNull(<bool>) which were
  ineffective. Instead, we should use Preconditions.checkState.

* Fixed a case of synchronizing on a non-final class member, which is a
  bad practice.

* Fixed a case of trying to stringify an array instead of using Joiner
  to join it to a human-readable representation.

* Fixed a couple cases where the format string in String.format didn't
  match the number of arguments passed.

* Fixed a test where PrimitiveType objects were being used to look up
  elements in a Map<ScalarType, String>. This would always return null,
  so the test was ineffective.

I elected not to enable error-prone in the default maven profile since
it increases compilation time noticeably. It can be enabled by running
'mvn -Perrorprone'.

Even with this patch there are a bunch of warnings -- this only
addresses the issues that errorprone considers "errors".

Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Reviewed-on: http://gerrit.cloudera.org:8080/10583
Reviewed-by: Bharath Vissapragada <bh...@cloudera.com>
Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-on: http://gerrit.cloudera.org:8080/10634
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
---
M fe/pom.xml
M fe/src/main/java/org/apache/impala/analysis/CreateUdfStmt.java
M fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java
M fe/src/main/java/org/apache/impala/analysis/Path.java
M fe/src/main/java/org/apache/impala/catalog/DiskIdMapper.java
M fe/src/main/java/org/apache/impala/catalog/ScalarFunction.java
M fe/src/main/java/org/apache/impala/catalog/StructType.java
M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
11 files changed, 51 insertions(+), 14 deletions(-)

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

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10634
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR](2.x) IMPALA-7110. Fix errors from error-prone

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

Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10634/1/fe/pom.xml
File fe/pom.xml:

http://gerrit.cloudera.org:8080/#/c/10634/1/fe/pom.xml@690
PS1, Line 690:     </profile>
master has some additional profiles that caused a merge conflict



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10634
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Jun 2018 06:35:29 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR](2.x) IMPALA-7110. Fix errors from error-prone

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

Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................


Patch Set 1: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10634
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Jun 2018 10:18:56 +0000
Gerrit-HasComments: No