this.scanner.fetchColumn(ROW_ID_COLUMN, ROW_ID_COLUMN); this.scanner.fetchColumn(family, qualifier);
bs.fetchColumn(new Text(COUNT), new Text(dataType)); } else { bs.fetchColumnFamily(new Text(COUNT));
if (c.getSecond() != null) { log.debug("Fetching column " + c.getFirst() + ":" + c.getSecond()); scanner.fetchColumn(c.getFirst(), c.getSecond()); } else { log.debug("Fetching column family " + c.getFirst());
try { scanner.setRanges(stream(keys).map(CacheKey::getRange).collect(Collectors.toList())); scanner.fetchColumn(columnFamily, CARDINALITY_CQ_AS_TEXT);
for (ScanColumn col : opts.columns) { if (col.isSetColQualifier()) scanner.fetchColumn(ByteBufferUtil.toText(col.colFamily), ByteBufferUtil.toText(col.colQualifier)); else
/** * Loads the cardinality for the given Range. Uses a BatchScanner and sums the cardinality for all values that encapsulate the Range. * * @param key Range to get the cardinality for * @return The cardinality of the column, which would be zero if the value does not exist */ @Override public Long load(CacheKey key) throws Exception { LOG.debug("Loading a non-exact range from Accumulo: %s", key); // Get metrics table name and the column family for the scanner String metricsTable = getMetricsTableName(key.getSchema(), key.getTable()); Text columnFamily = new Text(getIndexColumnFamily(key.getFamily().getBytes(UTF_8), key.getQualifier().getBytes(UTF_8)).array()); // Create scanner for querying the range BatchScanner scanner = connector.createBatchScanner(metricsTable, key.auths, 10); scanner.setRanges(connector.tableOperations().splitRangeByTablets(metricsTable, key.range, Integer.MAX_VALUE)); scanner.fetchColumn(columnFamily, CARDINALITY_CQ_AS_TEXT); try { return stream(scanner) .map(Entry::getValue) .map(Value::toString) .mapToLong(Long::parseLong) .sum(); } finally { scanner.close(); } }
@Override public void fetchColumn(Text colFam, Text colQual) { batchScanner.fetchColumn(colFam, colQual); }
@Override public void fetchColumn(IteratorSetting.Column column) { bs.fetchColumn(column); }
@Override public synchronized void fetchColumn(Text colFam, Text colQual) { bs.fetchColumn(colFam, colQual); }
bs.fetchColumn(new Text(ColumnFamily.WAY), new Text(ColumnQualifier.ID)); bs.fetchColumn(new Text(ColumnFamily.WAY), new Text(ColumnQualifier.REFERENCES));
bs.clearColumns(); bs.fetchColumn(new Text(ColumnFamily.NODE), new Text(ColumnQualifier.LONGITUDE)); bs.fetchColumn(new Text(ColumnFamily.NODE), new Text(ColumnQualifier.LATITUDE)); bs.fetchColumn(new Text(ColumnFamily.NODE), new Text(ColumnQualifier.ID));
bs.fetchColumn(EMPTY_TEXT, degColumnText == null ? EMPTY_TEXT : degColumnText); else if (degColumnText != null) {
bs.fetchColumn(EMPTY_TEXT, edgeColumnText); if (copyOutDegrees) bs.fetchColumn(EMPTY_TEXT, degColumnText);
bs.fetchColumn(new Text("cf1"), new Text("cq1")); bs.setRanges(Arrays.asList(new Range("myRow", "myRow~")));