hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-12442 Bring KeyValue#createFirstOnRow() back to branch-1 as deprecated methods
Date Wed, 12 Nov 2014 19:21:30 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 17a816a0f -> 17e2de349


HBASE-12442 Bring KeyValue#createFirstOnRow() back to branch-1 as deprecated methods


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

Branch: refs/heads/branch-1
Commit: 17e2de3494a4ba0510124074cbe3767f90943083
Parents: 17a816a
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Nov 12 11:21:20 2014 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Nov 12 11:21:20 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/KeyValue.java  | 59 ++++++++++++++++++++
 1 file changed, 59 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/17e2de34/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
index 22b40ec..0857f12 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
@@ -749,6 +749,65 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
   }
 
   /**
+   * Create a KeyValue that is smaller than all other possible KeyValues
+   * for the given row. That is any (valid) KeyValue on 'row' would sort
+   * _after_ the result.
+   *
+   * @param row - row key (arbitrary byte array)
+   * @return First possible KeyValue on passed <code>row</code>
+   * @deprecated Since 0.99.2. Use {@link KeyValueUtil#createFirstOnRow(byte [])} instead
+   */
+  @Deprecated
+  public static KeyValue createFirstOnRow(final byte [] row) {
+    return KeyValueUtil.createFirstOnRow(row, HConstants.LATEST_TIMESTAMP);
+  }
+
+  /**
+   * Create a KeyValue for the specified row, family and qualifier that would be
+   * smaller than all other possible KeyValues that have the same row,family,qualifier.
+   * Used for seeking.
+   * @param row - row key (arbitrary byte array)
+   * @param family - family name
+   * @param qualifier - column qualifier
+   * @return First possible key on passed <code>row</code>, and column.
+   * @deprecated Since 0.99.2. Use {@link KeyValueUtil#createFirstOnRow(byte[], byte[], byte[])}
+   * instead
+   */
+  @Deprecated
+  public static KeyValue createFirstOnRow(final byte [] row, final byte [] family,
+      final byte [] qualifier) {
+    return KeyValueUtil.createFirstOnRow(row, family, qualifier);
+  }
+
+  /**
+   * Create a KeyValue for the specified row, family and qualifier that would be
+   * smaller than all other possible KeyValues that have the same row,
+   * family, qualifier.
+   * Used for seeking.
+   * @param row row key
+   * @param roffset row offset
+   * @param rlength row length
+   * @param family family name
+   * @param foffset family offset
+   * @param flength family length
+   * @param qualifier column qualifier
+   * @param qoffset qualifier offset
+   * @param qlength qualifier length
+   * @return First possible key on passed Row, Family, Qualifier.
+   * @deprecated Since 0.99.2. Use {@link KeyValueUtil#createFirstOnRow(byte[], int, int,
+   * byte[], int, int, byte[], int, int)} instead
+   */
+  @Deprecated
+  public static KeyValue createFirstOnRow(final byte [] row,
+      final int roffset, final int rlength, final byte [] family,
+      final int foffset, final int flength, final byte [] qualifier,
+      final int qoffset, final int qlength) {
+    return new KeyValue(row, roffset, rlength, family,
+        foffset, flength, qualifier, qoffset, qlength,
+        HConstants.LATEST_TIMESTAMP, Type.Maximum, null, 0, 0);
+  }
+
+  /**
    * Create an empty byte[] representing a KeyValue
    * All lengths are preset and can be filled in later.
    * @param rlength


Mime
View raw message