Skip to content

Instantly share code, notes, and snippets.

@ittaiz
ittaiz / mycluster.log
Created January 25, 2012 07:45
ES Server log
[2012-01-25 09:26:35,733][WARN ][bootstrap ] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line
[2012-01-25 09:26:35,735][INFO ][node ] [Aardwolf] {0.18.7}[6784]: initializing ...
[2012-01-25 09:26:35,738][INFO ][plugins ] [Aardwolf] loaded [], sites []
[2012-01-25 09:26:36,940][INFO ][node ] [Aardwolf] {0.18.7}[6784]: initialized
[2012-01-25 09:26:36,940][INFO ][node ] [Aardwolf] {0.18.7}[6784]: starting ...
[2012-01-25 09:26:36,998][INFO ][transport ] [Aardwolf] bound_address {inet[/10.0.0.5:9300]}, publish_address {inet[/10.0.0.5:9300]}
[2012-01-25 09:26:40,080][INFO ][cluster.service ] [Aardwolf] new_master [Aardwolf][FEuGnJuuScirVXqmtZ8NwA][inet[/10.0.0.5:9300]], reason: zen-disco-join (elected_as_master)
[2012-01-25 09:26:40,190][INFO ][discovery ] [Aardwolf] mycluster/FEuGnJuuScirVXqmtZ8NwA
[2012-0
@ittaiz
ittaiz / gist:1675266
Created January 25, 2012 07:50
How I'm initiating my client
Map<String,String> settings = new HashMap<String,String>();
settings.put("node.client","true");
settings.put("cluster.name","mycluster");
final NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder();
nodeBuilder.getSettings().put(settings);
node = nodeBuilder.node();
@ittaiz
ittaiz / DocProperty.java
Created January 25, 2012 08:10
Example of the model for elasticsearch nested objects question (removed getters setters for clarity)
public class DocProperty {
private String undesiredProperty;
private long otherUndesiredProperty;
private String name;
}
@ittaiz
ittaiz / MyType.java
Created January 25, 2012 19:32
Files showing elasticsearch UnavailableShardsException problem I'm having
package com.mycompany.elasticsearch.problem;
public class MyType {
private String oneProperty;
private long otherProperty;
public String getOneProperty() {
return oneProperty;
}
public void setOneProperty(String oneProperty) {
this.oneProperty = oneProperty;
@ittaiz
ittaiz / mycluster.log
Created January 26, 2012 08:10
Java API Client TRACE discovery log
10:01:21.838 [main] INFO org.elasticsearch.node - [Connors, Curtis] {0.18.7}[4304]: initializing ...
10:01:21.847 [main] INFO org.elasticsearch.plugins - [Connors, Curtis] loaded [], sites []
10:01:22.405 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [cached], type [cached], keep_alive [30s]
10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [index], type [cached], keep_alive [5m]
10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [search], type [cached], keep_alive [5m]
10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [percolate], type [cached], keep_alive [5m]
10:01:22.406 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [management], type [scaling], min [1], size [20], keep_alive [5m]
10:01:22.407 [main] DEBUG org.elasticsearch.threadpool - [Connors, Curtis] creating thread_pool [merge], type [scalin
@ittaiz
ittaiz / Namespace_version_with_hardcoded_queue_name.xml
Created July 3, 2012 07:26
A gist about the need of spring-amqp namespace limitation
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<util:properties id="queueProperties" location="classpath:/queueProperties.properties" />
@ittaiz
ittaiz / SpringVersionTest
Created April 24, 2013 13:52
A test which checks which jar files some spring classes arrive from on runtime. This was needed since "mvn dependency:tree" showed incorrect results
package com.wixpress.springVersionBug;
import org.junit.*;
import org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory;
import org.springframework.core.GenericTypeResolver;
import java.security.CodeSource;
import static org.hamcrest.Matchers.endsWith;
/**
@ittaiz
ittaiz / spring-data-mongodb-dependency
Created April 24, 2013 15:39
depending on spring-data-mongodb while excluding spring-beans
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.0.1.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
</exclusions>
@ittaiz
ittaiz / gist:5459609
Last active December 16, 2015 15:59
mvn dependency:tree output showing only spring-beans:3.1.1 is used while in reality spring-beans:3.2.2 was used in runtime. Probably maven dependency plugin bug.
>mvn dependency:tree -Dverbose -Dincludes=org.springframework
...
(omitted for clarity)
...
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ wix-feature-toggle-administration ---
[INFO] artifact org.springframework:spring-beans: checking for updates from central
[INFO] artifact org.springframework:spring-beans: checking for updates from snapshots
[INFO] artifact org.springframework:spring-expression: checking for updates from central
[INFO] artifact org.springframework:spring-expression: checking for updates from snapshots
[INFO] artifact org.springframework:spring-tx: checking for updates from central
@ittaiz
ittaiz / maven_dependency_plugin_specific_version
Created April 28, 2013 05:13
running maven dependency plugin with a specific (2.7) version
mvn org.apache.maven.plugins:maven-dependency-plugin:2.7:tree