public class UDFYear extends UDF
| Constructor and Description |
|---|
UDFYear() |
| Modifier and Type | Method and Description |
|---|---|
IntWritable |
evaluate(DateWritable d) |
IntWritable |
evaluate(Text dateString)
Get the year from a date string.
|
IntWritable |
evaluate(TimestampWritable t) |
getRequiredFiles, getRequiredJars, getResolver, setResolverpublic IntWritable evaluate(Text dateString)
dateString - the dateString in the format of "yyyy-MM-dd HH:mm:ss" or
"yyyy-MM-dd".public IntWritable evaluate(DateWritable d)
public IntWritable evaluate(TimestampWritable t)
Copyright © 2012 The Apache Software Foundation