HBASE-14001 Optimize write(OutputStream out, boolean withTags) for SizeCachedNoTagsKeyValue.
This commit is contained in:
parent
f8bd578b80
commit
7e7fbdb84b
|
@ -19,7 +19,11 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
||||||
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is an extension to ContentSizeCachedKeyValue where there are no tags in Cell.
|
* This class is an extension to ContentSizeCachedKeyValue where there are no tags in Cell.
|
||||||
|
@ -42,4 +46,11 @@ public class SizeCachedNoTagsKeyValue extends SizeCachedKeyValue {
|
||||||
public long heapSizeWithoutTags() {
|
public long heapSizeWithoutTags() {
|
||||||
return super.heapSize();
|
return super.heapSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int write(OutputStream out, boolean withTags) throws IOException {
|
||||||
|
writeInt(out, this.length);
|
||||||
|
out.write(this.bytes, this.offset, this.length);
|
||||||
|
return this.length + Bytes.SIZEOF_INT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue