org.kitesdk.data.mapreduce
Class DatasetKeyInputFormat<E>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputFormat<E,Void>
      extended by org.kitesdk.data.mapreduce.DatasetKeyInputFormat<E>
Type Parameters:
E - The type of entities in the Dataset.
All Implemented Interfaces:
Configurable

@Beta
public class DatasetKeyInputFormat<E>
extends InputFormat<E,Void>
implements Configurable

A MapReduce InputFormat for reading from a Dataset. Since a Dataset only contains entities (not key/value pairs), this output format ignores the value.


Nested Class Summary
static class DatasetKeyInputFormat.ConfigBuilder
           
 
Field Summary
static String KITE_CONSTRAINTS
           
static String KITE_DATASET_NAME
          Deprecated. 
static String KITE_INPUT_URI
           
static String KITE_PARTITION_DIR
           
static String KITE_REPOSITORY_URI
          Deprecated. 
static String KITE_TYPE
           
 
Constructor Summary
DatasetKeyInputFormat()
           
 
Method Summary
static DatasetKeyInputFormat.ConfigBuilder configure(Configuration conf)
          Returns a helper to add input options to the given Configuration.
static DatasetKeyInputFormat.ConfigBuilder configure(Job job)
          Configures the Job to use the DatasetKeyInputFormat and returns a helper to add further configuration.
 RecordReader<E,Void> createRecordReader(InputSplit inputSplit, TaskAttemptContext taskAttemptContext)
           
 Configuration getConf()
           
 List<InputSplit> getSplits(JobContext jobContext)
           
 void setConf(Configuration configuration)
           
static void setDatasetName(Job job, String name)
          Deprecated. will be removed in 0.16.0; use configure(Job) instead
static void setRepositoryUri(Job job, URI uri)
          Deprecated. will be removed in 0.16.0; use configure(Job) instead
static
<E> void
setView(Configuration conf, View<E> view)
          Deprecated. will be removed in 0.16.0; use configure(Configuration)
static
<E> void
setView(Job job, View<E> view)
          Deprecated. will be removed in 0.16.0; use configure(Job) instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KITE_INPUT_URI

public static final String KITE_INPUT_URI
See Also:
Constant Field Values

KITE_REPOSITORY_URI

@Deprecated
public static final String KITE_REPOSITORY_URI
Deprecated. 
See Also:
Constant Field Values

KITE_DATASET_NAME

@Deprecated
public static final String KITE_DATASET_NAME
Deprecated. 
See Also:
Constant Field Values

KITE_PARTITION_DIR

public static final String KITE_PARTITION_DIR
See Also:
Constant Field Values

KITE_CONSTRAINTS

public static final String KITE_CONSTRAINTS
See Also:
Constant Field Values

KITE_TYPE

public static final String KITE_TYPE
See Also:
Constant Field Values
Constructor Detail

DatasetKeyInputFormat

public DatasetKeyInputFormat()
Method Detail

configure

public static DatasetKeyInputFormat.ConfigBuilder configure(Job job)
Configures the Job to use the DatasetKeyInputFormat and returns a helper to add further configuration.

Parameters:
job - the Job to configure
Since:
0.15.0

configure

public static DatasetKeyInputFormat.ConfigBuilder configure(Configuration conf)
Returns a helper to add input options to the given Configuration.

Parameters:
conf - a Configuration
Since:
0.15.0

setRepositoryUri

@Deprecated
public static void setRepositoryUri(Job job,
                                               URI uri)
Deprecated. will be removed in 0.16.0; use configure(Job) instead


setDatasetName

@Deprecated
public static void setDatasetName(Job job,
                                             String name)
Deprecated. will be removed in 0.16.0; use configure(Job) instead


setView

@Deprecated
public static <E> void setView(Job job,
                                          View<E> view)
Deprecated. will be removed in 0.16.0; use configure(Job) instead


setView

@Deprecated
public static <E> void setView(Configuration conf,
                                          View<E> view)
Deprecated. will be removed in 0.16.0; use configure(Configuration)


getConf

public Configuration getConf()
Specified by:
getConf in interface Configurable

setConf

public void setConf(Configuration configuration)
Specified by:
setConf in interface Configurable

getSplits

public List<InputSplit> getSplits(JobContext jobContext)
                           throws IOException,
                                  InterruptedException
Specified by:
getSplits in class InputFormat<E,Void>
Throws:
IOException
InterruptedException

createRecordReader

public RecordReader<E,Void> createRecordReader(InputSplit inputSplit,
                                               TaskAttemptContext taskAttemptContext)
                                        throws IOException,
                                               InterruptedException
Specified by:
createRecordReader in class InputFormat<E,Void>
Throws:
IOException
InterruptedException


Copyright © 2013–2014. All rights reserved.