public class UDFContext
extends java.lang.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(java.lang.String udfConfsStr,
java.lang.String clientSysPropsStr) |
java.util.Properties |
getClientSysProps() |
java.util.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.
|
java.util.HashMap<org.apache.pig.impl.util.UDFContext.UDFContextKey,java.util.Properties> |
getUdfConfs() |
static UDFContext |
getUDFContext() |
java.util.Properties |
getUDFProperties(java.lang.Class c)
Get a properties object that is specific to this UDF.
|
java.util.Properties |
getUDFProperties(java.lang.Class c,
java.lang.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() |
java.lang.String |
serialize() |
void |
serialize(org.apache.hadoop.conf.Configuration conf)
Serialize the UDF specific information into an instance
of JobConf.
|
void |
setClientSystemProps(java.util.Properties properties) |
static void |
setUdfContext(UDFContext udfContext) |
static void |
staticDataCleanup() |
public static UDFContext getUDFContext()
UDFContextpublic static void setUdfContext(UDFContext udfContext)
public static void staticDataCleanup()
public java.util.HashMap<org.apache.pig.impl.util.UDFContext.UDFContextKey,java.util.Properties> getUdfConfs()
public void setClientSystemProps(java.util.Properties properties)
public java.util.Properties getClientSystemProps()
public void addJobConf(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.conf.Configuration getJobConf()
public java.util.Properties getUDFProperties(java.lang.Class c,
java.lang.String[] args)
c - of the UDF obtaining the properties object.args - String arguments that make this instance of
the UDF unique.public java.util.Properties getUDFProperties(java.lang.Class c)
c - of the UDF obtaining the properties object.public void serialize(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
conf - JobConf to serialize intojava.io.IOException - if underlying serialization throws itpublic java.lang.String serialize()
public void deserialize()
throws java.io.IOException
java.io.IOException - if underlying deseralization throws itpublic void deserializeForSpark(java.lang.String udfConfsStr,
java.lang.String clientSysPropsStr)
throws java.io.IOException
java.io.IOExceptionpublic void reset()
public boolean isUDFConfEmpty()
public boolean isFrontend()
public UDFContext clone()
clone in class java.lang.Objectpublic java.util.Properties getClientSysProps()
Copyright © 2007-2025 The Apache Software Foundation