K
- KeyClass.T
- PersistentClass.public class ExtraGoraInputFormat<K,T extends org.apache.gora.persistency.impl.PersistentBase>
extends org.apache.hadoop.mapreduce.InputFormat<K,T>
setInput()
methods, or from GoraMapper.Modifier and Type | Field and Description |
---|---|
static String |
QUERY_KEY
String used to map partitioned queries into configuration object.
|
Constructor and Description |
---|
ExtraGoraInputFormat() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapreduce.RecordReader<K,T> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
org.apache.gora.store.DataStore<K,T> |
getDataStore() |
org.apache.gora.query.Query<K,T> |
getQuery() |
org.apache.gora.query.Query<K,T> |
getQuery(org.apache.hadoop.conf.Configuration conf)
Gets the partitioned query from the conf object passed.
|
List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context)
Gets splits.
|
void |
setDataStore(org.apache.gora.store.DataStore<K,T> datStore) |
static <K,V extends org.apache.gora.persistency.Persistent> |
setInput(org.apache.hadoop.mapreduce.Job job,
org.apache.gora.query.Query<K,V> query,
org.apache.gora.store.DataStore<K,V> dataStore,
boolean reuseObjects)
Sets the input parameters for the job
|
static <K,T extends org.apache.gora.persistency.Persistent> |
setQuery(org.apache.hadoop.conf.Configuration conf,
org.apache.gora.query.Query<K,T> query)
Sets the partitioned query inside the job object.
|
void |
setQuery(org.apache.gora.query.Query<K,T> query) |
public static final String QUERY_KEY
public org.apache.hadoop.mapreduce.RecordReader<K,T> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<K,T extends org.apache.gora.persistency.impl.PersistentBase>
split
- InputSplit to be used.context
- JobContext to be used.IOException
InterruptedException
public List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context) throws IOException, InterruptedException
getSplits
in class org.apache.hadoop.mapreduce.InputFormat<K,T extends org.apache.gora.persistency.impl.PersistentBase>
context
- for the job.IOException
InterruptedException
public void setDataStore(org.apache.gora.store.DataStore<K,T> datStore)
datStore
- the dataStore to setpublic void setQuery(org.apache.gora.query.Query<K,T> query)
query
- the query to setpublic static <K,T extends org.apache.gora.persistency.Persistent> void setQuery(org.apache.hadoop.conf.Configuration conf, org.apache.gora.query.Query<K,T> query) throws IOException
K
- Key classT
- Persistent classconf
- Configuration used.query
- Query to be executed.IOException
- Exception that be might thrown.public org.apache.gora.query.Query<K,T> getQuery(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- Configuration object.IOException
- Exception that might be thrown.public static <K,V extends org.apache.gora.persistency.Persistent> void setInput(org.apache.hadoop.mapreduce.Job job, org.apache.gora.query.Query<K,V> query, org.apache.gora.store.DataStore<K,V> dataStore, boolean reuseObjects) throws IOException
K
- Key classV
- Persistent classjob
- the job to set the properties forquery
- the query to get the inputs fromdataStore
- the datastore as the inputreuseObjects
- whether to reuse objects in serializationIOException
Copyright © 2011-2019 The Apache Software Foundation. All Rights Reserved.