|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stolaf.cs.wmrserver.TransformProcessor
public class TransformProcessor
Provides methods to prepare and package transform (map or reduce) executables from users' code. Applies library code, compiles, and generates scripts as necessary for the desired language.
Constructor Summary | |
---|---|
TransformProcessor(org.apache.commons.configuration.HierarchicalConfiguration wmrConfig,
java.io.File languageConfDir,
java.io.File tempDir,
java.lang.String jobName)
Constructs a new TransformProcessor that will reference the given language configuration and use the given temp directory. |
Method Summary | |
---|---|
java.io.File |
getPackageDir()
|
java.io.File |
prepareMapperPackage(java.lang.String mapperSource,
java.lang.String language)
Prepares and writes a mapper script to the local filesystem, returning its path. |
java.io.File |
prepareReducerPackage(java.lang.String reducerSource,
java.lang.String language)
Prepares and writes a reducer script to the local filesystem, returning its path. |
protected java.io.File |
prepareTransformPackage(edu.stolaf.cs.wmrserver.TransformType transformType,
java.lang.String transformSource,
java.lang.String language)
Internal implementation of #prepareMapperPackage() and #prepareReducerPackage() that works for either, determined by the transformType argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformProcessor(org.apache.commons.configuration.HierarchicalConfiguration wmrConfig, java.io.File languageConfDir, java.io.File tempDir, java.lang.String jobName)
wmrConfig
- The language configuration for WebMapReducelangConfDir
- The directory containing language support filestempDir
- The directory in which to store processed filesjobName
- The name of the job, used in the script's filenameMethod Detail |
---|
public java.io.File prepareMapperPackage(java.lang.String mapperSource, java.lang.String language) throws java.io.IOException, ValidationException, CompilationException
mapperSource
- The mapper code provided by the userlanguage
- The language of the mapper, one specified in the
WebMapReduce language configuration
java.io.IOException
ValidationException
CompilationException
public java.io.File prepareReducerPackage(java.lang.String reducerSource, java.lang.String language) throws java.io.IOException, ValidationException, CompilationException
reducerSource
- The reducer code provided by the userlanguage
- The language of the reducer, one specified in the
WebMapReduce language configuration
java.io.IOException
ValidationException
CompilationException
public java.io.File getPackageDir() throws java.io.IOException
java.io.IOException
protected java.io.File prepareTransformPackage(edu.stolaf.cs.wmrserver.TransformType transformType, java.lang.String transformSource, java.lang.String language) throws java.io.IOException, ValidationException, CompilationException
java.io.IOException
ValidationException
CompilationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |