public class GenericUDFToUnixTimeStamp extends GenericUDF
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.io.LongWritable |
retValue |
| Constructor and Description |
|---|
GenericUDFToUnixTimeStamp() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments.
|
String |
getDisplayString(String[] children)
Get the String to be displayed in explain.
|
protected String |
getName() |
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
protected void |
initializeInput(ObjectInspector[] arguments) |
protected static void |
setValueFromTs(org.apache.hadoop.io.LongWritable value,
Timestamp timestamp) |
checkArgGroups, checkArgPrimitive, checkArgsSize, close, configure, copyToNewInstance, flip, getArgOrder, getConstantBooleanValue, getConstantIntValue, getConstantStringValue, getDateValue, getDoubleValue, getFuncName, getIntervalDayTimeValue, getIntervalYearMonthValue, getIntValue, getLongValue, getRequiredFiles, getRequiredJars, getStandardDisplayString, getStandardDisplayString, getStringValue, getTimestampValue, getUdfName, initializeAndFoldConstants, negative, obtainDateConverter, obtainDoubleConverter, obtainIntConverter, obtainLongConverter, obtainStringConverter, obtainTimestampConverterpublic ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException
GenericUDFinitialize in class GenericUDFarguments - The ObjectInspector for the argumentsUDFArgumentException - Thrown when arguments have wrong types, wrong length, etc.protected void initializeInput(ObjectInspector[] arguments) throws UDFArgumentException
UDFArgumentExceptionprotected String getName()
public Object evaluate(GenericUDF.DeferredObject[] arguments) throws HiveException
GenericUDFevaluate in class GenericUDFarguments - The arguments as DeferedObject, use DeferedObject.get() to get the
actual argument Object. The Objects can be inspected by the
ObjectInspectors passed in the initialize call.HiveExceptionprotected static void setValueFromTs(org.apache.hadoop.io.LongWritable value,
Timestamp timestamp)
public String getDisplayString(String[] children)
GenericUDFgetDisplayString in class GenericUDFCopyright © 2019 The Apache Software Foundation. All Rights Reserved.