public class UDFContext extends Object
Modifier and Type | Method and Description |
---|---|
void |
addJobConf(org.apache.hadoop.conf.Configuration conf)
Adds the JobConf to this singleton.
|
UDFContext |
clone()
Make a shallow copy of the context.
|
void |
deserialize()
Populate the udfConfs field.
|
void |
deserializeForSpark(String udfConfsStr,
String clientSysPropsStr) |
Properties |
getClientSysProps() |
Properties |
getClientSystemProps()
Get the System Properties (Read only) as on the client machine from where Pig
was launched.
|
org.apache.hadoop.conf.Configuration |
getJobConf()
Get the JobConf.
|
HashMap<org.apache.pig.impl.util.UDFContext.UDFContextKey,Properties> |
getUdfConfs() |
static UDFContext |
getUDFContext() |
Properties |
getUDFProperties(Class c)
Get a properties object that is specific to this UDF.
|
Properties |
getUDFProperties(Class c,
String[] args)
Get a properties object that is specific to this UDF.
|
boolean |
isFrontend()
Convenience method for UDF code to check where it runs (see PIG-2576)
|
boolean |
isUDFConfEmpty() |
void |
reset() |
String |
serialize() |
void |
serialize(org.apache.hadoop.conf.Configuration conf)
Serialize the UDF specific information into an instance
of JobConf.
|
void |
setClientSystemProps(Properties properties) |
static void |
setUdfContext(UDFContext udfContext) |
static void |
staticDataCleanup() |
public static UDFContext getUDFContext()
UDFContext
public static void setUdfContext(UDFContext udfContext)
public static void staticDataCleanup()
public HashMap<org.apache.pig.impl.util.UDFContext.UDFContextKey,Properties> getUdfConfs()
public void setClientSystemProps(Properties properties)
public Properties getClientSystemProps()
public void addJobConf(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.conf.Configuration getJobConf()
public Properties getUDFProperties(Class c, String[] args)
c
- of the UDF obtaining the properties object.args
- String arguments that make this instance of
the UDF unique.public Properties getUDFProperties(Class c)
c
- of the UDF obtaining the properties object.public void serialize(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- JobConf to serialize intoIOException
- if underlying serialization throws itpublic String serialize()
public void deserialize() throws IOException
IOException
- if underlying deseralization throws itpublic void deserializeForSpark(String udfConfsStr, String clientSysPropsStr) throws IOException
IOException
public void reset()
public boolean isUDFConfEmpty()
public boolean isFrontend()
public UDFContext clone()
public Properties getClientSysProps()
Copyright © 2007-2017 The Apache Software Foundation