|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.EvalFunc<org.joda.time.DateTime>
org.apache.pig.builtin.ToDate
public class ToDate
ToDate converts the ISO or the customized string or the Unix timestamp to the DateTime object.
ToDate is overloaded.
DateTime ToDate(Long millis)
.the milliseconds
.the DateTime object
.DateTime ToDate(String dtStr)
.the ISO format date time string
.the DateTime object
.DateTime ToDate(String dtStr, String format)
.dtStr: the string that represents a date time
.format: the format string
.the DateTime object
.DateTime ToDate(String dtStr, String format, String timezone)
.dtStr: the string that represents a date time
.format: the format string
.timezone: the timezone string
.the DateTime object
.
Field Summary |
---|
Fields inherited from class org.apache.pig.EvalFunc |
---|
log, pigLogger, reporter, returnType |
Constructor Summary | |
---|---|
ToDate()
|
Method Summary | |
---|---|
org.joda.time.DateTime |
exec(Tuple input)
This callback method must be implemented by all subclasses. |
static org.joda.time.DateTimeZone |
extractDateTimeZone(String dtStr)
|
List<FuncSpec> |
getArgToFuncMapping()
Allow a UDF to specify type specific implementations of itself. |
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF. |
Methods inherited from class org.apache.pig.EvalFunc |
---|
finish, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToDate()
Method Detail |
---|
public org.joda.time.DateTime exec(Tuple input) throws IOException
EvalFunc
exec
in class EvalFunc<org.joda.time.DateTime>
input
- the Tuple to be processed.
IOException
public Schema outputSchema(Schema input)
EvalFunc
The default implementation interprets the OutputSchema
annotation,
if one is present. Otherwise, it returns null
(no known output schema).
outputSchema
in class EvalFunc<org.joda.time.DateTime>
input
- Schema of the input
public List<FuncSpec> getArgToFuncMapping() throws FrontendException
EvalFunc
getArgToFuncMapping
in class EvalFunc<org.joda.time.DateTime>
FrontendException
public static org.joda.time.DateTimeZone extractDateTimeZone(String dtStr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |