Skip to content

Instantly share code, notes, and snippets.

public void test() throws Exception {
File dataDir = newTempDir();
File oldIndex = new File(getClass().getResource("index-0.20.zip").toURI());
TestUtil.unzip(oldIndex, dataDir);
NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder();
nodeBuilder.clusterName("oldindexcluster");
Settings settings = ImmutableSettings.builder()
@rjernst
rjernst / gist:109b9251c16437b243c7
Created January 21, 2015 18:30
Lucene sample jenkins email
Build: http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/11592/
Java: 64bit/jdk1.9.0-ea-b44 -XX:-UseCompressedOops -XX:+UseConcMarkSweepGC
1 tests failed.
FAILED: org.apache.lucene.index.TestExitableDirectoryReader.testExitableFilterIndexReader
Error Message:
The request took too long to iterate over terms. Timeout: timeoutAt: 438945046401265 (System.nanoTime(): 438945119258801), TermsEnum=org.apache.lucene.codecs.blocktree.SegmentTermsEnum@5f19f220
Stack Trace:
[13:02:12][~/Code/elasticsearch]$ mvn test -Dtests.class=*.SimpleVersioningTests
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building elasticsearch 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven) @ elasticsearch ---
2> NOTE: test params are: codec=Lucene50, sim=DefaultSimilarity, locale=it, timezone=America/Indiana/Tell_City
2> NOTE: Mac OS X 10.10.2 x86_64/Oracle Corporation 1.7.0_60 (64-bit)/cpus=8,threads=1,free=413240584,total=515375104
2> NOTE: All tests run in this JVM: [ShadowEngineTests]
2> NOTE: reproduce with: ant test -Dtestcase=ShadowEngineTests -Dtests.seed=8828A6B46C00205D -Dtests.locale=it -Dtests.timezone=America/Indiana/Tell_City -Dtests.asserts=true -Dtests.file.encoding=UTF-8
ERROR 0.00s | ShadowEngineTests (suite) <<<
> Throwable #1: java.lang.RuntimeException: file handle leaks: [FileChannel(/Users/rjernst/Code/elasticsearch/target/J0/temp/org.elasticsearch.index.engine.ShadowEngineTests 8828A6B46C00205D-001/translog-primary-003/translog-4), FileChannel(/Users/rjernst/Code/elasticsearch/target/J0/temp/org.elasticsearch.index.engine.ShadowEngineTests 8828A6B46C00205D-001/translog-primary-002/translog-3), FileChannel(/Users/rjernst/Code/elasticsearch/target/J0/temp/org.elasticsearch.index
* Core: Deprecated the thrift and memcached transports ([#10167](https://github.com/elastic/elasticsearch/pull/10167), 1.6.0, 1.5.0)
* Core: Remove references to the thrift and memcached transport plugins ([#10169](https://github.com/elastic/elasticsearch/pull/10169), 2.0.0)
* Replication: Remove `async` replication ([#10171](https://github.com/elastic/elasticsearch/pull/10171), 2.0.0)
* Internal: Add before/afterIndexShardDelete callback ([#10173](https://github.com/elastic/elasticsearch/pull/10173), 2.0.0, 1.5.0)
* Snapshots: increase default rate limiting for snapshot, restore and recovery to 40 MB/sec ([#10185](https://github.com/elastic/elasticsearch/pull/10185), 2.0.0, 1.6.0, 1.5.0)
* Java API: remove duplicated consistency level and replication type setters ([#10188](https://github.com/elastic/elasticsearch/pull/10188), 2.0.0, 1.6.0)
* Core: Remove benchmark api ([#10184](https://github.com/elastic/elasticsearch/pull/10184), 2.0.0)
* Internal: Schedule transport ping interval ([#10189](https://github.c
* Mappings: Fix _field_names to be disabled on pre 1.3.0 indexes ([#10268](https://github.com/elastic/elasticsearch/pull/10268), 2.0.0, 1.6.0, 1.5.1)
* Tests: Add delete-by-query into translog in OldIndexBackwardsCompatibilityTests ([#10266](https://github.com/elastic/elasticsearch/pull/10266), 2.0.0, 1.6.0, 1.5.1)
* Tests: Enable inline scripts on demand in bw comp tests ([#10282](https://github.com/elastic/elasticsearch/pull/10282), 2.0.0, 1.6.0)
* Scripting: add support for fine-grained settings ([#10116](https://github.com/elastic/elasticsearch/pull/10116), 2.0.0, 1.6.0)
* Mappings: update dynamic fields in mapping on master even if parsing fals for the rest of the doc ([#9874](https://github.com/elastic/elasticsearch/pull/9874), 2.0.0, 1.6.0)
* Core: Enable doc values by default, when appropriate ([#10209](https://github.com/elastic/elasticsearch/pull/10209), 2.0.0)
* Internal: Fix thread leak in Hunspell service tests ([#10020](https://github.com/elastic/elasticsearch/pull/10020), 2.0.0, 1.6.0, 1.5.1)
*
// -----------------------------------------------------------------
// Suite and test case setup/cleanup.
// -----------------------------------------------------------------
// TODO: Parent/child and other things does not work with the query cache
// We must disable query cache for both suite and test to override lucene, but LTC resets it after the suite
@BeforeClass
public static void disableQueryCacheSuite() {
IndexSearcher.setDefaultQueryCache(null);
}
C:\dev\code\elasticsearch\tmp2\elasticsearch-2.0.0-SNAPSHOT\bin>"%JAVA_HOME%"\bin\java -XshowSettings -version
VM settings:
Max. Heap Size (Estimated): 910.50M
Ergonomics Machine Class: client
Using VM: Java HotSpot(TM) 64-Bit Server VM
Property settings:
awt.toolkit = sun.awt.windows.WToolkit
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.foreground=yes -Des.path.home=/Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT -cp :/Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT/lib/elasticsearch-2.0.0-SNAPSHOT.jar:/Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT/lib/*:/Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT/lib/sigar/* org.elasticsearch.bootstrap.Elasticsearch
[13:08:12][~/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT]$ bin/elasticsearch -Des.path.home=`pwd`/fakehome
Failed to configure logging...
ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT/fakehome/config];
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142)
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:92)
at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:174)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:227)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:28)
Caused by: java.nio.file.NoSuchFileException: /Users/rjernst/Code/elasticsearch/tmp/elasticsearch-2.0.0-SNAPSHOT/fakehome/config
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)