Member since
05-31-2018
15
Posts
0
Kudos Received
0
Solutions
10-03-2018
11:37 PM
@Shu Thank you for the response. It is working fine without any errors. However, when I go to the dynamodb table, the entire JSON object from the FlowFile lands under the property set in JSON Document Attribute (in this case, activity) for the PutDynamoDB processor. Attached is a screenshot of the table in dynamodb (3.jpg) 3.jpg Sample JSON Input: { "messageid": "1", "application": "value 1", "datetime": "value 2", "dev": "value 3", "activity": "value 4" } Sample Output in DynamoDB table under a single field called 'activity': { "application" : { "S" : "value 1" }, "datetime" : { "S" : "value 2" }, "dev" : { "S" : "value 3" }, "activity" : { "S" : "value 4" }, "messageid" : { "S" : "1" } } I want the JSON contents of the FlowFile to land in DynamoDB as a record with a messageid and 4 fields with their respective values. I don't know if this is a bug or if I am using it incorrectly. Is there any workaround? Thanks in advance!
... View more
10-03-2018
11:37 PM
@Shu Thank you for the response. It is working fine without any errors. However, when I go to the dynamodb table, the entire JSON object from the FlowFile lands under the property set in JSON Document Attribute (in this case, activity) for the PutDynamoDB processor. Attached is a screenshot of the table in dynamodb (3.jpg) 3.jpg Sample JSON Input: { "messageid": "1", "application": "value 1", "datetime": "value 2", "dev": "value 3", "activity": "value 4" } Sample Output in DynamoDB table under a single field called 'activity': { "application" : { "S" : "value 1" }, "datetime" : { "S" : "value 2" }, "dev" : { "S" : "value 3" }, "activity" : { "S" : "value 4" }, "messageid" : { "S" : "1" } } I want the JSON contents of the FlowFile to land in DynamoDB as a record with a messageid and 4 fields with their respective values. I don't know if this is a bug or if I am using it incorrectly. Is there any workaround? Thanks in advance!
... View more
10-03-2018
11:36 PM
@Shu Thank you for the response. It is working fine without any errors. However, when I go to the dynamodb table, the entire JSON object from the FlowFile lands under the property set in JSON
Document Attribute (in this case, activity).
JSON Input: {
"messageid": "1", "application": "value 1", "datetime": "value 2", "dev": "value 3", "activity": "value 4"
} For example, I have the below in a field called activity in dynamodb table. Attached is a screenshot of the table in dynamodb (3.jpg)
Output in DynamoDB table under a field called 'activity': { "application" : { "S" : "value 1"
},
"datetime" : { "S" : "value 2"
}, "dev" : { "S" : "value 3"
},
"activity" : { "S" : "value 4" }, "messageid" : { "S" : "1"
}
}
I want the JSON contents of the FlowFile to land in DynamoDB as a record with a messageid and 4 fields with their respective values.
I don't know if this is a bug or if I am using it incorrectly. Is there any workaround?
Thanks! 3.jpg
... View more
10-02-2018
09:12 PM
Hi, I am new to using nifi. I am trying to use GetFile processor
that points to a JSON file to land in the dynamodb table using a PutDynamoDb
processor. Here is the sample structure of the input json file: { "messageid": "1", "field 1": "value 1", "field 2": "value 2", "field 3": "value 3", "field 4": "value 4" } However, I am getting an error related to hash key values in
the putdynamodb processor. Attached are the screenshots of the error message (1.jpeg) and the configuration settings (2.jpg) for the putdynamodb processor. I am not sure if I am doing something wrong in the property
settings. Also, I am not sure what values the JSON Document Attribute property expects? I read the documentation but it is unclear. Any help will be appreciated on the issues 1.jpg 2.jpg Thanks, Jason
... View more
Labels:
- Labels:
-
Apache NiFi
06-08-2018
06:07 PM
@Wynner Thanks for the suggestion, I have not tried this yet but will have to check with the server administrator to see if this is something they don't mind trying. Jason
... View more
06-08-2018
06:06 PM
@Vinicius Higa Murakami - Thanks for the suggestion. I looked at the post you sent and tried to access some of the steps but it seems that I don't have the zk.cli.sh file that was suggested. I am running zookeeper as part of a Kafka download and it does not have this file. We have a current project that is utilizing Kafka and I decided to try connecting from there as well but no luck either. Jason
... View more
06-07-2018
02:27 AM
@Vinicius Higa Murakami -- I just tried the command again with the zookeeper parameter and got the following: GROUP
TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG OWNER Could not fetch offset from kafka for group
console-consumer-96628 partition [test,0] due to org.apache.kafka.common.errors.NotCoordinatorForGroupException:
This is not the correct coordinator for this group.. console-consumer-96628 test 0 unknown 56 unknown none Any thoughts you have on this output would be greatly appreciated. Thanks again for your help! Jason
... View more
06-06-2018
10:04 PM
@Vinicius Higa Murakami -- So I tried the first command and it returned console-consumer-96628. I then tried to use that name in the second command like this but think I got something wrong because it doesn't accept it: bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group console-consumer-96628. I was also talking to a co-worker who uses Kafka more and we were wondering if I have to create a consumer group and then assign my topic to that group. Then on the Nifi end I would have to supply that proper Group Id in the processor? So far I usually just put some value like 0 in for the Group Id on the processor and hoped it would connect directly without actually needing the group. Thanks for your help! Jason
... View more
06-06-2018
06:48 PM
@Vinicius Higa Murakami -- Regarding your questions, I have posted my responses below: What about the port from zookeeper? (2181 by default). - Do you mean by using port 2181 instead of port 9092 in the Consume Kafka Processor? If so, I have open port 2181 and have changed the Kafka broker to ec2-XX-X-XXX-XXX.XX-XXXX-1.compute.amazonaws.com:2181 but still nothing came over. And could you check if there's any extra consumer group (probably used by Nifi Processor) - By extra consumer group do you mean another processor that is also trying to consume the same topic on that same port? If so, I can confirm that I have only one processor trying to access Kafka in this NiFi model. I had the same set up in NiFi 1.5 but that processor has been stopped and that instance of NiFi is not running. Kafka logs are showing something? - I have checked the Controller logs and the server logs and I only see the following: From the Controller Logs
2018-06-06 17:55:15,642] TRACE [Controller 0]: checking need to trigger partition rebalance (kafka.controller.KafkaController)
[2018-06-06 17:55:15,642] DEBUG [Controller 0]: preferred replicas by broker Map(0 -> Map([test,0] -> List(0))) (kafka.controller.KafkaController)
[2018-06-06 17:55:15,642] DEBUG [Controller 0]: topics not in preferred replica Map() (kafka.controller.KafkaController)
[2018-06-06 17:55:15,643] TRACE [Controller 0]: leader imbalance ratio for broker 0 is 0.000000 (kafka.controller.KafkaController) I do not see any errors or warnings. Kafka is running on a Free Tier Linux within in Amazon Ec2 so I know there are restrictions of size and memory usages but since I was able to configure Kafka to use less memory it works fine within that local environment. I don't think that is the issue here but just thought to mention it. Jason
... View more
06-06-2018
03:16 PM
@Wynner - Nifi 1.6 is running on Windows Server 2016 hosted on Amazon Ec2
... View more
06-05-2018
09:51 PM
Hi, I feel like this question has been asked before in similar ways but each response has yet to yield a result that has yet to work for me. So, I have an Amazon Linux machine with Apache Kafka 0.10.0 on it and when I start zookeeper and kafka I am able to successfully produce and consume messages on that machine. On a separate Amazon Windows server I have Apache Nifi 1.6 installed and I am using the Consume Kafka 0_10 processor to try and receive messages from the topic that was created on my standalone kafka install (Linux machine). I have tried to use the ip address of the Linux machine as the broker within the NiFi processor with port 9092 as well as the Ec2 instance name ec2-XX-X-XXX-XXX.XX-XXXX-1.compute.amazonaws.com:9092 but neither show any data coming in when I manually type in messages from the Kafka producer on the Linux machine. There are no errors produced in the logs of NiFi and I I know that port 9092 is open so I would think the messages would come through. In the server.properties file for Kafka I have the listeners set to listeners=PLAINTEXT://:9092 (bases on some stack overflow post recommendation). In that same file I also have advertised.listeners=PLAINTEXT://XX-X-XXX-XXX.XX-XXXX-1.compute.amazonaws.com:9092. I have also tried NiFi 1.5 and to see if this was a version issue but nothing seems to work. I would think that if Nifi is not producing errors, the proper ports are open and I can produce and consume locally to Linux machine then I would think there should be no reason the Consume Kafka 0_10 couldn't pick up the messages I type and parse them into a flow file. Sorry for the long question but if anyone has some insight on this issue please let me know. Thanks, Jason
... View more
Labels:
- Labels:
-
Apache NiFi
05-31-2018
09:10 PM
@Matt Clarke - I am thinking I should ask this on another post but was curious what the proper kafka tool was for retrieving messages from a kafka topic, Consume or Get? Get looks like it's for older versions and I have been trying to use Consume_010 on Nifi 1.6. Maybe a compatibility issue between 1.6 and my kafka installation? Thanks, Jason
... View more
05-31-2018
07:55 PM
@Matt Clarke -- Thanks for the forum tip as well as the previous suggestions. I was able to get the ListenTCP working properly. Jason
... View more
05-31-2018
06:15 PM
Hey Matt, Thanks for the response. Yes, I am trying to receive data on a TCP port in Nifi. I have now switched the processor to Listen TCP and specified the port number that I want to listen on. I left the LAN option blank and I am now getting some new errors listed below: 2018-05-31 18:05:58,393 ERROR [Monitor Processore Lifecycle Thread-1] o.a.nifi.processors.standard.ListenTCP ListenTCP[id=b74d9e21-0163-1000-391b-4e77cd11cf16] Failed to properly initialize Processor. If still scheduled to run, NiFi will attempt to initialize and run the Processor again after the 'Administrative Yield Duration' has elapsed. Failure is due to java.lang.reflect.InvocationTargetException: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException: null Caused by: java.net.BindException: Address already in use: bind We have tested that the port is listening using netstat commands and it shows that only one listener is coming up so I am not sure what else could be binding the address? Is there a setting somewhere to get around this because if the data is pushing from a remote server to NiFi on this port wouldn't it essentially be connecting to that port? Thanks, Jason
... View more
05-31-2018
05:16 PM
@Pierre Villard Simple question but somewhat related to this post. I have a TCP port open on my server and able to listen on that port using a separate listener tool. I can ping that port with a message from a separate machine and see the message come through on that port so I know the port is open and receiving messages. Now, in Nifi I have a simple GetTCP processor set for that same port on the server but for some reason I am unable get any data to come through and get the following errors: 018-05-31 16:50:33,255 ERROR [pool-26-thread-2] o.a.n.processors.gettcp.ReceivingClient Exceeded wait time to connect. Possible deadlock, please report!. Interrupting. 2018-05-31 16:50:35,278 ERROR [pool-26-thread-2] o.a.n.processors.gettcp.ReceivingClient Failed to connect to secondary endpoint.
I am bit confused at this point, should I be able to accept data coming in from a separate machine over TCP inside of NiFi? Ultimately I need to do this with Consume Kafka but had no luck so decided to just test TCP. Thanks, Jason
... View more
Labels:
- Labels:
-
Apache NiFi