- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to load data from cassandra into NIFI
- Labels:
-
Apache NiFi
Created on ‎05-18-2017 10:41 PM - edited ‎08-18-2019 02:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to use the querycassandra processor, but i'm facing some troubles. I'm trying to do some very basic actions which is selecting all rows from a table and then send them to another ExcecuteStream processor(java program).
Here is the table :
Here is the processor configuration. I've also added the port 9042 to the HDP sandbox both from the port forwarding table and the start_sandbox script:
username/password: cassandra
a global schema showing the error:
all host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException:[/127.0.0.1] Cannot connect)
Created ‎05-19-2017 05:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So Cassandra is running on same node as Nifi? Is that right?
Created ‎05-19-2017 05:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cassandra is running on my linux host, and nifi is installed as a service in my HDP sandbox.
Created ‎05-21-2017 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For nifi "127.0.0.1" is its own host. Not your linux host. How do you connect to linux host from your sandbox? For example if you want to scp a file from your sandbox to your linux host, what ip address/host name wil you use? Use that instead of 127.0.0.1 from Nifi to connect to Cassandra.
Created on ‎05-21-2017 11:48 AM - edited ‎08-18-2019 02:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
here are my interface configuration both from my linux host, and my hortonworks sandbox where nifi belongs:
Thanks again !
Created ‎05-19-2017 09:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing that the ports are closed. If you are using the HDP Sandbox, the Sandbox is now Dockerized within the VM. You may want to add the Cassandra ports that you are using do both the VirtualBox Port Forwarding Section, and, you'll also have to edit some of the Docker scripts. Fortunately, there is a very good step by step tutorial here: https://community.hortonworks.com/articles/65914/how-to-add-ports-to-the-hdp-25-virtualbox-sandbox.h...
As always, if you find this post useful, don't forget to "accept" the answer.
Created ‎05-20-2017 01:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Sonu Sahi for your reply, but i've already done this and the error persist 😕
