public boolean equals(ColFamHashKey ohk) { if (columnFamily == null) return key.compareColumnFamily(ohk.columnFamily) == 0; return ohk.key.compareColumnFamily(columnFamily) == 0; } }
public boolean equals(ColHashKey ohk) { if (columnFamily == null) return key.compareColumnFamily(ohk.columnFamily) == 0 && key.compareColumnQualifier(ohk.columnQualifier) == 0; return ohk.key.compareColumnFamily(columnFamily) == 0 && ohk.key.compareColumnQualifier(columnQualifier) == 0; } }
public boolean hasColumns(Key key) { return key.compareColumnFamily(colf) == 0 && key.compareColumnQualifier(colq) == 0; }
private PartialKey isKeyInSlice(Key k) { if (cso.minCf.getLength() > 0) { int minCfComp = k.compareColumnFamily(cso.minCf); if (minCfComp < 0 || (minCfComp == 0 && !cso.minInclusive)) { return PartialKey.ROW; } } if (cso.maxCf.getLength() > 0) { int maxCfComp = k.compareColumnFamily(cso.maxCf); if (maxCfComp > 0 || (maxCfComp == 0 && !cso.maxInclusive)) { return PartialKey.ROW; } } // k.colfam is in the "slice". if (cso.minCq.getLength() > 0) { int minCqComp = k.compareColumnQualifier(cso.minCq); if (minCqComp < 0 || (minCqComp == 0 && !cso.minInclusive)) { return PartialKey.ROW_COLFAM; } } if (cso.maxCq.getLength() > 0) { int maxCqComp = k.compareColumnQualifier(cso.maxCq); if (maxCqComp > 0 || (maxCqComp == 0 && !cso.maxInclusive)) { return PartialKey.ROW_COLFAM; } } // k.colqual is in the slice. return PartialKey.ROW_COLFAM_COLQUAL; }
@Override public FilterResult filter(Key k, Value v) { if (cso.minCf.getLength() > 0) { int minCfCmp = k.compareColumnFamily(cso.minCf); if (minCfCmp < 0) { return SKIP_TO_HINT; // hint will be the min CF in this row. int maxCfCmp = k.compareColumnFamily(cso.maxCf); if (maxCfCmp > 0 || (maxCfCmp == 0 && !cso.maxInclusive)) { return SKIP_TO_NEXT_ROW;
@Override public boolean accept(Key k, Value v) { if (!k.isDeleted() && k.compareColumnFamily(TabletsSection.BulkFileColumnFamily.NAME) == 0) { long txid = Long.parseLong(v.toString()); Status status = bulkTxStatusCache.get(txid); if (status == null) { try { if (arbitrator.transactionComplete(Constants.BULK_ARBITRATOR_TYPE, txid)) { status = Status.INACTIVE; } else { status = Status.ACTIVE; } } catch (Exception e) { status = Status.ACTIVE; log.error("{}", e.getMessage(), e); } bulkTxStatusCache.put(txid, status); } return status == Status.ACTIVE; } return true; }
if (key.compareColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME) == 0) { String location = entry.getValue().toString(); String[] parts = location.split(":"); addBlocks(fs, host, files, totalBlocks, localBlocks); files.clear(); } else if (key.compareColumnFamily(DataFileColumnFamily.NAME) == 0) {
@Override public Key getNextKeyHint(Key k, Value v) throws IllegalArgumentException { if (cso.minCf.getLength() > 0) { int minCfCmp = k.compareColumnFamily(cso.minCf); if (minCfCmp < 0) { Key hint = new Key(k.getRow(), cso.minCf); return cso.minInclusive ? hint : hint.followingKey(PartialKey.ROW_COLFAM); } } if (cso.minCq.getLength() > 0) { int minCqCmp = k.compareColumnQualifier(cso.minCq); if (minCqCmp < 0) { Key hint = new Key(k.getRow(), k.getColumnFamily(), cso.minCq); return cso.minInclusive ? hint : hint.followingKey(PartialKey.ROW_COLFAM_COLQUAL); } } // If we get here it means that we were asked to provide a hint for a key that we // didn't return USE_HINT for. throw new IllegalArgumentException("Don't know how to provide hint for key " + k); }
if (entry.getKey().compareColumnFamily(DataFileColumnFamily.NAME) == 0) { origDatafileSizes.put(new FileRef(context.getVolumeManager(), entry.getKey()), new DataFileValue(entry.getValue().get()));
public boolean equals(ColFamHashKey ohk) { if (columnFamily == null) return key.compareColumnFamily(ohk.columnFamily) == 0; return ohk.key.compareColumnFamily(columnFamily) == 0; } }
private boolean isVisible(Key key) { return (this.filterVertices && key.compareColumnFamily(VERTEX_CF_SIGNAL) == 0) || (this.filterEdges && key.compareColumnFamily(EDGE_CF_SIGNAL) == 0); }
private boolean isVisible(Key key) { return (this.filterVertices && key.compareColumnFamily(VERTEX_CF_SIGNAL) == 0) || (this.filterEdges && key.compareColumnFamily(EDGE_CF_SIGNAL) == 0); }
private boolean isVisible(Key key) { return (this.filterVertices && key.compareColumnFamily(VERTEX_CF_SIGNAL) == 0) || (this.filterEdges && key.compareColumnFamily(EDGE_CF_SIGNAL) == 0); }
for (Entry<Key,Value> entry : scanner) { Key key = entry.getKey(); if (key.compareColumnFamily(DataFileColumnFamily.NAME) == 0) { datafiles.add(new FileRef(this.master.fs, key)); if (datafiles.size() > 1000) { } else if (key.compareColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME) == 0) { throw new IllegalStateException( "Tablet " + key.getRow() + " is assigned during a merge!");
public boolean equals(ColHashKey ohk) { if (columnFamily == null) return key.compareColumnFamily(ohk.columnFamily) == 0 && key.compareColumnQualifier(ohk.columnQualifier) == 0; return ohk.key.compareColumnFamily(columnFamily) == 0 && ohk.key.compareColumnQualifier(columnQualifier) == 0; } }
public boolean hasColumns(Key key) { return key.compareColumnFamily(colf) == 0 && key.compareColumnQualifier(colq) == 0; }
@Override public boolean accept(Key k, Value v) { if (!k.isDeleted() && k.compareColumnFamily(Constants.METADATA_BULKFILE_COLUMN_FAMILY) == 0) { long txid = Long.valueOf(v.toString()); Status status = bulkTxStatusCache.get(txid); if (status == null) { try { if (arbitrator.transactionComplete(Constants.BULK_ARBITRATOR_TYPE, txid)) { status = Status.INACTIVE; } else { status = Status.ACTIVE; } } catch (Exception e) { status = Status.ACTIVE; log.error(e, e); } bulkTxStatusCache.put(txid, status); } return status == Status.ACTIVE; } return true; }
@Override public boolean accept(Key k, Value v) { if (!k.isDeleted() && k.compareColumnFamily(TabletsSection.BulkFileColumnFamily.NAME) == 0) { long txid = Long.parseLong(v.toString()); Status status = bulkTxStatusCache.get(txid); if (status == null) { try { if (arbitrator.transactionComplete(Constants.BULK_ARBITRATOR_TYPE, txid)) { status = Status.INACTIVE; } else { status = Status.ACTIVE; } } catch (Exception e) { status = Status.ACTIVE; log.error("{}", e.getMessage(), e); } bulkTxStatusCache.put(txid, status); } return status == Status.ACTIVE; } return true; }
private Entry<Key,Value> findCount(Entry<Key,Value> entry, Iterator<Entry<Key,Value>> iterator, CountValue cv) { Key key = entry.getKey(); Text currentRow = key.getRow(); if (key.compareColumnQualifier(QueryUtil.COUNTS_COLQ) == 0) cv.set(entry.getValue()); while (iterator.hasNext()) { entry = iterator.next(); entriesScanned++; key = entry.getKey(); if (key.compareRow(currentRow) != 0) return entry; if (key.compareColumnFamily(QueryUtil.DIR_COLF) == 0 && key.compareColumnQualifier(QueryUtil.COUNTS_COLQ) == 0) { cv.set(entry.getValue()); } } return null; }
@Override public Key getNextKeyHint(Key k, Value v) throws IllegalArgumentException { if (cso.minCf.getLength() > 0) { int minCfCmp = k.compareColumnFamily(cso.minCf); if (minCfCmp < 0) { Key hint = new Key(k.getRow(), cso.minCf); return cso.minInclusive ? hint : hint.followingKey(PartialKey.ROW_COLFAM); } } if (cso.minCq.getLength() > 0) { int minCqCmp = k.compareColumnQualifier(cso.minCq); if (minCqCmp < 0) { Key hint = new Key(k.getRow(), k.getColumnFamily(), cso.minCq); return cso.minInclusive ? hint : hint.followingKey(PartialKey.ROW_COLFAM_COLQUAL); } } // If we get here it means that we were asked to provide a hint for a key that we // didn't return USE_HINT for. throw new IllegalArgumentException("Don't know how to provide hint for key " + k); }