doCreateWriter = true; } else if (lastRowInCurrentWriter != null && !comparator.matchingRows(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), lastRowInCurrentWriter, 0, lastRowInCurrentWriter.length)) { if (LOG.isDebugEnabled()) {
if (!matchingRows(left, lrowlength, right, rrowlength)) { return false;
if (!matchingRows(left, lrowlength, right, rrowlength)) { return false;
if (!matchingRows(left, lrowlength, right, rrowlength)) { return false;
private void appendDeleteFamilyBloomFilter(final KeyValue kv) throws IOException { if (!kv.isDeleteFamily()) { return; } // increase the number of delete family in the store file deleteFamilyCnt++; if (null != this.deleteFamilyBloomFilterWriter) { boolean newKey = true; if (lastDeleteFamilyKV != null) { newKey = !kvComparator.matchingRows(kv, lastDeleteFamilyKV); } if (newKey) { this.deleteFamilyBloomFilterWriter.add(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength()); this.lastDeleteFamilyKV = kv; } } }
private void appendDeleteFamilyBloomFilter(final Cell cell) throws IOException { if (!CellUtil.isDeleteFamily(cell) && !CellUtil.isDeleteFamilyVersion(cell)) { return; } // increase the number of delete family in the store file deleteFamilyCnt++; if (null != this.deleteFamilyBloomFilterWriter) { boolean newKey = true; if (lastDeleteFamilyCell != null) { newKey = !kvComparator.matchingRows(cell, lastDeleteFamilyCell); } if (newKey) { this.deleteFamilyBloomFilterWriter.add(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); this.lastDeleteFamilyCell = cell; } } }
/** * Compares the row and timestamp of two keys * Was called matchesWithoutColumn in HStoreKey. * @param right Key to compare against. * @return True if same row and timestamp is greater than the timestamp in * <code>right</code> */ public boolean matchingRowsGreaterTimestamp(final KeyValue left, final KeyValue right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); if (!matchingRows(left, lrowlength, right, rrowlength)) { return false; } return left.getTimestamp() >= right.getTimestamp(); }
/** * Compares the row and column of two keyvalues for equality * @param left * @param right * @return True if same row and column. */ public boolean matchingRowColumn(final KeyValue left, final KeyValue right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); // TsOffset = end of column data. just comparing Row+CF length of each return ((left.getTimestampOffset() - left.getOffset()) == (right.getTimestampOffset() - right.getOffset())) && matchingRows(left, lrowlength, right, rrowlength) && compareColumns(left, lrowlength, right, rrowlength) == 0; }
/** * @param left * @param lrowlength * @param right * @param rrowlength * @return True if rows match. */ private boolean matchingRows(final Cell left, final short lrowlength, final Cell right, final short rrowlength) { return lrowlength == rrowlength && matchingRows(left.getRowArray(), left.getRowOffset(), lrowlength, right.getRowArray(), right.getRowOffset(), rrowlength); }
/** * Compares the row of two keyvalues for equality * @param left * @param right * @return True if rows match. */ public boolean matchingRows(final Cell left, final Cell right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); return matchingRows(left, lrowlength, right, rrowlength); }
@Override protected void checkScanOrder(Cell prevKV, Cell kv, KeyValue.KVComparator comparator) throws IOException { // Check that the heap gives us KVs in an increasing order for same row and // decreasing order for different rows. assert prevKV == null || comparator == null || comparator.compareRows(kv, prevKV) < 0 || (comparator.matchingRows(kv, prevKV) && comparator.compare(kv, prevKV) >= 0) : "Key " + prevKV + " followed by a " + "error order key " + kv + " in cf " + store + " in reversed scan"; }
/** * Compare two keys for equality. */ private final boolean rowEquals(byte[] k1, byte[] k2) { return kvComparator.matchingRows(k1, 0, k1.length, k2, 0, k2.length); }
/** * Compares the row of two keyvalues for equality * @param left * @param right * @return True if rows match. */ public boolean matchingRows(final KeyValue left, final KeyValue right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); return matchingRows(left, lrowlength, right, rrowlength); }
/** * @param left * @param lrowlength * @param right * @param rrowlength * @return True if rows match. */ private boolean matchingRows(final Cell left, final short lrowlength, final Cell right, final short rrowlength) { return lrowlength == rrowlength && matchingRows(left.getRowArray(), left.getRowOffset(), lrowlength, right.getRowArray(), right.getRowOffset(), rrowlength); }
/** * @param left * @param lrowlength * @param right * @param rrowlength * @return True if rows match. */ private boolean matchingRows(final Cell left, final short lrowlength, final Cell right, final short rrowlength) { return lrowlength == rrowlength && matchingRows(left.getRowArray(), left.getRowOffset(), lrowlength, right.getRowArray(), right.getRowOffset(), rrowlength); }
/** * Compares the row of two keyvalues for equality * @param left * @param right * @return True if rows match. */ public boolean matchingRows(final Cell left, final Cell right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); return matchingRows(left, lrowlength, right, rrowlength); }
/** * Compares the row of two keyvalues for equality * @param left * @param right * @return True if rows match. */ public boolean matchingRows(final Cell left, final Cell right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); return matchingRows(left, lrowlength, right, rrowlength); }
if (!matchingRows(left, lrowlength, right, rrowlength)) { return false;
/** * @param left * @param lrowlength * @param right * @param rrowlength * @return True if rows match. */ private boolean matchingRows(final Cell left, final short lrowlength, final Cell right, final short rrowlength) { return lrowlength == rrowlength && matchingRows(left.getRowArray(), left.getRowOffset(), lrowlength, right.getRowArray(), right.getRowOffset(), rrowlength); }
/** * Compares the row of two keyvalues for equality * @param left * @param right * @return True if rows match. */ public boolean matchingRows(final Cell left, final Cell right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); return matchingRows(left, lrowlength, right, rrowlength); }