Java Code Examples for org.apache.accumulo.core.data.Key#compareRow()
The following examples show how to use
org.apache.accumulo.core.data.Key#compareRow() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileCount.java From accumulo-examples with Apache License 2.0 | 6 votes |
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; }
Example 2
Source File: FileCount.java From accumulo-examples with Apache License 2.0 | 5 votes |
private Entry<Key,Value> consumeRow(Entry<Key,Value> entry, Iterator<Entry<Key,Value>> iterator) { Key key = entry.getKey(); Text currentRow = key.getRow(); while (iterator.hasNext()) { entry = iterator.next(); entriesScanned++; key = entry.getKey(); if (key.compareRow(currentRow) != 0) return entry; } return null; }