我没有使用网格脚本来启动 hello-samza 项目http://samza.apache.org/startup/hello-samza/0.11/ 我按照网格脚本中的步骤进行操作
- 下载 hadoop、kafka 和 zookeeper
- 像在网格脚本中一样配置 zookeeper、hadoop、kafka
- 启动zookeeper、yarn、kafka,这一步我可以在浏览器中通过8088端口访问yarn页面
- 然后我运行脚本 bin/run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file://$PWD/deploy/samza/config/wikipedia -feed.properties
我在第 4 步得到 NullPointException。
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
我认为这与工作未能从 kafka 读取提要有关。我该如何解决这个问题,如何知道哪一步是错误的。