Member since
01-16-2019
20
Posts
0
Kudos Received
0
Solutions
02-10-2020
07:14 AM
Thanks Matt. Where the flow file will be created to give to fetch processor. In my scenario , avro files will be created in subdirectories. I saw listhdfs supports hdfs.But i am not able to connect the listhdfs processor to fetch processor
... View more
02-08-2020
10:55 PM
I have a hdfs directory where files will be created periodically. I need to get notified when there is a file created in its subdirectory so that I can start reading the file from that hdfs location and send the contents to kafka topic. I found this can be done using HDFS iNotify. But there are few disadvantages like instead of a hdfsdirectory, it notifies when the file is created anywhere in the hdfs. It captures all events happening in the hdfs. public class HdfsINotifyExample {
public static void main(String[] args) throws IOException, InterruptedException, MissingEventsException {
long lastReadTxid = 0;
if (args.length > 1) {
lastReadTxid = Long.parseLong(args[1]);
}
System.out.println("lastReadTxid = " + lastReadTxid);
HdfsAdmin admin = new HdfsAdmin(URI.create(args[0]), new Configuration());
DFSInotifyEventInputStream eventStream = admin.getInotifyEventStream(lastReadTxid);
while (true) {
EventBatch batch = eventStream.take();
System.out.println("TxId = " + batch.getTxid());
for (Event event : batch.getEvents()) {
System.out.println("event type = " + event.getEventType());
switch (event.getEventType()) {
case CREATE:
CreateEvent createEvent = (CreateEvent) event;
System.out.println(" path = " + createEvent.getPath());
System.out.println(" owner = " + createEvent.getOwnerName());
System.out.println(" ctime = " + createEvent.getCtime());
break;
default:
break;
}
}
}
}
} Instead of monitoring all events type , is there any better way to look only for create file event in a particular hdfs directory. Any shell script or through any other mechanisms?
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache Kafka
-
Apache NiFi
09-27-2019
02:51 AM
I am also facing the same issue .Can someone please help
... View more
09-26-2019
12:03 AM
I also faced the same issue.Found the issue was with mysql-connector-java.jar. I followed the below steps 1. Check whether you are able to connect remotely to mysql database. 2.If you are able to connect , then , its mysql-connector-java.jar in ambari 3. Download the correct version of mysql jar from https://dev.mysql.com/downloads/connector/j/ 4. Stop ambari server . 5.Remove the mysql connector jar from ambari 6. Set up again using ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/ mysql-connector-java-8.0.16
... View more
09-12-2019
03:22 AM
I didnt use FQDN, instead i just added ip in /etc/hosts file. i used the same host ip in the kafka config
... View more
09-12-2019
02:41 AM
How can i delete the entire messages from the storm reprocessing it again and again
... View more
09-12-2019
02:40 AM
Hi Now i am able to read the messages from the Kafka topic but in the storm i am getting the below error. How can i delete the messages that storm trying to process. Caused by: org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
2019-09-12 12:38:10.786 o.a.s.d.executor Thread-6-errorMessageWriter-executor[3 3] [ERROR]
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
at org.apache.kafka.clients.producer.KafkaProducer$FutureFailure.<init>(KafkaProducer.java:730) ~[stormjar.jar:?]
at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:483) ~[stormjar.jar:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:430) ~[stormjar.jar:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:353) ~[stormjar.jar:?]
at org.apache.metron.writer.kafka.KafkaWriter.write(KafkaWriter.java:257) ~[stormjar.jar:?]
at org.apache.metron.writer.BulkWriterComponent.flush(BulkWriterComponent.java:123) [stormjar.jar:?]
at org.apache.metron.writer.BulkWriterComponent.applyShouldFlush(BulkWriterComponent.java:179) [stormjar.jar:?]
at org.apache.metron.writer.BulkWriterComponent.write(BulkWriterComponent.java:99) [stormjar.jar:?]
at org.apache.metron.parsers.bolt.WriterHandler.write(WriterHandler.java:90) [stormjar.jar:?]
at org.apache.metron.parsers.bolt.WriterBolt.execute(WriterBolt.java:90) [stormjar.jar:?]
... View more
09-05-2019
01:16 AM
yes i gave . still it is not working . For three node set up using HDP in ambari , what should i configure as listeners and bootstrap server
... View more
09-03-2019
03:30 AM
I am running Metron using Ambari in single node and also set up three node. Few months back , we are able to send messages to Kafka topic and see in Metron dashboard. But now , I am getting the following error message "Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)". For three node also getting the same warning and not able to see any messages. Installed kafka broker in all three nodes. What are all the properties needs to be configured in Kafka server.properties. listeners=PLAINTEXT://node1:6667
... View more
Labels: