zoukankan      html  css  js  c++  java
  • flume未解之谜

    a1.sources = r1
    a1.sinks = k1
    a1.channels = c1

    a1.sources.r1.type = exec
    a1.sources.r1.command = tail -f /sinkslog/1.txt


    a1.sinks.k1.type=hdfs
    a1.sinks.k1.hdfs.path=hdfs://flume/log/%Y-%m-%j/%H:%M:%S
    a1.sinks.k1.hdfs.filePrefix=FlumeDataPrefix-
    a1.sinks.k1.hfds.batchSize=20
    a1.sinks.k1.hdfs.round=true
    a1.sinks.k1.hdfs.roundValue=10
    a1.sinks.k1.hdfs.roundUnit=minute


    a1.channels.c1.type=memory
    a1.channels.c1.capacity=1000
    a1.channels.c1.transactionCapacity=100

    a1.sources.r1.channels=c1
    a1.sinks.k1.channel=c1

    此配置下报错:

    java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
    at org.apache.flume.formatter.output.BucketPath.replaceShorthand(BucketPath.java:228)
    at org.apache.flume.formatter.output.BucketPath.escapeString(BucketPath.java:432)
    at org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:380)
    at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
    at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
    at java.lang.Thread.run(Thread.java:745)
    18/08/09 17:01:55 ERROR flume.SinkRunner: Unable to deliver event. Exception follows.
    org.apache.flume.EventDeliveryException: java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
    at org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:463)
    at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
    at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
    at org.apache.flume.formatter.output.BucketPath.replaceShorthand(BucketPath.java:228)
    at org.apache.flume.formatter.output.BucketPath.escapeString(BucketPath.java:432)
    at org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:380)
    ... 3 more

  • 相关阅读:
    1. C/C++项目一
    3. C/C++笔试面试经典题目三
    1. C/C++笔试面试经典题目一
    Win7下C/C++跨平台开发工具IDE的安装之Eclipse-CDT
    Win7下C/C++跨平台开发工具IDE的安装之CodeBlocks
    css
    form表单,选择器
    html介绍
    元类
    事务、视图、触发器、存储过程、函数、数据库的备份
  • 原文地址:https://www.cnblogs.com/huiandong/p/9450158.html
Copyright © 2011-2022 走看看