You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org> on 2020/12/16 14:07:14 UTC

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16882


Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................

IMPALA-10398: Altering an Iceberg table might throw NullPointerException

IcebergSchemaConverter has a static thread local member which might
not have a value in the current thread when nextId() is invoked. In
that case the thread local integer's get() method returns a null and
we get a NullPointerException when we want to convert it to a builtin
int.

This patch initializes the thread local variable with an anonymous
subclass of ThreadLocal that overrides the 'initialValue()' method
which returns 0 instead of null.

Testing
 * tested manually by restarting the impala cluster and issuing
   ALTER TABLE .. ADD COLUMNS <columns with complex types>
 * looped test_alter_iceberg_tables for a while

Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
---
M fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java
1 file changed, 6 insertions(+), 1 deletion(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

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

Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................


Patch Set 1: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Dec 2020 21:59:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

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

Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................

IMPALA-10398: Altering an Iceberg table might throw NullPointerException

IcebergSchemaConverter has a static thread local member which might
not have a value in the current thread when nextId() is invoked. In
that case the thread local integer's get() method returns a null and
we get a NullPointerException when we want to convert it to a builtin
int.

This patch initializes the thread local variable with an anonymous
subclass of ThreadLocal that overrides the 'initialValue()' method
which returns 0 instead of null.

Testing
 * tested manually by restarting the impala cluster and issuing
   ALTER TABLE .. ADD COLUMNS <columns with complex types>
 * looped test_alter_iceberg_tables for a while

Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Reviewed-on: http://gerrit.cloudera.org:8080/16882
Reviewed-by: Gabor Kaszab <ga...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java
1 file changed, 6 insertions(+), 1 deletion(-)

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

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

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

Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................


Patch Set 1: Code-Review+2

Nice catch!


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Dec 2020 16:27:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

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

Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/7865/ : 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/16882
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Dec 2020 14:29:34 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10398: Altering an Iceberg table might throw NullPointerException

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

Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException
......................................................................


Patch Set 1:

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


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Dec 2020 16:29:47 +0000
Gerrit-HasComments: No