Repository: phoenix Updated Branches: refs/heads/4.10-HBase-1.2 f53d61f21 -> 42ec7c9aa
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/42ec7c9a Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/42ec7c9a Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/42ec7c9a Branch: refs/heads/4.10-HBase-1.2 Commit: 42ec7c9aa9d0a08de36b5b5397e45962dfeda059 Parents: f53d61f Author: Samarth <[email protected]> Authored: Thu Apr 6 12:36:37 2017 -0700 Committer: Samarth <[email protected]> Committed: Thu Apr 6 12:36:37 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/42ec7c9a/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(); }
