Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 5a94c5a63 -> afbc7c226
PHOENIX-3765 NPE in IndexMaintainer when using old client and 4.10 server Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/afbc7c22 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/afbc7c22 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/afbc7c22 Branch: refs/heads/4.x-HBase-0.98 Commit: afbc7c2263362352abeaebfa5ddfc7110ef31e71 Parents: 5a94c5a Author: Samarth <[email protected]> Authored: Thu Apr 6 12:33:49 2017 -0700 Committer: Samarth <[email protected]> Committed: Thu Apr 6 12:33:49 2017 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/phoenix/index/IndexMaintainer.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/afbc7c22/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java index 2224e38..26c2421 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java @@ -1308,6 +1308,9 @@ public class IndexMaintainer implements Writable, Iterable<ColumnReference> { int encodedEstimatedIndexRowKeyBytesAndImmutableRows = WritableUtils.readVInt(input); this.immutableRows = encodedEstimatedIndexRowKeyBytesAndImmutableRows < 0; this.estimatedIndexRowKeyBytes = Math.abs(encodedEstimatedIndexRowKeyBytesAndImmutableRows); + // Needed for backward compatibility. Clients older than 4.10 will have non-encoded tables. + this.immutableStorageScheme = ImmutableStorageScheme.ONE_CELL_PER_COLUMN; + this.encodingScheme = QualifierEncodingScheme.NON_ENCODED_QUALIFIERS; initCachedState(); }
