1

I didn't use the grid script to start up the hello-samza project http://samza.apache.org/startup/hello-samza/0.11/ I follow the steps in grid script

  1. Download the hadoop, kafka & zookeeper
  2. Config the zookeeper, hadoop, kafka as it does in grid script
  3. Start up zookeeper, yarn, kafka , in this step I can visit the yarn page through 8088 port in browser
  4. And then I run the script bin/run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file://$PWD/deploy/samza/config/wikipedia-feed.properties

I get NullPointException in Step 4.

2016-12-07 12:28:20.724 [main] CoordinatorStreamSystemConsumer [INFO] Bootstrapping configuration from coordinator stream.
Exception in thread "main" org.apache.samza.SamzaException: org.apache.samza.SamzaException: java.lang.NullPointerException
    at org.apache.samza.coordinator.stream.CoordinatorStreamSystemConsumer.bootstrap(CoordinatorStreamSystemConsumer.java:182)
    at org.apache.samza.job.JobRunner.run(JobRunner.scala:112)
    at org.apache.samza.job.JobRunner$.main(JobRunner.scala:65)
    at org.apache.samza.job.JobRunner.main(JobRunner.scala)
Caused by: org.apache.samza.SamzaException: java.lang.NullPointerException
    at org.apache.samza.serializers.JsonSerde.fromBytes(JsonSerde.scala:44)
    at org.apache.samza.coordinator.stream.CoordinatorStreamSystemConsumer.bootstrap(CoordinatorStreamSystemConsumer.java:155)
    ... 3 more
Caused by: java.lang.NullPointerException
    at java.lang.String.<init>(String.java:491)
    at org.apache.samza.serializers.JsonSerde.fromBytes(JsonSerde.scala:42)
    ... 4 more

I think it's relate the job fail to read the feed from kafka. How can I troubleshooting this , how to know which step is wrong.

bstsnail
  • 26
  • 2

1 Answers1

0

It looks like you're trying to consume messages from the coordinator stream in Kafka using the JsonSerde, but whatever is in Kafka doesn't appear to be correctly formatted to JSON.

You may want to consume the topic using the tools that come with Kafka, then figure out how to fix the formatting of those messages. Without more information, this is tough to troubleshoot.

Jon Bringhurst
  • 1,340
  • 1
  • 10
  • 21