Hiroaki TACHIKAWA
stand****@gmail*****
2016年 6月 3日 (金) 21:12:01 JST
立川と申します。 サジェスト用DBを作成しgroonga-httpdで利用できるようにしています。 冗長化させるために fluent-plugin-groonga でレプリケーションを 試みました。 loadするために2つのリクエストをfluentdのポートに対して発行するの ですが、リクエスト1については正常に処理されていないようです。 ●リクエスト1 # curl -XPOST -w '\n' "http://localhost:10000/d/load?table=event_keyword&each='suggest_preparer(_id, type, item, sequence, time, pair_query)'" --data '[{"sequence":1, "time":1464940188, "item":"abc", "type":"submit"}]' curl: (52) Empty reply from server ●リクエスト2 # curl -XPOST -w '\n' "http://localhost:10000/d/load?table=item_keyword" --data '[{"_key":"abc", "kana":["エービーシー"], "boost":10}]' [[0,1464954639.20679,0.000457048416137695],1] リクエスト1を正常に処理させるにはどのようにすればよいでしょうか。 ちなみにfluentdではなくgroonga-httpdに直接リクエストすると正常に 処理されます。 # curl -XPOST -w '\n' "http://localhost:10041/d/load?table=event_keyword&each='suggest_preparer(_id, type, item, sequence, time, pair_query)'" --data '[{"sequence":1, "time":1464940188, "item":"abc", "type":"submit"}]' [[0,1464955379.51319,0.000829458236694336],1] ご参考としてfluentdの設定ファイルは下記となります。 よろしくお願いいたします。 # cat fluent.conf <source> @type groonga protocol http port 10000 real_host localhost real_port 10041 </source> <match groonga.command.*> @type copy <store> @type groonga protocol http host localhost port 10042 buffer_type memory buffer_chunk_limit 8m buffer_queue_limit 256 flush_interval 5s retry_limit 2 </store> </match> -- Hiroaki TACHIKAWA stand****@gmail*****