- 2015.03.03
- bashrc
- export INNERIP=`hostname -i`
export ES_HEAP_SIZE=8g
export ES_CLASSPATH=/etc/hadoop/conf:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop/lib/*:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop/.//*:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop-hdfs/./:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop-hdfs/lib/*:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop-hdfs/.//*:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop-yarn/lib/*:/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hadoop/libexec/../../hadoop-yarn/.//*:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/lib/*:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/.//*
- configuration
- cluster.name: test
- node.name: ${HOSTNAME}
- transport.host: ${INNERIP}
- discovery.zen.ping.multicast.enabled: false
- discovery.zen.ping.unicast.hosts: ["10.0.2.81", "10.0.2.82", "10.0.2.83"]
- indices.fielddata.cache.size: 40%
- bashrc
- 2015.03.02
- snapshot and restore
- repository register
- PUT _snapshot/hdfs
{
"type": "hdfs",
"settings": {
"path": "/backup/elasticsearch"
}
}
- repository verification
- POST _snapshot/hdfs/_verify
- snapshot
- PUT _snapshot/hdfs/20150302
- monitoring snapshot/restore progress
- GET _snapshot/hdfs/20150302/_status
- GET _snapshot/hdfs/20150302
- snapshot information and status
- GET _snapshot/hdfs/20150302
- GET _snapshot/hdfs/_all
- GET _snapshot/_status
- GET _snapshot/hdfs/_status
- GET _snapshot/hdfs/20150302/_status
- restore
- POST _snapshot/hdfs/20150302/_restore
- snapshot deletion / stopping currently running snapshot and restore operations
- DELETE _snapshot/hdfs/20150302
- repository deletion
- DELETE _snapshot/hdfs
- reference
- repository register
- rolling update
- Disable shard reallocation
- curl -XPUT localhost:9200/_cluster/settings -d '{ "transient" : { "cluster.routing.allocation.enable" : "none" } }'
- Shut down a single node within the cluster
- curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
- Confirm that all shards are correctly reallocated to the remaining running nodes
- Download newest version
- Extract the zip or tarball to a new directory
- Copy the configuration files from the old Elasticsearch installation’s config directory to the new Elasticsearch installation’s config directory
- Move data files from the old Elasticsesarch installation’s data directory
- Install plugins
- Start the now upgraded node
- Confirm that it joins the cluster
- Re-enable shard reallocation
- curl -XPUT localhost:9200/_cluster/settings -d '{ "transient" : { "cluster.routing.allocation.enable" : "all" } }'
- Observe that all shards are properly allocated on all nodes
- Repeat this process for all remaining nodes
- Reference
- Disable shard reallocation
- snapshot and restore
- 2015.02.13
- MySQL Slow Query Log Mapping
PUT msql-2015 { "mappings": { "log": { "properties": { "@timestamp": { "type": "date", "format": "dateOptionalTime" }, "@version": { "type": "string" }, "host": { "type": "string", "index": "not_analyzed" }, "ip": { "type": "string", "index": "not_analyzed" }, "lock_time": { "type": "double" }, "message": { "type": "string", "index": "not_analyzed" }, "query": { "type": "string" }, "query_time": { "type": "double" }, "rows_examined": { "type": "double" }, "rows_sent": { "type": "double" }, "type": { "type": "string" }, "user": { "type": "string" } } } } }
- MySQL Slow Query Dump Mapping
PUT msqld-2015 { "mappings": { "dump": { "properties": { "@timestamp": { "type": "date", "format": "dateOptionalTime" }, "@version": { "type": "string" }, "count": { "type": "double" }, "host": { "type": "string", "index": "not_analyzed" }, "ip": { "type": "string", "index": "not_analyzed" }, "lock": { "type": "double" }, "message": { "type": "string", "index": "not_analyzed" }, "query": { "type": "string" }, "rows": { "type": "double" }, "time": { "type": "double" }, "type": { "type": "string" }, "user": { "type": "string" } } } } }
- 2015.02.12
- MySQL Slow Query Log & Dump Mappings
PUT msqld-2015 { "mappings": { "log": { "properties": { "@timestamp": { "type": "date", "format": "dateOptionalTime" }, "@version": { "type": "string" }, "host": { "type": "string", "index": "not_analyzed" }, "ip": { "type": "string", "index": "not_analyzed" }, "lock_time": { "type": "double" }, "message": { "type": "string", "index": "not_analyzed" }, "query": { "type": "string" }, "query_time": { "type": "double" }, "rows_examined": { "type": "double" }, "rows_sent": { "type": "double" }, "type": { "type": "string" }, "user": { "type": "string" } } }, "dump": { "properties": { "@timestamp": { "type": "date", "format": "dateOptionalTime" }, "@version": { "type": "string" }, "count": { "type": "double" }, "host": { "type": "string", "index": "not_analyzed" }, "ip": { "type": "string", "index": "not_analyzed" }, "lock": { "type": "double" }, "message": { "type": "string", "index": "not_analyzed" }, "query": { "type": "string" }, "rows": { "type": "double" }, "time": { "type": "double" }, "type": { "type": "string" }, "user": { "type": "string" } } } } }
- 2015.01.26
- bashrc
- export ES_HEAP_SIZE=9g
- bashrc
- 2015.01.19
- 재시작 스크립트
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation":true}}' sleep 1s curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown' sleep 1s bin/elasticsearch -d sleep 3s curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation":false}}'
- 설정
cluster.name: dev node.name: "dev01" discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["10.0.2.81", "10.0.2.82", "10.0.2.83"] indices.fielddata.cache.size: 40%
- ~ 2015.01.01
- Settings
- curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"indices.recovery.concurrent_streams":6,"indices.recovery.max_bytes_per_sec":"50mb"}}'
- ES_HEAP_SIZE: 50% (< 32g)
- indices.fielddata.cache.size: 40%
- Scenarios
- heap size setting
- export ES_HEAP_SIZE=9g
- curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation":true}}'
- curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
- bin/elasticsearch -d
- curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation":false}}'
- TBD
- Settings
Wednesday, July 29, 2015
ES 4 Test
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.