You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/12/19 00:12:42 UTC

hbase git commit: HBASE-19122 Suspect methods on Cell to be deprecated; ADDENDUM2 to fix more compile error

Repository: hbase
Updated Branches:
  refs/heads/master 6a9b1480c -> e343b0c3e


 HBASE-19122 Suspect methods on Cell to be deprecated; ADDENDUM2 to fix
    more compile error


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

Branch: refs/heads/master
Commit: e343b0c3e3affbab44604231486a42dba6ee6f1e
Parents: 6a9b148
Author: Michael Stack <st...@apache.org>
Authored: Mon Dec 18 16:12:21 2017 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Mon Dec 18 16:12:21 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/RawCellBuilder.java | 62 ++++++++++++++++++++
 .../hadoop/hbase/RawCellBuilderFactory.java     | 39 ++++++++++++
 2 files changed, 101 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e343b0c3/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
new file mode 100644
index 0000000..22bb358
--- /dev/null
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilder.java
@@ -0,0 +1,62 @@
+/*
+ * 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;
+
+import java.util.List;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * Allows creating a cell with {@link Tag}
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
+public interface RawCellBuilder extends CellBuilder {
+  @Override
+  RawCellBuilder setRow(final byte[] row);
+  @Override
+  RawCellBuilder setRow(final byte[] row, final int rOffset, final int rLength);
+
+  @Override
+  RawCellBuilder setFamily(final byte[] family);
+  @Override
+  RawCellBuilder setFamily(final byte[] family, final int fOffset, final int fLength);
+
+  @Override
+  RawCellBuilder setQualifier(final byte[] qualifier);
+  @Override
+  RawCellBuilder setQualifier(final byte[] qualifier, final int qOffset, final int qLength);
+
+  @Override
+  RawCellBuilder setTimestamp(final long timestamp);
+
+  @Override
+  RawCellBuilder setType(final Cell.DataType type);
+
+  @Override
+  RawCellBuilder setValue(final byte[] value);
+  @Override
+  RawCellBuilder setValue(final byte[] value, final int vOffset, final int vLength);
+
+  RawCellBuilder setTags(final List<Tag> tags);
+
+  @Override
+  RawCell build();
+
+  @Override
+  RawCellBuilder clear();
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/e343b0c3/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
new file mode 100644
index 0000000..8d0c1ab
--- /dev/null
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/RawCellBuilderFactory.java
@@ -0,0 +1,39 @@
+/*
+ * 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;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * Factory for creating cells for CPs. It does deep_copy {@link CellBuilderType#DEEP_COPY} while
+ * creating cells.
+ */
+@InterfaceAudience.Private
+public final class RawCellBuilderFactory {
+
+  /**
+   * @return the cell that is created
+   */
+  public static RawCellBuilder create() {
+    return new KeyValueBuilder();
+  }
+
+  private RawCellBuilderFactory() {
+  }
+}