public class GoraSparkEngine<K,V extends Persistent> extends Object
Constructor and Description |
---|
GoraSparkEngine(Class<K> clazzK,
Class<V> clazzV) |
Modifier and Type | Method and Description |
---|---|
<K,V extends Persistent> |
generateOutputConf(DataStore<K,V> dataStore)
Creates a job and sets the output parameters for the conf that Spark will use
|
<K,V extends Persistent> |
generateOutputConf(org.apache.hadoop.mapreduce.Job job,
Class<? extends DataStore> dataStoreClass,
Class<K> keyClass,
Class<V> persistentClass)
Sets the output parameters for the conf that Spark will use
|
<K,V extends Persistent> |
generateOutputConf(org.apache.hadoop.mapreduce.Job job,
DataStore<K,V> dataStore,
boolean reuseObjects)
Sets the output parameters for the conf that Spark will use
|
org.apache.spark.api.java.JavaPairRDD<K,V> |
initialize(org.apache.spark.api.java.JavaSparkContext sparkContext,
org.apache.hadoop.conf.Configuration conf,
DataStore<K,V> dataStore)
Initializes a
JavaPairRDD from given Spark context, Hadoop
configuration and data store. |
org.apache.spark.api.java.JavaPairRDD<K,V> |
initialize(org.apache.spark.api.java.JavaSparkContext sparkContext,
DataStore<K,V> dataStore)
Initializes a
JavaPairRDD from given Spark context and data store. |
public org.apache.spark.api.java.JavaPairRDD<K,V> initialize(org.apache.spark.api.java.JavaSparkContext sparkContext, org.apache.hadoop.conf.Configuration conf, DataStore<K,V> dataStore)
JavaPairRDD
from given Spark context, Hadoop
configuration and data store.sparkContext
- Spark contextconf
- Hadoop configurationdataStore
- Data storepublic org.apache.spark.api.java.JavaPairRDD<K,V> initialize(org.apache.spark.api.java.JavaSparkContext sparkContext, DataStore<K,V> dataStore)
JavaPairRDD
from given Spark context and data store.
If given data store is Configurable
and has not a configuration
than a Hadoop configuration is created otherwise existed configuration is
used.sparkContext
- Spark contextdataStore
- Data storepublic <K,V extends Persistent> org.apache.hadoop.conf.Configuration generateOutputConf(DataStore<K,V> dataStore) throws IOException
dataStore
- the datastore as the outputIOException
public <K,V extends Persistent> org.apache.hadoop.conf.Configuration generateOutputConf(org.apache.hadoop.mapreduce.Job job, DataStore<K,V> dataStore, boolean reuseObjects)
job
- the job to set the properties fordataStore
- the datastore as the outputreuseObjects
- whether to reuse objects in serializationpublic <K,V extends Persistent> org.apache.hadoop.conf.Configuration generateOutputConf(org.apache.hadoop.mapreduce.Job job, Class<? extends DataStore> dataStoreClass, Class<K> keyClass, Class<V> persistentClass)
job
- the job to set the properties fordataStoreClass
- the datastore classkeyClass
- output key classpersistentClass
- output value classCopyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.