final KijiColumnName column4 = STRING_MAP_2;
for (int pageSize : ImmutableList.of(0, 1, 2, 10)) {
{ // Single version | no timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(ColumnsDef.create().add(familyColumn1))
.addColumns(ColumnsDef.create().add(familyColumn2))
.build();
final Iterable<? extends Entry<Long, ?>> column1Entries =
Iterables.limit(ROW_DATA.get(column1).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column2Entries =
Iterables.limit(ROW_DATA.get(column2).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column3Entries =
Iterables.limit(ROW_DATA.get(column3).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column4Entries =
Iterables.limit(ROW_DATA.get(column4).entrySet(), 1);
testViewGet(
request,
Iterables.concat(column1Entries, column2Entries, column3Entries, column4Entries));
}
{ // Single version | timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(ColumnsDef.create().withPageSize(pageSize).add(familyColumn1))
.addColumns(ColumnsDef.create().withPageSize(pageSize).add(familyColumn2))
.withTimeRange(4, 6)
.build();
final Iterable<? extends Entry<Long, ?>> column1Entries =
Iterables.limit(ROW_DATA.get(column1).subMap(6L, false, 4L, true).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column2Entries =
Iterables.limit(ROW_DATA.get(column2).subMap(6L, false, 4L, true).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column3Entries =
Iterables.limit(ROW_DATA.get(column3).subMap(6L, false, 4L, true).entrySet(), 1);
final Iterable<? extends Entry<Long, ?>> column4Entries =
Iterables.limit(ROW_DATA.get(column4).subMap(6L, false, 4L, true).entrySet(), 1);
testViewGet(
request,
Iterables.concat(column1Entries, column2Entries, column3Entries, column4Entries));
}
{ // Multiple versions | no timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn1))
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn2))
.build();
final Iterable<? extends Entry<Long, ?>> column1Entries = ROW_DATA.get(column1).entrySet();
final Iterable<? extends Entry<Long, ?>> column2Entries = ROW_DATA.get(column2).entrySet();
final Iterable<? extends Entry<Long, ?>> column3Entries = ROW_DATA.get(column3).entrySet();
final Iterable<? extends Entry<Long, ?>> column4Entries = ROW_DATA.get(column4).entrySet();
testViewGet(
request,
Iterables.concat(column1Entries, column2Entries, column3Entries, column4Entries));
}
{ // Multiple versions | timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn1))
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn2))
.withTimeRange(4, 6)
.build();
final Iterable<? extends Entry<Long, ?>> column1Entries =
ROW_DATA.get(column1).subMap(6L, false, 4L, true).entrySet();
final Iterable<? extends Entry<Long, ?>> column2Entries =
ROW_DATA.get(column2).subMap(6L, false, 4L, true).entrySet();
final Iterable<? extends Entry<Long, ?>> column3Entries =
ROW_DATA.get(column3).subMap(6L, false, 4L, true).entrySet();
final Iterable<? extends Entry<Long, ?>> column4Entries =
ROW_DATA.get(column4).subMap(6L, false, 4L, true).entrySet();
testViewGet(
request,
Iterables.concat(column1Entries, column2Entries, column3Entries, column4Entries));
}
{ // Mixed versions | no timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(2).add(familyColumn1))
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn2))
.build();
final Iterable<? extends Entry<Long, ?>> column1Entries =
Iterables.limit(ROW_DATA.get(column1).entrySet(), 2);
final Iterable<? extends Entry<Long, ?>> column2Entries =
Iterables.limit(ROW_DATA.get(column2).entrySet(), 2);
final Iterable<? extends Entry<Long, ?>> column3Entries = ROW_DATA.get(column3).entrySet();
final Iterable<? extends Entry<Long, ?>> column4Entries = ROW_DATA.get(column4).entrySet();
testViewGet(
request,
Iterables.concat(column1Entries, column2Entries, column3Entries, column4Entries));
}
{ // Multiple versions | timerange
final KijiDataRequest request = KijiDataRequest
.builder()
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(100).add(familyColumn1))
.addColumns(
ColumnsDef.create().withPageSize(pageSize).withMaxVersions(1).add(familyColumn2))