FlumeデータをHDFSに正しく保存することができますが、HBaseに格納されている運がない...プラットフォームはCloudera 5.10.1です。Flumeはhbaseにデータを保存しません
マイ水路confには、次のとおりです。
hbase(main):005:0> create 'application_data', 'json'
0 row(s) in 1.2250 seconds
しかし、常にこのテーブルに戻り上のスキャンコマンド
hbase(main):021:0> scan 'application_data'
ROW COLUMN+CELL
0 row(s) in 0.0100 seconds
:私は、次のようにHBaseのテーブルを作成している
tier1.sources = source1
tier1.channels = channel1
#tier1.sinks = hdfs1
tier1.sinks = hbase1
tier1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource
tier1.sources.source1.zookeeperConnect = master3d.localdomain:2181
tier1.sources.source1.topics.regex = application.data.*
tier1.sources.source1.channels = channel1
tier1.sources.source1.interceptors = i1
tier1.sources.source1.interceptors.i1.type = timestamp
tier1.sources.source1.kafka.consumer.timeout.ms = 100
tier1.sources.source1.kafka.consumer.group.id = flume
tier1.channels.channel1.type = memory
tier1.channels.channel1.capacity = 10000
tier1.channels.channel1.transactionCapacity = 1000
tier1.sinks.hbase1.type = hbase
tier1.sinks.hbase1.table = application_data
tier1.sinks.hbase1.columnFamily = json
tier1.sinks.hbase1.serializer = org.apache.flume.sink.hbase.SimpleHbaseEventSerializer
tier1.sinks.hbase1.channel = channel1
#tier1.sinks.hdfs1.type = hdfs
#tier1.sinks.hdfs1.hdfs.path = /tmp/kafka/%{topic}/%y-%m-%d
#tier1.sinks.hdfs1.hdfs.rollInterval = 5
#tier1.sinks.hdfs1.hdfs.rollSize = 0
#tier1.sinks.hdfs1.hdfs.rollCount = 0
#tier1.sinks.hdfs1.hdfs.fileType = DataStream
#tier1.sinks.hdfs1.channel = channel1
FlumeとHbase MasterをDEBUGに入れましたが、エラーも警告も表示されません。私はFlumeユーザーがHbaseで接続を取得し、テーブルの存在を確認することができます。 HBaseにはKerberos認証がありません。 Kafkaのトピックにはデータがあります。なぜなら私はコンソールコンシューマとhdfsシンクで二重チェックしたからです。
誰かがここでエラーを見ることができるか、正しい方向に私を指摘することができますか?私はここで何か変なことはしていないと思う。
ありがとうございました!
おそらく、Flumeの代わりにKafka Connectを使用することを検討してください。 http://docs.datamountaineer.com/en/latest/hbase.htmlのようなHBase用のカフカシンクコネクタがいくつかあります。 –
ありがとうハンス!私はそのコネクタを認識していましたが、私のクライアントはClouderaのみのソリューションを好んでいました。ドキュメントによると、上記はうまくいくはずです。 – elkarel
私は同様の設定とHbaseシンクをプロダクションで使用していますが、通常は[HbaseEventSerializer](https://flume.apache.org/releases/content/1.2.0/apidocs/org/apache/flume/sink/hbase)を実装しています/HbaseEventSerializer.html)自分自身。また、私は動物園のホストを指定しますが、オプションのプロパティです。 – gorros