@InterfaceAudience.Public @InterfaceStability.Stable public class FuncSpec extends Object implements Serializable, Cloneable
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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() |
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 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 Schema getInputArgsSchema()
public void setInputArgsSchema(Schema inputArgsSchema)
inputArgsSchema
- the inputArgsSchema to setpublic FuncSpec clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2007-2017 The Apache Software Foundation