Search code examples
hadoophiveapache-pighadoop2

How To Take average of Two EPOCH Fields in Hadoop?


How to Take Average to two EPOCH time fields in Hadoop ?

Values are in the following format (1235000501, 1235000081)


Solution

  • You would like to have this:

    MIN(ts1, ts2) + ABS(ROUND((ts1-ts2)/2))
    

    ?