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

more compile error
This commit is contained in:
Michael Stack 2017-12-18 16:12:21 -08:00
parent b7268cafac
commit 9acfb8ae67
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
2 changed files with 101 additions and 0 deletions

View File

@ -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();
}

View File

@ -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() {
}
}