@Override public byte getTypeByte() { return cell.getTypeByte(); }
@Override public byte getTypeByte() { return cell.getTypeByte(); }
@Override public byte getTypeByte() { return this.cell.getTypeByte(); }
@Override public byte getTypeByte() { return cell.getTypeByte(); }
/** * @param previousCell * @param cell * @return True if we have crossed over onto a new row or type */ private boolean isNewRowOrType(final Cell previousCell, final Cell cell) { return previousCell == null || previousCell.getTypeByte() != cell.getTypeByte() || !CellUtil.matchingRows(previousCell, cell); }
/** * @return True if a delete type, a {@link KeyValue.Type#Delete} or a * {KeyValue.Type#DeleteFamily} or a * {@link KeyValue.Type#DeleteColumn} KeyValue type. */ @SuppressWarnings("deprecation") public static boolean isDelete(final Cell cell) { return PrivateCellUtil.isDelete(cell.getTypeByte()); }
/** * @return True if this cell is a {@link KeyValue.Type#Delete} type. */ public static boolean isDeleteType(Cell cell) { return cell.getTypeByte() == KeyValue.Type.Delete.getCode(); }
/** * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteFamily(final Cell cell) { return cell.getTypeByte() == Type.DeleteFamily.getCode(); }
/** * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteColumnVersion(final Cell cell) { return cell.getTypeByte() == Type.Delete.getCode(); }
/** * @return True if this cell is a Put. */ @SuppressWarnings("deprecation") public static boolean isPut(Cell cell) { return cell.getTypeByte() == Type.Put.getCode(); }
/** * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteColumns(final Cell cell) { return cell.getTypeByte() == Type.DeleteColumn.getCode(); }
/** * @return True if this cell is a {@link KeyValue.Type#Delete} type. * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteType(Cell cell) { return cell.getTypeByte() == Type.Delete.getCode(); }
/** * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteFamilyVersion(final Cell cell) { return cell.getTypeByte() == Type.DeleteFamilyVersion.getCode(); }
/** * * @return True if this cell is a delete family or column type. * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static boolean isDeleteColumnOrFamily(Cell cell) { int t = cell.getTypeByte(); return t == Type.DeleteColumn.getCode() || t == Type.DeleteFamily.getCode(); }
/** * @return True if this cell is a delete family or column type. */ public static boolean isDeleteColumnOrFamily(Cell cell) { int t = cell.getTypeByte(); return t == KeyValue.Type.DeleteColumn.getCode() || t == KeyValue.Type.DeleteFamily.getCode(); }
/** * Record the earlest Put timestamp. * * If the timeRangeTracker is not set, * update TimeRangeTracker to include the timestamp of this key */ public void trackTimestamps(final Cell cell) { if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) { earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp()); } timeRangeTracker.includeTimestamp(cell); }
private int compareTypeBytes(Cell key, Cell right) { if (key.getFamilyLength() + key.getQualifierLength() == 0 && key.getTypeByte() == Type.Minimum.getCode()) { // left is "bigger", i.e. it appears later in the sorted order return 1; } if (right.getFamilyLength() + right.getQualifierLength() == 0 && right.getTypeByte() == Type.Minimum.getCode()) { return -1; } return 0; }
public static int appendKeyTo(final Cell cell, final byte[] output, final int offset) { int nextOffset = offset; nextOffset = Bytes.putShort(output, nextOffset, cell.getRowLength()); nextOffset = CellUtil.copyRowTo(cell, output, nextOffset); nextOffset = Bytes.putByte(output, nextOffset, cell.getFamilyLength()); nextOffset = CellUtil.copyFamilyTo(cell, output, nextOffset); nextOffset = CellUtil.copyQualifierTo(cell, output, nextOffset); nextOffset = Bytes.putLong(output, nextOffset, cell.getTimestamp()); nextOffset = Bytes.putByte(output, nextOffset, cell.getTypeByte()); return nextOffset; }
public static int appendKeyTo(Cell cell, ByteBuffer buf, int offset) { offset = ByteBufferUtils.putShort(buf, offset, cell.getRowLength());// RK length offset = CellUtil.copyRowTo(cell, buf, offset);// Row bytes offset = ByteBufferUtils.putByte(buf, offset, cell.getFamilyLength());// CF length offset = CellUtil.copyFamilyTo(cell, buf, offset);// CF bytes offset = CellUtil.copyQualifierTo(cell, buf, offset);// Qualifier bytes offset = ByteBufferUtils.putLong(buf, offset, cell.getTimestamp());// TS offset = ByteBufferUtils.putByte(buf, offset, cell.getTypeByte());// Type return offset; }
public KeyValue(Cell c) { this(c.getRowArray(), c.getRowOffset(), c.getRowLength(), c.getFamilyArray(), c.getFamilyOffset(), c.getFamilyLength(), c.getQualifierArray(), c.getQualifierOffset(), c.getQualifierLength(), c.getTimestamp(), Type.codeToType(c.getTypeByte()), c.getValueArray(), c.getValueOffset(), c.getValueLength(), c.getTagsArray(), c.getTagsOffset(), c.getTagsLength()); this.seqId = c.getSequenceId(); }