Java Code Examples for org.apache.hadoop.hbase.util.Bytes.SIZEOF_BYTE

The following are Jave code examples for showing how to use SIZEOF_BYTE of the org.apache.hadoop.hbase.util.Bytes class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: ditb   File: CodecPerformance.java   View Source Code Vote up 6 votes
static int getRoughSize(final Cell [] cells) {
  int size = 0;
  for (Cell c: cells) {
    size += c.getRowLength() + c.getFamilyLength() + c.getQualifierLength() + c.getValueLength();
    size += Bytes.SIZEOF_LONG + Bytes.SIZEOF_BYTE;
  }
  return size;
}
 
Example 2
Project: ditb   File: KeyValue.java   View Source Code Vote up 5 votes
/**
 * @return Family offset
 */
private int getFamilyOffset(int rlength) {
  return this.offset + ROW_OFFSET + Bytes.SIZEOF_SHORT + rlength + Bytes.SIZEOF_BYTE;
}
 
Example 3
Project: ditb   File: KeyValue.java   View Source Code Vote up 5 votes
@Override
public int getFamilyOffset() {
  return this.offset + Bytes.SIZEOF_SHORT + getRowLength() + Bytes.SIZEOF_BYTE;
}
 
Example 4
Project: ditb   File: RawByte.java   View Source Code Vote up 5 votes
@Override
public int encodedLength(Byte val) { return Bytes.SIZEOF_BYTE; }
 
Example 5
Project: ditb   File: RawByte.java   View Source Code Vote up 5 votes
@Override
public int skip(PositionedByteRange src) {
  src.setPosition(src.getPosition() + Bytes.SIZEOF_BYTE);
  return Bytes.SIZEOF_BYTE;
}