org.apache.accumulo.core.data.Key.set()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.apache.accumulo.core.data.Key.set()方法的一些代码示例,展示了Key.set()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Key.set()方法的具体详情如下:
包路径:org.apache.accumulo.core.data.Key
类名称:Key
方法名:set

Key.set介绍

[英]Sets this key's row, column family, column qualifier, column visibility, timestamp, and delete marker to be the same as another key's. This method does not copy data from the other key, but only references to it.
[中]将此键的行、列族、列限定符、列可见性、时间戳和删除标记设置为与另一个键的相同。此方法不复制另一个键的数据,而仅引用它。

代码示例

代码示例来源:origin: apache/accumulo

/**
 * Creates a key with the same row, column family, column qualifier, column visibility, timestamp,
 * and delete marker as the given key.
 */
public Key(Key other) {
 set(other);
}

代码示例来源:origin: apache/accumulo

@Override
public boolean next(Key key, Value value) throws IOException {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: apache/accumulo

private void resetVersionCount() {
 if (super.hasTop())
  currentKey.set(getSource().getTopKey());
 numVersions = 1;
}

代码示例来源:origin: apache/accumulo

private void load() {
  if (hasTop()) {
   topKey.set(source.getTopKey());
   topValue.set(source.getTopValue().get());
  }
 }
}

代码示例来源:origin: apache/accumulo

private void skipRowColumn() throws IOException {
 workKey.set(source.getTopKey());
 Key keyToSkip = workKey;
 source.next();
 while (source.hasTop()
   && source.getTopKey().equals(keyToSkip, PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) {
  source.next();
 }
}

代码示例来源:origin: apache/accumulo

lastKey = new Key();
lastKey.set(mmfi.getTopKey());

代码示例来源:origin: apache/accumulo

/**
 * Sets the topKey and topValue based on the top key of the source. If the column of the source
 * top key is in the set of combiners, topKey will be the top key of the source and topValue will
 * be the result of the reduce method. Otherwise, topKey and topValue will be unchanged. (They are
 * always set to null before this method is called.)
 */
private void findTop() throws IOException {
 // check if aggregation is needed
 if (super.hasTop()) {
  workKey.set(super.getTopKey());
  if (combineAllColumns || combiners.contains(workKey)) {
   if (workKey.isDeleted()) {
    sawDelete();
    return;
   }
   topKey = workKey;
   Iterator<Value> viter = new ValueIterator(getSource());
   topValue = reduce(topKey, viter);
   while (viter.hasNext())
    viter.next();
  }
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-core

/**
 * Creates a key with the same row, column family, column qualifier, column visibility, timestamp,
 * and delete marker as the given key.
 */
public Key(Key other) {
 set(other);
}

代码示例来源:origin: org.apache.accumulo/accumulo-core

@Override
public boolean next(Key key, Value value) throws IOException {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: org.apache.accumulo/accumulo-core

@Override
public boolean next(Key key, Value value) throws IOException {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Map.Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: org.apache.accumulo/accumulo-client-mapreduce

@Override
public boolean next(Key key, Value value) throws IOException {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Map.Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: org.apache.accumulo/accumulo-client-mapreduce

@Override
public boolean next(Key key, Value value) throws IOException {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: org.apache.accumulo/accumulo-hadoop-mapreduce

@Override
public boolean next(Key key, Value value) {
 if (scannerIterator.hasNext()) {
  ++numKeysRead;
  Entry<Key,Value> entry = scannerIterator.next();
  key.set(currentKey = entry.getKey());
  value.set(entry.getValue().get());
  if (log.isTraceEnabled())
   log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
  return true;
 }
 return false;
}

代码示例来源:origin: uk.gov.gchq.gaffer/accumulo-store

@Override
public SortedKeyValueIterator<Key, Value> deepCopy(final IteratorEnvironment env) {
  RowIDAggregator rowIDAggregator = new RowIDAggregator();
  rowIDAggregator.topKey = this.topKey;
  rowIDAggregator.topValue = this.topValue;
  rowIDAggregator.schema = this.schema;
  rowIDAggregator.aggregator = this.aggregator;
  rowIDAggregator.elementConverter = this.elementConverter;
  Key newWorkKey = new Key();
  newWorkKey.set(workKey);
  rowIDAggregator.workKey = newWorkKey;
  return rowIDAggregator;
}

代码示例来源:origin: org.apache.accumulo/accumulo-core

private void resetVersionCount() {
 if (super.hasTop())
  currentKey.set(getSource().getTopKey());
 numVersions = 1;
}

代码示例来源:origin: apache/fluo

@Override
public void next() throws IOException {
 if (readLockKey != null) {
  clearReadLock();
 } else {
  curCol.set(source.getTopKey());
  source.skipColumn(curCol);
  findTop();
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-iterator-test-harness

private void load() {
  if (hasTop()) {
   topKey.set(source.getTopKey());
   topValue.set(source.getTopValue().get());
  }
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-core

private void skipRowColumn(SortedKeyValueIterator<Key,Value> source) throws IOException {
 workKey.set(source.getTopKey());
 Key keyToSkip = workKey;
 source.next();
 while (source.hasTop()
   && source.getTopKey().equals(keyToSkip, PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) {
  source.next();
 }
}

代码示例来源:origin: io.fluo/fluo-accumulo

@Override
protected void consume() throws IOException {
 PushbackIterator source = (PushbackIterator) getSource();
 if (lastKeySet == true) {
  skipRowCol(source, lastKey);
 }
 consumeDeletes(source);
 if (source.hasTop() && isNtfy(source.getTopKey()) && !isDelete(source.getTopKey())) {
  lastKey.set(source.getTopKey());
  lastKeySet = true;
 } else {
  lastKeySet = false;
 }
}

代码示例来源:origin: apache/fluo

@Override
protected void consume() throws IOException {
 PushbackIterator source = (PushbackIterator) getSource();
 if (lastKeySet == true) {
  skipRowCol(source, lastKey);
 }
 consumeDeletes(source);
 if (source.hasTop() && isNtfy(source.getTopKey()) && !isDelete(source.getTopKey())) {
  lastKey.set(source.getTopKey());
  lastKeySet = true;
 } else {
  lastKeySet = false;
 }
}

相关文章