Created 02-13-2018 04:37 AM
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.
Created 05-23-2018 10:31 AM
I think you need to write it in Java, see this article: https://community.hortonworks.com/articles/145803/extending-sam-with-custom-processors-user-defined....
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 https://lampwww.epfl.ch/~michelou/scala/using-scala-from-java.html
Also you can write a wrapper in Java that executes Python code: https://pythonhosted.org/javabridge/java2python.html
http://jpy.readthedocs.io/en/latest/intro.html
Or you use Jython: http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html
Created 07-17-2018 08:01 AM
Thank you @Harald Berghoff I will surely check that.
Created 07-22-2019 01:41 PM
You can create a jar and deploy as User defined function.... https://github.com/hortonworks/streamline/blob/master/streams/sdk/src/main/java/com/hortonworks/stre...