本文整理汇总了Java中com.google.bigtable.v2.Cell类的典型用法代码示例。如果您正苦于以下问题:Java Cell类的具体用法?Java Cell怎么用?Java Cell使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Cell类属于com.google.bigtable.v2包,在下文中一共展示了Cell类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeRow
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
/** Helper function that builds a {@link Row} in a test table that could be returned by read. */
private static Row makeRow(ByteString key, ByteString value) {
// Build the currentRow and return true.
Column.Builder newColumn = TEST_COLUMN.toBuilder().addCells(Cell.newBuilder().setValue(value));
return Row.newBuilder()
.setKey(key)
.addFamilies(TEST_FAMILY.toBuilder().addColumns(newColumn))
.build();
}
示例2: testParentDataTypeToDataType
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
@Test
public void testParentDataTypeToDataType() throws Exception {
assertEquals(Lists.newArrayList(), cellsRead.parentTypeToCurrentType().apply(Optional.empty()));
assertEquals(Lists.newArrayList(), cellsRead.parentTypeToCurrentType().apply(Optional.of(Column.getDefaultInstance())));
final Cell cell = Cell.getDefaultInstance();
final Column column = Column.newBuilder().addCells(cell).build();
assertEquals(ImmutableList.of(cell), cellsRead.parentTypeToCurrentType().apply(Optional.of(column)));
}
示例3: testParentDataTypeToDataType
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
@Test
public void testParentDataTypeToDataType() throws Exception {
assertEquals(Optional.empty(), cellRead.parentTypeToCurrentType().apply(Collections.emptyList()));
final Cell cell = Cell.getDefaultInstance();
assertEquals(Optional.of(cell), cellRead.parentTypeToCurrentType().apply(Collections.singletonList(cell)));
}
示例4: ReadImpl
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
ReadImpl(final Internal<List<Cell>> parent) {
super(parent);
}
示例5: parentTypeToCurrentType
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
@Override
protected Function<List<Cell>, Optional<Cell>> parentTypeToCurrentType() {
return AbstractBigtableRead::headOption;
}
示例6: parentTypeToCurrentType
import com.google.bigtable.v2.Cell; //导入依赖的package包/类
@Override
protected Function<Optional<Column>, List<Cell>> parentTypeToCurrentType() {
return colOpt -> colOpt.map(Column::getCellsList).orElse(Collections.emptyList());
}