org.apache.hadoop.hive.ql.udf
Class UDFFromUnixTime

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.UDF
      extended by org.apache.hadoop.hive.ql.udf.UDFFromUnixTime

public class UDFFromUnixTime
extends UDF

UDFFromUnixTime.


Constructor Summary
UDFFromUnixTime()
           
 
Method Summary
 org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.IntWritable unixtime)
           
 org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.IntWritable unixtime, org.apache.hadoop.io.Text format)
          Convert UnixTime to a string format.
 org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.LongWritable unixtime)
          Convert UnixTime to a string format.
 org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.LongWritable unixtime, org.apache.hadoop.io.Text format)
          Convert UnixTime to a string format.
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getRequiredFiles, getRequiredJars, getResolver, setResolver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDFFromUnixTime

public UDFFromUnixTime()
Method Detail

evaluate

public org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.IntWritable unixtime)

evaluate

public org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.LongWritable unixtime,
                                          org.apache.hadoop.io.Text format)
Convert UnixTime to a string format.

Parameters:
unixtime - The number of seconds from 1970-01-01 00:00:00
format - See http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat .html
Returns:
a String in the format specified.

evaluate

public org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.LongWritable unixtime)
Convert UnixTime to a string format.

Parameters:
unixtime - The number of seconds from 1970-01-01 00:00:00
Returns:
a String in default format specified.

evaluate

public org.apache.hadoop.io.Text evaluate(org.apache.hadoop.io.IntWritable unixtime,
                                          org.apache.hadoop.io.Text format)
Convert UnixTime to a string format.

Parameters:
unixtime - The number of seconds from 1970-01-01 00:00:00
format - See http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat .html
Returns:
a String in the format specified.


Copyright © 2014 The Apache Software Foundation. All rights reserved.