本文整理匯總了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());
}