First, i want to make a project with Apache Nifi, but there is some problem that i face it now.
1. Can i make Machine Learning Calculation in Apache Nifi ?
I know that i must use Mahout and Spark, but i dont find Mahout and Spark Processor in Apache Nifi. What should i do ?
Can you suggest me another idea.
2. I want to make web service with Apache Nifi ?
First time, i use ListenHTTP Processor, but the text that i send become Flow File. How can i convert it to text so i can put it in GetTwitter Processor ?
Thanks for reply 🙂
What are you trying to build is what we call Connected Data Platform at Hortonworks. You need to understand that you have two types of workloads/requirements and you need to use HDF and HDP jointly.
So you will have to use HDP to construct the model, HDF to get and transform the data, and finally a combination of HDF/HDP to apply the model and make the prediction.
To build a web service with NiFi you need to use several processors: one to listen to incoming requests, one or several processors to implement your logic (transformation, extraction, etc), one to publish the result. You can check this page that contains several data flow examples. The "Hello_NiFi_Web_Service.xml" gives an example on how to do it.
I have tried building a web service with NiFi and am able to get the incoming requests and pass it to Spark/Storm. Assuming that I compute the prediction inside Spark, I wish to know how to send back the score/result as response to NiFi.
If that is currently not possible, what are the chances of creating a custom processor in R to predict the scores and pass it on as response?
Or call Machine learning from NiFi or write Machine Learning or Deep Learning components in nifi