Search in sources :

Example 1 with FileBackedDataStore

use of org.apache.gora.store.FileBackedDataStore in project gora by apache.

the class GoraInputFormat method setInputPath.

@SuppressWarnings({ "rawtypes" })
private void setInputPath(PartitionQuery<K, T> partitionQuery) throws IOException {
    //if the data store is file based
    if (partitionQuery instanceof FileSplitPartitionQuery) {
        FileSplit split = ((FileSplitPartitionQuery<K, T>) partitionQuery).getSplit();
        //set the input path to FileSplit's path.
        ((FileBackedDataStore) partitionQuery.getDataStore()).setInputPath(split.getPath().toString());
    }
}
Also used : FileBackedDataStore(org.apache.gora.store.FileBackedDataStore) FileSplitPartitionQuery(org.apache.gora.query.impl.FileSplitPartitionQuery) FileSplit(org.apache.hadoop.mapreduce.lib.input.FileSplit)

Aggregations

FileSplitPartitionQuery (org.apache.gora.query.impl.FileSplitPartitionQuery)1 FileBackedDataStore (org.apache.gora.store.FileBackedDataStore)1 FileSplit (org.apache.hadoop.mapreduce.lib.input.FileSplit)1