Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This script allows to reproduce the error seen within https://github.com/elasticsearch/elasticsearch/issues/7430 . Take this as procedure not as actual script to run (ES might not be up when next command is issued). It didn't failed right away with only one document indexed, it started about 40mb index size. But might fail already earlier
#!/bin/sh
cd /var/tmp
rm -rf *elastic*
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.0.tar.gz
tar -xf elasticsearch-0.20.0.tar.gz
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.tar.gz
tar -xf elasticsearch-1.3.1.tar.gz
./elasticsearch-0.20.0/bin/elasticsearch
curl -XPUT 'http://localhost:9200/twitter/'
curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : true }
}
}
}
'
for i in {1..100000}
do
curl -XPOST "http://localhost:9200/twitter/tweet" -d '{
"user" : "kimchy",
"post_date" : "2009-11-15T14:12:12",
"message" : "aeKaah3RXaFXrtLTxzZme2uo8c0Uz9rIGKAIFzfwJ3iSFFY0OZjiuQN85XaRpNc6HjS6tmqqsGInuZIt5L2ClH1fBYvX8QOIjvorg6lh0jeZsXCDYcX5Eyil938QnxhxJ2TqvzQEpeRAPCAGmM4jDE3hzieH3Mwlh35WnlXJmWly8WklFzMnXtAO77OXCqAoTmOnHiXGeJOPmMfKGw21eihkl49E445AOPwH1bK4knDIM5icMWbZVGxs1h6wawlIVV11l1uDCTM9NvTKYGziPYgAUFgzBfzeaFwoHA3J4joyqOjYQfLMY3X61JZsXFn4rbW29MyATb6WTor1FAuwPO9c9b71jwlL8PaJCvIIGN9P0VPEBixlGUy70p9sRNJzTqXO0NHqN54WDec0J2KFm2Nux9nryOUSE6XhcqBp6W4FZJ5mSu1mPeXaQLzarkkDSwaBGzc3El0iYlTj5vg48KZZHuVOpvTsq6fr7gW2gXc42rXQlwZvwa8MUxjAbFybnhcotJeROAh94s4Vq1M3OpWcNsrY3M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OLxyObVa1WALWpe6rHGv1BoGsWnj6APwan9eubJuxRhbSygqDLbjjPMNWNP7y4Zvv8JpClakaKuyzbp70fqziNc4QBH9WklYXC1hD7QwlUx4bFNXQsGD2xwuYevxrGRu711Vze3PpT66DU5x4G3JcaXFc7XtuoC2Gte6wOV4JFnrSp9tm0YaPTFSWa8m87j2QIEu0oGc0GnZZEPHMikOQRuGD93xlASsSma1ycwFsgr8pNxuCP6H9rOctcELCaLWxO3C5py23YQWJvxZ5s82X8Cx13T4hlXjtZkD9TpN6zvafH7bFRmxB5IE0O3vg1bWxhvfWbXXmcfXSGrqoXhgTSE6SQcTrVLm7RWjLE43LcZjvRNvypRcQoP9e7OXqEQ601k7JtbQZQmhJ1UzuZIiRXhBZCksKYyj0tCZicTNFcZe6r4SaKuK5NW1PCPRt0aQr1TBKTEaC5VZJWcV6OD6U8xUzjTovrYNtm8k8LeD00UEouuAjFZvvOILzKTlCCqJBANcginae3jbmsZixBmnQGqckliiAcEeMt09CzsYWW6oY30uLvK9pJzwIFAHOByQD174LhYOIEMbnoGTcPQnreqAgMBQRhCATyVnHJujSLi7FGz21h0j4EI7TYA2wq81iPBF59IjpaAYhjsXVJUhqmXCHftQRt1hnzeCcJb6EQgLzoKxcIQUvsrA2q4x0ZRyZPDuqTYJwFVqEeBiilBKyyE6P4cn4Hsm7GgpqDMVbRSup4WDjE6pSL9BH6b6gz7Pt6RkG5pWtpkw3v5NLaXYWZSZcJs4FJe143TBfEtQVYYGCWHpVqGazIVuLX"
}'
done
curl -XPOST 'http://localhost:9200/_shutdown'
cp -r elasticsearch-0.20.0/data elasticsearch-1.3.1/
./elasticsearch-1.3.1/bin/elasticsearch &
curl -XPOST 'http://localhost:9200/twitter/_optimize'
curl -XPOST 'http://localhost:9200/_shutdown'
./elasticsearch-1.3.1/bin/elasticsearch &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.