Skip to content

Instantly share code, notes, and snippets.

View jprante's full-sized avatar
💤
Dormant

Jörg Prante jprante

💤
Dormant
View GitHub Profile
node 1
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2163 es 20 0 20.8g 3.5g 6340 S 0.3 22.5 920:36.53 java
node 2
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2175 es 20 0 20.7g 2.2g 6448 S 1.0 14.1 611:42.36 java
node 3
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
@jprante
jprante / gist:1452250
Created December 9, 2011 16:33
ES integration test failures
Failed tests: testScriptFieldUsingSource(org.elasticsearch.test.integration.search.scriptfield.ScriptFieldSearchTests): Failures [shard [[_na_][test][4]], reason [No active shards]](..)
testFiltersWithCustomCacheKey(org.elasticsearch.test.integration.search.query.SimpleQueryTests): Failures [shard [[_na_][test][4]], reason [No active shards]](..)
Tests run: 794, Failures: 2, Errors: 0, Skipped: 0
org.elasticsearch.test.integration.search.scriptfield.ScriptFieldSearchTests:testScriptFieldUsingSource
Failures [shard [[_na_][test][4]], reason [No active shards]] Expected: <0> but: was <1>
org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
@jprante
jprante / myapp.sh
Created April 7, 2012 12:58
for chepa
curl -XDELETE http://localhost:9200/myapp
curl -XPUT http://localhost:9200/myapp/ -d '
{
"settings": {
"analysis": {
"analyzer": {
"index_analyzer": {
"tokenizer": "standard",
"filter": ["standard", "my_delimiter", "lowercase", "stop", "asciifolding", "porter_stem"]
curl -XGET http://localhost:9200/myapp/product/_search -d '{
"query" : {
"bool" : {
"must" : [
{
"text" : { "name" : "asus" }
},
{
"range" : {
"price_low" : {
@jprante
jprante / BulkWrite.java
Created May 2, 2012 18:21
Performing multithreaded asynchronous bulk writes to Elasticsearch
/*
* Licensed to Jörg Prante and xbib under one or more contributor
* license agreements. See the NOTICE.txt file distributed with this work
* for additional information regarding copyright ownership.
*
* Copyright (C) 2012 Jörg Prante and xbib
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation; either version 3 of the License, or
@jprante
jprante / exception.txt
Created May 9, 2012 15:00
TransportClientNodesService exception
Exception in thread "elasticsearch[generic]-pool-1-thread-24" java.lang.StackOverflowError
at java.net.Inet4Address.getHostAddress(Inet4Address.java:322)
at java.net.InetAddress.toString(InetAddress.java:663)
at java.net.InetSocketAddress.toString(InetSocketAddress.java:276)
at java.lang.String.valueOf(String.java:2902)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at org.elasticsearch.common.transport.InetSocketTransportAddress.toString(InetSocketTransportAddress.java:150)
at java.lang.String.valueOf(String.java:2902)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at org.elasticsearch.transport.ActionTransportException.buildMessage(ActionTransportException.java:71)
@jprante
jprante / sample.json
Created May 10, 2012 08:28
Mimic "objects" in search by "index_name"
{
[...]
"name" : {
"fields" : {
"xname" : {
"index" : "analyzed",
"omit_norms" : false,
"type" : "string",
"include_in_all" : true
}
@jprante
jprante / ElasticsearchClient.java
Created May 10, 2012 09:06
A tiny step towards reproducing StackOverflowError
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.URI;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@jprante
jprante / identifier-isbn-search-demo.sh
Created May 11, 2012 19:54
ISBN search tricks with Elasticsearch multi_field and index_name
curl -XDELETE 'localhost:9200/isbn/'
curl -XPUT 'localhost:9200/isbn/' -d '
{
"mappings" : {
"_default_" : {
"_source" : {
"enabled" : true
},
"_all" : {
@jprante
jprante / messages.txt
Created May 12, 2012 13:19
TransportClient StackOverflow
```
[14:50:16,801][WARN ][netty.channel.DefaultChannelPipeline] An exception was thrown by an exception handler.
java.util.concurrent.RejectedExecutionException: Task org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1@19d465ba rejected from java.util.concurrent.ThreadPoolExecutor@6d2a98de[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 53]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2001)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1337)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.start(AbstractNioWorker.java:168)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.executeInIoThread(AbstractNioWorker.java:314)
at org.elasticsearch.common.netty.ch