Skip to content

Instantly share code, notes, and snippets.

View toyama0919's full-sized avatar

Toyama Hiroshi toyama0919

View GitHub Profile
@s-wool
s-wool / gist:960e565b8e778be82953
Created September 16, 2014 16:24
第6回elasticsearch勉強会

Aggregationあれこれ

Elasticsearch Inc. Jun Ohtaniさん @johtani この間のefk本の勉強会発表からaggs関連詳しくしたような感じかな

  • Aggregation機能はver 1.0から
@repeatedly
repeatedly / about_td_agent2.md
Last active November 16, 2016 02:11
td-agent2について

rpmで問題が起きたのでまとめておく.あと英語で書くと日本の人が読んでくれないのでまず日本語で…

なぜパッケージを分けているのか

非互換のある変更が単なるアップデートで入るのを防ぐため

現在のtd-agentは1.1.19だが,2.0.0と1.2.0があった場合,yum updateでは2.0.0が入ってしまう.これでは,Rubyのバージョンが変わった場合などはgemの再インストールが必要で,単なるアップデートでは起動出来なくなるという問題がある(chefとか使っていれば多分防ぐことは出来るが強制することは出来ない).

Rubyのバージョンアップと依存ライブラリのバージョンアップを分けることが出来ない

@ericeijkelenboom
ericeijkelenboom / emr_bootstrap_java_8.sh
Created April 3, 2014 09:39
Bootstrap script for installing Java 8 on an Amazon Elastic MapReduce instance (AMI 3.0.1)
# Check java version
JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
if [ "$JAVA_VER" -lt 18 ]
then
# Download jdk 8
echo "Downloading and installing jdk 8"
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm"
# Silent install
@ToulBoy
ToulBoy / "parent child" data
Created February 29, 2012 15:12
Elasticsearch 0.18.6 : My example of "parent child"
curl -s -XPOST localhost:9200/_bulk?pretty=true --data-binary '
{ "index" : { "_index" : "parent_child", "_type" : "store", "_id" : "store1" } }
{ "name" : "auchan", "owner" : "chris" }
{ "index" : { "_index" : "parent_child", "_type" : "department", "_id" : "department1", "parent" : "store1" } }
{ "name" : "toys", "numberOfProducts" : 150 }
{ "index" : { "_index" : "parent_child", "_type" : "product", "_id" : "product1", "parent" : "department1", "routing" : "store1" } }
{ "name" : "gun", "trademark" : "tiger", "price" : 9, "store_id" : "store1" }
'