This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.core.JsonFactory; | |
import com.fasterxml.jackson.core.JsonGenerator; | |
import org.simpleflatmapper.csv.CsvParser; | |
import org.simpleflatmapper.csv.CsvReader; | |
import java.io.IOException; | |
import java.util.Iterator; | |
// uses http://simpleflatmapper.org/0101-getting-started-csv.html for csv parser | |
// and jackson-core for JsonGenerator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
file { | |
path => "/var/log/xferlog" | |
type => "xferlog" | |
add_field => { "program" => "proftpd" } | |
} | |
} | |
filter { | |
if [type] == "xferlog" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete all data | |
curl -XDELETE localhost:9200/test | |
# create an index and define specific french stop_words | |
curl -XPUT localhost:9200/test -d '{ | |
"settings" : { | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"french" : { |