impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4902: Copy parameters map in HdfsPartition.toThrift().
Date Fri, 24 Feb 2017 00:54:12 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-4902: Copy parameters map in HdfsPartition.toThrift().

Patch Set 1:

Commit Message:

PS1, Line 11: As a result, one thread trying
            : to serialize a thrift table returned by toThrift() could
            : conflict with another thread updating the parameters maps of
            : the table partitions.
> Any example of what these operations could be?
File fe/src/main/java/org/apache/impala/catalog/

PS1, Line 1299: after with
> rephrase?
File fe/src/main/java/org/apache/impala/catalog/

PS1, Line 765: XYZ
> Update
Oops, sorry. Done.
File fe/src/main/java/org/apache/impala/catalog/

Line 72:   private final ReentrantLock tableLock_ = new ReentrantLock();
> How does removing fairness help here?
This change is not necessary for this fix, I can remove it if you prefer.

Fairness is not needed for this lock. Since a requirement for fairness is somewhat unusual,
having it may mislead readers to think that fairness has a purpose here.

PS1, Line 310: if (!tableLock_.isHeldByCurrentThread()) {
             :       throw new IllegalStateException(
             :           "Table.toThrift() called without holding the table lock: " +
             :               getFullName() + " " + getClass().getName());
             :     }
> Replace with Preconditions.checkState?
That will cause the second string parameter to unnecessarily be evaluated for every toThrift()

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic11277ad5512d2431cd3cc791715917c95395ddf
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-HasComments: Yes

View raw message