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 🙂
The more traditional approach in this situation is to use NiFi to read the incoming data and then add a NiFi processor to dump the data from the NiFi queue to either Storm or in your case SparkStreaming. Now you can build a Spark ML model test it and run it in Spark. You can push logic into NiFi but an ML model inside NiFi is overkill.
Hi @Kirk Haslbeck i have tried some of the demo packages you mentioned below but keep having issues with connecting to nifi servlet etc, are the demos compatible with 2.5? And i also get the following error.
"An internal system exception occurred: Could not find service for component, componentName=NIFI_MASTER, clusterName=Sandbox, stackInfo=HDP-2.5"
Am i missing something? thanks
As suggested by Ravi, have a look at :
It will show you how to connect NiFi and Spark if you want to use this kind of architecture to perform machine learning.
Regarding your second question, GetTwitter does not accept ingoing connection. What are you trying to achieve?
@Pierre Villard I want to send Twitter username from smartphone to HDP. When ListenHTTP get the data, it will send to GetTwitter to get some tweet according username. After that, i will use spark to calculate Machine Learning Algorithm to predict user personality.
As I said, GetTwitter does not accept incoming relationship. You won't be able to connect ListenHTTP to GetTwitter. Your best option is to "build" your own flow to request Twitter data (example: https://pierrevillard.com/2016/04/12/oauth-1-0a-with-apache-nifi-twitter-api-example/), or to write your own processor using the existing one as an example.