Repository: hbase
Updated Branches:
  refs/heads/branch-2 b7268cafa -> 9acfb8ae6


 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/9acfb8ae
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9acfb8ae
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9acfb8ae

Branch: refs/heads/branch-2
Commit: 9acfb8ae6777eba7c54fd4a326b22eb3e8c6f950
Parents: b7268ca
Author: Michael Stack <[email protected]>
Authored: Mon Dec 18 16:12:21 2017 -0800
Committer: Michael Stack <[email protected]>
Committed: Mon Dec 18 16:13:00 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/9acfb8ae/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}
+ */
[email protected](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/9acfb8ae/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.
+ */
[email protected]
+public final class RawCellBuilderFactory {
+
+  /**
+   * @return the cell that is created
+   */
+  public static RawCellBuilder create() {
+    return new KeyValueBuilder();
+  }
+
+  private RawCellBuilderFactory() {
+  }
+}

Reply via email to