public class WarpScriptInputFormat
extends org.apache.hadoop.mapreduce.InputFormat<java.lang.Object,java.lang.Object>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PATH_CONFIG_KEY
Configuration key we will set to the current path if the split if a FileSplit
|
static java.lang.String |
WARPSCRIPT_INPUTFORMAT_CLASS
Class of the wrapped InputFormat
|
static java.lang.String |
WARPSCRIPT_INPUTFORMAT_CONF_SUFFIX
Suffix to remove from configuration keys to override or create specific configuration entries
|
static java.lang.String |
WARPSCRIPT_INPUTFORMAT_MACRO
WarpScript code fragment producing a macro which will be applied
|
static java.lang.String |
WARPSCRIPT_INPUTFORMAT_SCRIPT
WarpScript code fragment to apply, this code will be wrapped in a macro <% ...
|
static java.lang.String |
WARPSCRIPT_INPUTFORMAT_SUFFIX
Suffix to use for the configuration
|
| Constructor and Description |
|---|
WarpScriptInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapreduce.RecordReader<java.lang.Object,java.lang.Object> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
java.util.List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context) |
java.lang.String |
getSuffix() |
WarpScriptExecutor |
getWarpScriptExecutor(org.apache.hadoop.conf.Configuration conf,
java.lang.String code,
boolean isMacro)
Return the actual WarpScript code executor given the script
which was passed as parameter.
|
java.io.InputStream |
getWarpScriptInputStream(java.lang.String originalFilePath)
Create an InputStream from a file path.
|
org.apache.hadoop.mapreduce.RecordReader |
getWrappedRecordReader() |
void |
init(org.apache.hadoop.conf.Configuration conf) |
java.lang.String |
parseWarpScript(java.lang.String filepath) |
public static final java.lang.String PATH_CONFIG_KEY
public static final java.lang.String WARPSCRIPT_INPUTFORMAT_SUFFIX
public static final java.lang.String WARPSCRIPT_INPUTFORMAT_CLASS
public static final java.lang.String WARPSCRIPT_INPUTFORMAT_SCRIPT
public static final java.lang.String WARPSCRIPT_INPUTFORMAT_MACRO
public static final java.lang.String WARPSCRIPT_INPUTFORMAT_CONF_SUFFIX
public java.util.List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context)
throws java.io.IOException,
java.lang.InterruptedException
getSplits in class org.apache.hadoop.mapreduce.InputFormat<java.lang.Object,java.lang.Object>java.io.IOExceptionjava.lang.InterruptedExceptionpublic org.apache.hadoop.mapreduce.RecordReader<java.lang.Object,java.lang.Object> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException,
java.lang.InterruptedException
createRecordReader in class org.apache.hadoop.mapreduce.InputFormat<java.lang.Object,java.lang.Object>java.io.IOExceptionjava.lang.InterruptedExceptionpublic WarpScriptExecutor getWarpScriptExecutor(org.apache.hadoop.conf.Configuration conf, java.lang.String code, boolean isMacro) throws java.io.IOException, WarpScriptException
java.io.IOExceptionWarpScriptExceptionpublic java.lang.String parseWarpScript(java.lang.String filepath)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getWarpScriptInputStream(java.lang.String originalFilePath)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getSuffix()
public void init(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.mapreduce.RecordReader getWrappedRecordReader()