HBASE-18835 The return type of ExtendedCell#deepClone should be ExtendedCell rather than Cell
This commit is contained in:
parent
5ed2f899e1
commit
f380676d49
|
@ -302,7 +302,7 @@ public class ByteBufferKeyValue extends ByteBufferCell implements ExtendedCell {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
byte[] copy = new byte[this.length];
|
||||
ByteBufferUtils.copyFromBufferToArray(copy, this.buf, this.offset, 0, this.length);
|
||||
KeyValue kv = new KeyValue(copy, 0, copy.length);
|
||||
|
|
|
@ -657,7 +657,7 @@ public final class CellUtil {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
Cell clonedBaseCell = ((ExtendedCell) this.cell).deepClone();
|
||||
return new TagRewriteCell(clonedBaseCell, this.tags);
|
||||
}
|
||||
|
@ -838,7 +838,7 @@ public final class CellUtil {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
Cell clonedBaseCell = ((ExtendedCell) this.cell).deepClone();
|
||||
if (clonedBaseCell instanceof ByteBufferCell) {
|
||||
return new TagRewriteByteBufferCell((ByteBufferCell) clonedBaseCell, this.tags);
|
||||
|
@ -981,7 +981,7 @@ public final class CellUtil {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
Cell clonedBaseCell = ((ExtendedCell) this.cell).deepClone();
|
||||
return new ValueAndTagRewriteCell(clonedBaseCell, this.value, this.tags);
|
||||
}
|
||||
|
@ -1047,7 +1047,7 @@ public final class CellUtil {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
Cell clonedBaseCell = ((ExtendedCell) this.cell).deepClone();
|
||||
if (clonedBaseCell instanceof ByteBufferCell) {
|
||||
return new ValueAndTagRewriteByteBufferCell((ByteBufferCell) clonedBaseCell, this.value,
|
||||
|
|
|
@ -73,7 +73,7 @@ public interface ExtendedCell extends Cell, SettableSequenceId, SettableTimestam
|
|||
* Does a deep copy of the contents to a new memory area and returns it as a new cell.
|
||||
* @return The deep cloned cell
|
||||
*/
|
||||
Cell deepClone();
|
||||
ExtendedCell deepClone();
|
||||
|
||||
/**
|
||||
* Extracts the id of the backing bytebuffer of this cell if it was obtained from fixed sized
|
||||
|
|
|
@ -183,7 +183,7 @@ public class IndividualBytesFieldCell implements ExtendedCell {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
// When being added to the memstore, deepClone() is called and KeyValue has less heap overhead.
|
||||
return new KeyValue(this);
|
||||
}
|
||||
|
|
|
@ -2808,7 +2808,7 @@ public class KeyValue implements ExtendedCell {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
byte[] copy = Bytes.copy(this.bytes, this.offset, this.length);
|
||||
KeyValue kv = new KeyValue(copy, 0, copy.length);
|
||||
kv.setSequenceId(this.getSequenceId());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class NoTagsByteBufferKeyValue extends ByteBufferKeyValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
byte[] copy = new byte[this.length];
|
||||
ByteBufferUtils.copyFromBufferToArray(copy, this.buf, this.offset, 0, this.length);
|
||||
KeyValue kv = new NoTagsKeyValue(copy, 0, copy.length);
|
||||
|
|
|
@ -51,7 +51,7 @@ public class NoTagsKeyValue extends KeyValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
byte[] copy = Bytes.copy(this.bytes, this.offset, this.length);
|
||||
KeyValue kv = new NoTagsKeyValue(copy, 0, copy.length);
|
||||
kv.setSequenceId(this.getSequenceId());
|
||||
|
|
|
@ -470,7 +470,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
// This is not used in actual flow. Throwing UnsupportedOperationException
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cell deepClone() {
|
||||
public ExtendedCell deepClone() {
|
||||
// This is not used in actual flow. Throwing UnsupportedOperationException
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue