com.netflix.astyanax.model.Row类的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(109)

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

Row介绍

[英]Instance of a row with key type K and column name type C. Child columns can be either standard columns or super columns
[中]键类型为K、列名类型为C的行的实例。子列可以是标准列或超级列

代码示例

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

Column<Boolean> column = row.getColumns().getColumnByName( COLUMN_NAME );
  versions.put( row.getKey().getKey(), column.getLongValue() );

代码示例来源:origin: thinkaurelius/titan

@Override
  public boolean apply(@Nullable Row<ByteBuffer, ByteBuffer> row) {
    return (row != null) && row.getColumns().size() > 0;
  }
}

代码示例来源:origin: com.bazaarvoice.emodb/emodb-sor

while (_iter.hasNext()) {
  Row<ByteBuffer, DeltaKey> row = _iter.next();
  ColumnList<DeltaKey> rowColumns = row.getColumns();
  ByteBuffer rowKey = row.getRawKey();
  long nextTableUuid = AstyanaxStorage.getTableUuid(row.getRawKey());
  if (nextTableUuid != tableUuid) {
  int shardId = AstyanaxStorage.getShardId(row.getRawKey());
  ByteBuffer nextPossibleTableStart = AstyanaxStorage.getRowKeyRaw(shardId, tableUuid + 1, "");
  ByteBuffer end = rowRange.getEnd();

代码示例来源:origin: thinkaurelius/titan

@Override
  public boolean apply(@Nullable Row<ByteBuffer, ByteBuffer> row) {
    return (row != null) && !row.getKey().equals(skip);
  }
}

代码示例来源:origin: com.netflix.astyanax/astyanax-cql

String lastToken = partitioner.getTokenForKey(lastRow.getRawKey());
checkpointManager.trackCheckpoint(startToken, currentToken);
if (repeatLastToken) {
    if (!lastToken.equals(partitioner.getTokenForKey(rows.getRowByIndex(i).getRawKey()))) {
      break;

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

final ColumnList<C> columns = result.getRow( key ).getColumns();

代码示例来源:origin: com.bazaarvoice.emodb/emodb-sor

while (_iter.hasNext()) {
  Row<ByteBuffer, UUID> row = _iter.next();
  ColumnList<UUID> rowColumns = row.getColumns();
  ByteBuffer rowKey = row.getRawKey();
  long nextTableUuid = AstyanaxStorage.getTableUuid(row.getRawKey());
  if (nextTableUuid != tableUuid) {
  int shardId = AstyanaxStorage.getShardId(row.getRawKey());
  ByteBuffer nextPossibleTableStart = AstyanaxStorage.getRowKeyRaw(shardId, tableUuid + 1, "");
  ByteBuffer end = rowRange.getEnd();

代码示例来源:origin: thinkaurelius/titan

@Override
public StaticBuffer next() {
  ensureOpen();
  currentRow = rows.next();
  return StaticArrayBuffer.of(currentRow.getKey());
}

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

final Row<ScopedRowKey<K>, UUID> row = latestEntityColumns.next();
final ColumnList<UUID> columns = row.getColumns();
final Id entityId = getEntityIdFromKey( row.getKey() );

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

/**
 * A single row is present, only parse the single row
 * @param result
 * @return
 */
private List<T> singleRowResult( final Rows<R, C> result ) {
  if (logger.isTraceEnabled()) logger.trace( "Only a single row has columns.  Parsing directly" );
  for ( R key : result.getKeys() ) {
    final ColumnList<C> columnList = result.getRow( key ).getColumns();
    final int size = columnList.size();
    if ( size > 0 ) {
      final List<T> results = new ArrayList<>(size);
      for(Column<C> column: columnList){
        results.add(columnParser.parseColumn( column ));
      }
      return results;
    }
  }
  //we didn't have any results, just return nothing
  return Collections.<T>emptyList();
}

代码示例来源:origin: bazaarvoice/emodb

while (_iter.hasNext()) {
  Row<ByteBuffer, DeltaKey> row = _iter.next();
  ColumnList<DeltaKey> rowColumns = row.getColumns();
  ByteBuffer rowKey = row.getRawKey();
  long nextTableUuid = AstyanaxStorage.getTableUuid(row.getRawKey());
  if (nextTableUuid != tableUuid) {
  int shardId = AstyanaxStorage.getShardId(row.getRawKey());
  ByteBuffer nextPossibleTableStart = AstyanaxStorage.getRowKeyRaw(shardId, tableUuid + 1, "");
  ByteBuffer end = rowRange.getEnd();

代码示例来源:origin: com.netflix.astyanax/astyanax-thrift

@Override
  public K apply(Row<K, C> input) {
    return input.getKey();
  }
});

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

final Row<ScopedRowKey<Id>, Boolean> row = latestEntityColumns.next();
final ColumnList<Boolean> columns = row.getColumns();
final Id entityId = row.getKey().getKey();

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

final ColumnList<C> columns = result.getRow( key ).getColumns();

代码示例来源:origin: bazaarvoice/emodb

while (_iter.hasNext()) {
  Row<ByteBuffer, UUID> row = _iter.next();
  ColumnList<UUID> rowColumns = row.getColumns();
  ByteBuffer rowKey = row.getRawKey();
  long nextTableUuid = AstyanaxStorage.getTableUuid(row.getRawKey());
  if (nextTableUuid != tableUuid) {
  int shardId = AstyanaxStorage.getShardId(row.getRawKey());
  ByteBuffer nextPossibleTableStart = AstyanaxStorage.getRowKeyRaw(shardId, tableUuid + 1, "");
  ByteBuffer end = rowRange.getEnd();

代码示例来源:origin: com.bazaarvoice.astyanax/astyanax-thrift

@Override
  public K apply(Row<K, C> input) {
    return input.getKey();
  }
});

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

final Row<ScopedRowKey<CollectionPrefixedKey<Id>>, UUID> row = latestEntityColumns.next();
final ColumnList<UUID> columns = row.getColumns();
final Id entityId = row.getKey().getKey().getSubKey();

代码示例来源:origin: thinkaurelius/titan

@Override
public RecordIterator<Entry> getEntries() {
  ensureOpen();
  if (sliceQuery == null)
    throw new IllegalStateException("getEntries() requires SliceQuery to be set.");
  return new RecordIterator<Entry>() {
    private final Iterator<Entry> columns =
        CassandraHelper.makeEntryIterator(currentRow.getColumns(),
            entryGetter,
            sliceQuery.getSliceEnd(),sliceQuery.getLimit());
    @Override
    public boolean hasNext() {
      ensureOpen();
      return columns.hasNext();
    }
    @Override
    public Entry next() {
      ensureOpen();
      return columns.next();
    }
    @Override
    public void close() {
      isClosed = true;
    }
    @Override
    public void remove() {
      throw new UnsupportedOperationException();
    }
  };
}

代码示例来源:origin: com.netflix.astyanax/astyanax-cassandra

if (row.getColumns().isEmpty())
  continue;
rowCount++;
String idString = serializers.keyAsString(row.getRawKey());
count += writeColumnsAsRows(idString, row.getColumns(), firstRow);
firstRow = false;
  if (row.getColumns().isEmpty())
    continue;
  rowCount++;
    String idString = serializers.keyAsString(row.getRawKey());
    out.append(jsonifyString(this.fieldNames.get(Field.ROW_KEY))).append(":")
        .append(jsonifyString(idString));
    writeColumns(row.getColumns(), false);
    count++;
  if (row.getColumns().isEmpty())
    continue;
  rowCount++;
    String idString = serializers.keyAsString(row.getRawKey());
    out.append(jsonifyString(idString)).append(":{");
    writeColumns(row.getColumns(), true);
    out.print("}");
    count++;

代码示例来源:origin: com.bazaarvoice.astyanax/astyanax-thrift

@Override
  public K apply(Row<K, C> row) {
    return row.getKey();
  }
});

相关文章