public static boolean matchingRow(final Cell left, final byte[] buf, final int offset, final int length) { return PrivateCellUtil.matchingRows(left, buf, offset, length); }
public static boolean matchingRows(final Cell left, final byte[] buf) { if (buf == null) { return left.getRowLength() == 0; } return PrivateCellUtil.matchingRows(left, buf, 0, buf.length); }
doCreateWriter = true; } else if (lastRowInCurrentWriter != null && !PrivateCellUtil.matchingRows(cell, lastRowInCurrentWriter, 0, lastRowInCurrentWriter.length)) { if (LOG.isDebugEnabled()) {
static Result filterCells(Result result, Cell keepCellsAfter) { if (keepCellsAfter == null) { // do not need to filter return result; } // not the same row if (!PrivateCellUtil.matchingRows(keepCellsAfter, result.getRow(), 0, result.getRow().length)) { return result; } Cell[] rawCells = result.rawCells(); int index = Arrays.binarySearch(rawCells, keepCellsAfter, CellComparator.getInstance()::compareWithoutRow); if (index < 0) { index = -index - 1; } else { index++; } if (index == 0) { return result; } if (index == rawCells.length) { return null; } return Result.create(Arrays.copyOfRange(rawCells, index, rawCells.length), null, result.isStale(), result.mayHaveMoreCellsInRow()); }
static Result filterCells(Result result, Cell keepCellsAfter) { if (keepCellsAfter == null) { // do not need to filter return result; } // not the same row if (!PrivateCellUtil.matchingRows(keepCellsAfter, result.getRow(), 0, result.getRow().length)) { return result; } Cell[] rawCells = result.rawCells(); int index = Arrays.binarySearch(rawCells, keepCellsAfter, CellComparator.getInstance()::compareWithoutRow); if (index < 0) { index = -index - 1; } else { index++; } if (index == 0) { return result; } if (index == rawCells.length) { return null; } return Result.create(Arrays.copyOfRange(rawCells, index, rawCells.length), null, result.isStale(), result.mayHaveMoreCellsInRow()); }
public static boolean matchingRows(final Cell left, final byte[] buf) { if (buf == null) { return left.getRowLength() == 0; } return PrivateCellUtil.matchingRows(left, buf, 0, buf.length); }
public static boolean matchingRows(final Cell left, final byte[] buf) { if (buf == null) { return left.getRowLength() == 0; } return PrivateCellUtil.matchingRows(left, buf, 0, buf.length); }
static Result filterCells(Result result, Cell keepCellsAfter) { if (keepCellsAfter == null) { // do not need to filter return result; } // not the same row if (!PrivateCellUtil.matchingRows(keepCellsAfter, result.getRow(), 0, result.getRow().length)) { return result; } Cell[] rawCells = result.rawCells(); int index = Arrays.binarySearch(rawCells, keepCellsAfter, CellComparator.getInstance()::compareWithoutRow); if (index < 0) { index = -index - 1; } else { index++; } if (index == 0) { return result; } if (index == rawCells.length) { return null; } return Result.create(Arrays.copyOfRange(rawCells, index, rawCells.length), null, result.isStale(), result.mayHaveMoreCellsInRow()); }