|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.FuncSpec
@InterfaceAudience.Public @InterfaceStability.Stable public class FuncSpec
Class to represent a UDF specification. Encapsulates the class name and the arguments to the constructor.
Constructor Summary | |
---|---|
FuncSpec(String funcSpec)
|
|
FuncSpec(String funcSpec,
Schema inputArgsSchema)
|
|
FuncSpec(String className,
String ctorArg)
|
|
FuncSpec(String className,
String[] ctorArgs)
|
|
FuncSpec(String className,
String[] ctorArgs,
Schema inputArgsSchema)
|
Method Summary | |
---|---|
FuncSpec |
clone()
|
boolean |
equals(Object other)
|
static String |
getArgStringFromSpec(String funcSpec)
Get the argument values passed to the func spec. |
String |
getClassName()
|
static String |
getClassNameFromSpec(String funcSpec)
Parse the class name out of a function specification string. |
String[] |
getCtorArgs()
|
Schema |
getInputArgsSchema()
|
int |
hashCode()
|
static List<String> |
parseArguments(String argString)
Parse the argument values out of a function specification string. |
void |
setClassName(String className)
|
void |
setCtorArgs(String[] ctorArgs)
|
void |
setInputArgsSchema(Schema inputArgsSchema)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FuncSpec(String className, String ctorArg)
className
- the name of the class for the udfctorArg
- the argument to pass the constructor for the above class.
Constructors can only take strings.public FuncSpec(String className, String[] ctorArgs)
className
- the name of the class for the udfctorArgs
- the arguments to pass to the constructor for the above class.
Constructors can only take strings.public FuncSpec(String className, String[] ctorArgs, Schema inputArgsSchema)
className
- the name of the class for the udfctorArgs
- the arguments to pass to the constructor for the above class.
Constructors can only take strings.inputArgsSchema
- schema for input args taken by this Functionpublic FuncSpec(String funcSpec)
funcSpec
- the name of the function and any arguments.
It should have the form: classname('arg1', 'arg2', ...)public FuncSpec(String funcSpec, Schema inputArgsSchema)
funcSpec
- funcSpec the name of the function and any arguments.
It should have the form: classname('arg1', 'arg2', ...)inputArgsSchema
- schema for input args taken by this FunctionMethod Detail |
---|
public static String getClassNameFromSpec(String funcSpec)
public static String getArgStringFromSpec(String funcSpec)
public static List<String> parseArguments(String argString)
argString
- should be of the form "'arg1', 'arg2', ..."
public String getClassName()
public void setClassName(String className)
className
- the className to setpublic String[] getCtorArgs()
public void setCtorArgs(String[] ctorArgs)
ctorArgs
- the ctorArgs to setpublic String toString()
toString
in class Object
public Schema getInputArgsSchema()
public void setInputArgsSchema(Schema inputArgsSchema)
inputArgsSchema
- the inputArgsSchema to setpublic boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public FuncSpec clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |