0

Example output from pig script:

(1, 10)
(2, 100)
(3,44)
(4,99)

I eventually want to create a histogram in my java UDF. How can I input all of this at once in my UDF?

mr2ert
  • 5,146
  • 1
  • 21
  • 32
mrlarssen
  • 325
  • 8
  • 19

1 Answers1

2

Multiple tuples as input to a UDF only work if you put the tuples in a bag and then use that as input. Easiest way is to do a group and then use the resulting bags as input for the UDF.

LiMuBei
  • 2,868
  • 22
  • 27