Repository: phoenix Updated Branches: refs/heads/4.10-HBase-1.1 803770620 -> e5c016577
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/e5c01657 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e5c01657 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e5c01657 Branch: refs/heads/4.10-HBase-1.1 Commit: e5c01657717435b033b3f9a93b7a63dc4df553d6 Parents: 8037706 Author: Samarth <[email protected]> Authored: Thu Apr 6 12:36:12 2017 -0700 Committer: Samarth <[email protected]> Committed: Thu Apr 6 12:36:12 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/e5c01657/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(); }
