Support Questions
Find answers, ask questions, and share your expertise

how to write user define aggregate function for hdf streaming analytics manager?

I am having 4 Nodes HDP cluster with 3 nodes HDF cluster. I am having streaming analytics manager (SAM) installed. I want to create UDAF (User Defined Aggregate Function), I am confused how to write UDAF code? Which programming language should I use for creating jar file for UDAF. I am familiar with Python, Scala, R. Please suggest some links to refer.


Super Collaborator

I think you need to write it in Java, see this article:

I am not very familiar with Scala, but you should be able to create an object in Scala that can be imported in Java. Here is some example code

Also you can write a wrapper in Java that executes Python code:

Or you use Jython:

Thank you @Harald Berghoff I will surely check that.