|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.hadoop.pig.PigServerFactoryBean
public class PigServerFactoryBean
Factory for creating a PigServer instance. Note that since PigServer is not thread-safe and the Pig API does not
provide some type of factory, the factory bean returns an instance of ObjectFactory (which handles the creation of PigServer instances)
instead of the raw PigServer object which cannot be reused.
Note that the caller needs to handle the object clean-up, specifically calling PigServer.shutdown().
In general, to avoid leaks it is recommended to use the PigTemplate.
| Constructor Summary | |
|---|---|
PigServerFactoryBean()
|
|
| Method Summary | |
|---|---|
protected org.apache.pig.PigServer |
createPigInstance()
|
PigServerFactory |
getObject()
|
java.lang.Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setBeanName(java.lang.String name)
|
void |
setJobName(java.lang.String jobName)
Sets the job name. |
void |
setJobPriority(java.lang.String jobPriority)
Sets the job priority. |
void |
setParallelism(java.lang.Integer parallelism)
Sets the parallelism. |
void |
setPathsToSkip(java.util.Collection<java.lang.String> pathToSkip)
Sets the paths to skip. |
void |
setPigContext(org.apache.pig.impl.PigContext pigContext)
Sets the PigContext to use. |
void |
setScripts(java.util.Collection<PigScript> scripts)
Sets the scripts to execute at startup. |
void |
setUser(java.lang.String user)
Sets the user impersonation (optional) for executing Pig jobs. |
void |
setValidateEachStatement(java.lang.Boolean validateEachStatement)
Indicates whether each statement should be validated or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PigServerFactoryBean()
| Method Detail |
|---|
public PigServerFactory getObject()
throws java.lang.Exception
getObject in interface org.springframework.beans.factory.FactoryBean<PigServerFactory>java.lang.Exceptionpublic java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<PigServerFactory>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<PigServerFactory>
protected org.apache.pig.PigServer createPigInstance()
throws java.lang.Exception
java.lang.Exceptionpublic void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setPigContext(org.apache.pig.impl.PigContext pigContext)
PigContext to use.
pigContext - The pigContext to set.public void setPathsToSkip(java.util.Collection<java.lang.String> pathToSkip)
pathToSkip - The pathToSkip to set.public void setScripts(java.util.Collection<PigScript> scripts)
scripts - The scripts to set.public void setParallelism(java.lang.Integer parallelism)
parallelism - The parallelism to set.public void setJobName(java.lang.String jobName)
jobName - The jobName to set.public void setJobPriority(java.lang.String jobPriority)
jobPriority - The jobPriority to set.public void setValidateEachStatement(java.lang.Boolean validateEachStatement)
validateEachStatement - whether to validate each statement or not.public void setUser(java.lang.String user)
user - user/group information
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||