Search in sources :

Example 11 with Column

use of com.airbnb.jitney.event.spinaltap.v1.Column in project simple-bigtable by spotify.

the class CellsReadImplTest method testParentDataTypeToDataType.

@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)));
}
Also used : Column(com.google.bigtable.v2.Column) Cell(com.google.bigtable.v2.Cell) Test(org.junit.Test)

Aggregations

Column (com.google.bigtable.v2.Column)7 Family (com.google.bigtable.v2.Family)6 ExecutionException (java.util.concurrent.ExecutionException)4 Test (org.junit.Test)3 ByteString (com.google.bigtable.repackaged.com.google.protobuf.ByteString)2 Column (com.google.bigtable.v1.Column)2 Family (com.google.bigtable.v1.Family)2 DeleteFromRow (com.google.bigtable.v1.Mutation.DeleteFromRow)2 ReadRowsRequest (com.google.bigtable.v1.ReadRowsRequest)2 Row (com.google.bigtable.v1.Row)2 RowFilter (com.google.bigtable.v1.RowFilter)2 Builder (com.google.bigtable.v1.RowFilter.Chain.Builder)2 Cell (com.google.bigtable.v2.Cell)2 DeleteFromRow (com.google.bigtable.v2.Mutation.DeleteFromRow)2 ReadRowsRequest (com.google.bigtable.v2.ReadRowsRequest)2 Row (com.google.bigtable.v2.Row)2 RowFilter (com.google.bigtable.v2.RowFilter)2 Builder (com.google.bigtable.v2.RowFilter.Chain.Builder)2 ByteString (com.google.protobuf.ByteString)2 ByteArrayByteIterator (com.yahoo.ycsb.ByteArrayByteIterator)2