brickhouse.udf.collect
Class MultiDayCounterUDAF
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver
brickhouse.udf.collect.MultiDayCounterUDAF
- All Implemented Interfaces:
- org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver, org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver2
public class MultiDayCounterUDAF
- extends org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver
Count and count uniques for several day periods
( i.e produce 1, 7 and 30 counts for various events)
Input is a YYYYMMDD representation of the date counts are being generated,
a date representation of the date associated with the events,
a bigint of the event count for that day period,
an array of uniques for that count (or a sketch set for those uniques),
and an array of ints representing the dates being counted over ( ie. [1,7,30] ).
Output is a array of structs containing the num of days counted, the sum of events
over that date
|
Method Summary |
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator |
getEvaluator(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo[] parameters)
Parameters are event date, event count, event uniques, asof date, period array , |
| Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver |
getEvaluator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiDayCounterUDAF
public MultiDayCounterUDAF()
getEvaluator
public org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator getEvaluator(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo[] parameters)
throws org.apache.hadoop.hive.ql.parse.SemanticException
- Parameters are event date, event count, event uniques, asof date, period array ,
- Specified by:
getEvaluator in interface org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver- Overrides:
getEvaluator in class org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
Copyright © 2013. All rights reserved.