You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by el...@apache.org on 2017/03/01 00:55:46 UTC

[1/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Repository: phoenix
Updated Branches:
  refs/heads/4.9-HBase-0.98 46c4cdd70 -> ea64e716d
  refs/heads/4.9-HBase-1.1 1fb63c96b -> 1cce5a7aa
  refs/heads/4.9-HBase-1.2 485551151 -> bf91232df
  refs/heads/4.x-HBase-0.98 ee643f1fc -> c13a5b225
  refs/heads/4.x-HBase-1.1 f077be502 -> 31a2d9207
  refs/heads/4.x-HBase-1.3 7372d081f -> 69d6aa040
  refs/heads/master cbc43bbb6 -> 6d36fa7ca


PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/69d6aa04
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/69d6aa04
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/69d6aa04

Branch: refs/heads/4.x-HBase-1.3
Commit: 69d6aa04080efc7562d288c862f25b72ecb0d723
Parents: 7372d08
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 18:54:35 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/69d6aa04/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 1a70e12..80745a8 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("1", "1", "3");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/69d6aa04/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[7/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c13a5b22
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c13a5b22
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c13a5b22

Branch: refs/heads/4.x-HBase-0.98
Commit: c13a5b225a893746ad52d40871ebbecbe8f38540
Parents: ee643f1
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:54:59 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c13a5b22/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 17edc1f..bdb93a2 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("0", "98", "18");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c13a5b22/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[2/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/31a2d920
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/31a2d920
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/31a2d920

Branch: refs/heads/4.x-HBase-1.1
Commit: 31a2d9207f436558da81b7ad806b6e108e9ed357
Parents: f077be5
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:03:59 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/31a2d920/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 1a70e12..80745a8 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("1", "1", "3");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/31a2d920/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[4/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1cce5a7a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1cce5a7a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1cce5a7a

Branch: refs/heads/4.9-HBase-1.1
Commit: 1cce5a7aa64f18a95172cd52c7d6b11d36448b54
Parents: 1fb63c9
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:45:07 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1cce5a7a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 1a70e12..80745a8 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("1", "1", "3");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1cce5a7a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[6/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6d36fa7c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6d36fa7c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6d36fa7c

Branch: refs/heads/master
Commit: 6d36fa7ca70200568e285aa513f0a577eaade060
Parents: cbc43bb
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:54:51 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6d36fa7c/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 1a70e12..80745a8 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("1", "1", "3");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6d36fa7c/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[3/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bf91232d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bf91232d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bf91232d

Branch: refs/heads/4.9-HBase-1.2
Commit: bf91232dfd1a4f23dc36cb9629d670f66f34af42
Parents: 4855511
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:37:33 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bf91232d/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 1a70e12..80745a8 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("1", "1", "3");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bf91232d/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}


[5/7] phoenix git commit: PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Posted by el...@apache.org.
PHOENIX-3698 No-args constructor for IndexedWALEditCodec

Change-Id: Ic36c61a314e92aa9a8cdf496e210909abe5829dc


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/ea64e716
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ea64e716
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ea64e716

Branch: refs/heads/4.9-HBase-0.98
Commit: ea64e716d7bf0ebe3767a655fef2bfece050cbc5
Parents: 46c4cdd
Author: Josh Elser <el...@apache.org>
Authored: Mon Feb 27 16:55:42 2017 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 28 19:50:11 2017 -0500

----------------------------------------------------------------------
 .../regionserver/wal/IndexedWALEditCodec.java   | 20 ++++++++++--
 .../wal/IndexedWALEditCodecTest.java            | 32 ++++++++++++++++++++
 2 files changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ea64e716/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
index 17edc1f..bdb93a2 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodec.java
@@ -55,11 +55,27 @@ public class IndexedWALEditCodec extends WALCellCodec {
   private static final int MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION = VersionUtil.encodeVersion("0", "98", "18");
   private final boolean useDefaultDecoder;
 
+  private static boolean isUseDefaultDecoder() {
+      String hbaseVersion = VersionInfo.getVersion();
+      return VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+  }
+
+  /*
+   * No-args constructor must be provided for WALSplitter/RPC Codec path
+   */
+  public IndexedWALEditCodec() {
+      super();
+      this.compression = null;
+      this.useDefaultDecoder = isUseDefaultDecoder();
+  }
+
+  /*
+   * Two-args Configuration and CompressionContext codec must be provided for WALCellCodec path
+   */
   public IndexedWALEditCodec(Configuration conf, CompressionContext compression) {
       super(conf, compression);
       this.compression = compression;
-      String hbaseVersion = VersionInfo.getVersion();
-      this.useDefaultDecoder = VersionUtil.encodeVersion(hbaseVersion) >= MIN_BINARY_COMPATIBLE_INDEX_CODEC_VERSION;
+      this.useDefaultDecoder = isUseDefaultDecoder();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ea64e716/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
new file mode 100644
index 0000000..ee726bb
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/IndexedWALEditCodecTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver.wal;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.util.LRUDictionary;
+import org.junit.Test;
+
+public class IndexedWALEditCodecTest {
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testConstructorsArePresent() throws Exception {
+        // "testing" via the presence of these constructors
+        IndexedWALEditCodec codec1 = new IndexedWALEditCodec();
+        IndexedWALEditCodec codec2 = new IndexedWALEditCodec(new Configuration(false), new CompressionContext(LRUDictionary.class, false, false));
+    }
+}