@Test @SuppressWarnings("rawtypes") public void testGetSplits() throws IOException, InterruptedException { List<InputSplit> splits = getInputSplits(); assertTrue(splits.size() > 0); InputSplit split = splits.get(0); PartitionQuery query = ((GoraInputSplit)split).getQuery(); assertTrue(Arrays.equals(getEmployeeFieldNames(), query.getFields())); }
@Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { List<PartitionQuery<K, T>> queries = dataStore.getPartitions(query); List<InputSplit> splits = new ArrayList<>(queries.size()); for(PartitionQuery<K,T> query : queries) { splits.add(new GoraInputSplit(context.getConfiguration(), query)); } return splits; }
GoraInputFormat extends InputFormat<K, T> implements Configurable { @Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { List<PartitionQuery<K, T>> queries = dataStore.getPartitions(query); List<InputSplit> splits = new ArrayList<>(queries.size()); for(PartitionQuery<K,T> query : queries) { splits.add(new GoraInputSplit(context.getConfiguration(), query)); } return splits; } }
GoraInputFormat extends InputFormat<K, T> implements Configurable { @Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { List<PartitionQuery<K, T>> queries = dataStore.getPartitions(query); List<InputSplit> splits = new ArrayList<>(queries.size()); for(PartitionQuery<K,T> query : queries) { splits.add(new GoraInputSplit(context.getConfiguration(), query)); } return splits; }  }
GoraInputFormat extends InputFormat<K, T> implements Configurable { @Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { List<PartitionQuery<K, T>> queries = dataStore.getPartitions(query); List<InputSplit> splits = new ArrayList<>(queries.size()); for(PartitionQuery<K,T> query : queries) { splits.add(new GoraInputSplit(context.getConfiguration(), query)); } return splits; }  @Override @SuppressWarnings("unchecked") RecordReader<K, T> createRecordReader(InputSplit split,
      TaskAttemptContext context); @Override List<InputSplit> getSplits(JobContext context); @Override Configuration getConf(); @Override void setConf(Configuration conf); static void setQuery(Job job
      , Query<K, T> query); Query<K, T> getQuery(Configuration conf); static void setInput(Job job
      , Query<K1,V1> query, boolean reuseObjects); static void setInput(
      Job job, 
      Class<? extends DataStore<K1,V1>> dataStoreClass, 
      Class<K1> inKeyClass, 
      Class<V1> inValueClass,
      boolean reuseObjects); }
GoraInputFormat extends InputFormat<K, T> implements Configurable { @Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { List<PartitionQuery<K, T>> queries = dataStore.getPartitions(query); List<InputSplit> splits = new ArrayList<>(queries.size()); for(PartitionQuery<K,T> query : queries) { splits.add(new GoraInputSplit(context.getConfiguration(), query)); } return splits; }  @Override @SuppressWarnings("unchecked") RecordReader<K, T> createRecordReader(InputSplit split,
      TaskAttemptContext context); @Override List<InputSplit> getSplits(JobContext context); @Override Configuration getConf(); @Override void setConf(Configuration conf); static void setQuery(Job job
      , Query<K, T> query); Query<K, T> getQuery(Configuration conf); static void setInput(Job job
      , Query<K1,V1> query, boolean reuseObjects); static void setInput(
      Job job, 
      Class<? extends DataStore<K1,V1>> dataStoreClass, 
      Class<K1> inKeyClass, 
      Class<V1> inValueClass,
      boolean reuseObjects); static final String QUERY_KEY; }