use of org.apache.gora.mock.query.MockQuery in project gora by apache.
the class TestPartitionQueryImpl method testReadWrite.
@Test
public void testReadWrite() throws Exception {
MockQuery baseQuery = dataStore.newQuery();
baseQuery.setStartKey("start");
baseQuery.setLimit(42);
PartitionQueryImpl<String, MockPersistent> query = new PartitionQueryImpl<>(baseQuery);
TestWritable.testWritable(query);
}
use of org.apache.gora.mock.query.MockQuery in project gora by apache.
the class TestGoraInputFormat method getInputSplits.
public List<InputSplit> getInputSplits() throws IOException, InterruptedException {
Job job = Job.getInstance(new Configuration());
MockDataStore store = MockDataStore.get();
MockQuery query = store.newQuery();
query.setFields(getEmployeeFieldNames());
GoraInputFormat.setInput(job, query, false);
GoraInputFormat<String, MockPersistent> inputFormat = new GoraInputFormat<>();
inputFormat.setConf(job.getConfiguration());
return inputFormat.getSplits(job);
}
use of org.apache.gora.mock.query.MockQuery in project gora by apache.
the class TestGoraInputSplit method getPartitions.
private List<PartitionQuery<String, MockPersistent>> getPartitions() throws IOException {
MockDataStore store = MockDataStore.get();
MockQuery query = store.newQuery();
List<PartitionQuery<String, MockPersistent>> partitions = store.getPartitions(query);
return partitions;
}
Aggregations