You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2014/10/29 00:58:56 UTC
[11/24] git commit: PHOENIX-1381 NPE in CellUtil.matchingFamily() for
IndexedKeyValue (Jeffrey Zhong)
PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey Zhong)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b84b91ee
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b84b91ee
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b84b91ee
Branch: refs/heads/4.2
Commit: b84b91eeebc31fafced60e96a23c9e484500d44c
Parents: f5a49bf
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Oct 27 09:13:11 2014 -0700
Committer: James Taylor <jt...@salesforce.com>
Committed: Mon Oct 27 09:13:11 2014 -0700
----------------------------------------------------------------------
.../hbase/index/wal/IndexedKeyValue.java | 46 +++++++++++++++++++-
1 file changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b84b91ee/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
index 0be1a6b..0270de5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
public class IndexedKeyValue extends KeyValue {
- public static final byte [] COLUMN_FAMILY = Bytes.toBytes("INDEXEDKEYVALUE_FAKED_FAMILY");
+ public static final byte [] COLUMN_QUALIFIER = Bytes.toBytes("INDEXEDKEYVALUE_FAKED_COLUMN");
private static int calcHashCode(ImmutableBytesPtr indexTableName, Mutation mutation) {
final int prime = 31;
@@ -71,9 +71,51 @@ public class IndexedKeyValue extends KeyValue {
*/
@Override
public byte [] getFamily() {
- return COLUMN_FAMILY;
+ return WALEdit.METAFAMILY;
}
+ @Override
+ public byte[] getFamilyArray() {
+ return WALEdit.METAFAMILY;
+ }
+
+ /**
+ * @return Family offset
+ */
+ @Override
+ public int getFamilyOffset() {
+ return 0;
+ }
+
+ /**
+ * @return Family length
+ */
+ @Override
+ public byte getFamilyLength() {
+ return (byte) WALEdit.METAFAMILY.length;
+ }
+
+ @Override
+ public byte[] getQualifierArray() {
+ return COLUMN_QUALIFIER;
+ }
+
+ /**
+ * @return Qualifier offset
+ */
+ @Override
+ public int getQualifierOffset() {
+ return 0;
+ }
+
+ /**
+ * @return Qualifier length
+ */
+ @Override
+ public int getQualifierLength() {
+ return COLUMN_QUALIFIER.length;
+ }
+
/**
* This is a KeyValue that shouldn't actually be replayed/replicated, so we always mark it as
* an {@link WALEdit#METAFAMILY} so it isn't replayed/replicated via the normal replay mechanism