Repository: phoenix Updated Branches: refs/heads/4.10-HBase-0.98 e5bd5a87f -> b70255499
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/b7025549 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b7025549 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b7025549 Branch: refs/heads/4.10-HBase-0.98 Commit: b7025549927f47fe519fb5d3517bd89ee0f30e21 Parents: e5bd5a8 Author: Samarth <[email protected]> Authored: Thu Apr 6 12:35:41 2017 -0700 Committer: Samarth <[email protected]> Committed: Thu Apr 6 12:35:41 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/b7025549/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(); }
