Comments (7)
Which version are you running , snapshot ?
from jest.
snapshot of master
from jest.
Sample test code:
package abc.test;
import io.searchbox.client.JestClient;
import io.searchbox.client.JestClientFactory;
import io.searchbox.client.JestResult;
import io.searchbox.client.config.ClientConfig;
import io.searchbox.core.Search;
import java.util.concurrent.TimeUnit;
public class JestTest {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// Configuration
ClientConfig clientConfig =
new ClientConfig.Builder("http://localhost:9200")
.multiThreaded(true).discoveryEnabled(true)
.discoveryFrequency(1l, TimeUnit.SECONDS).maxTotalConnection(100).build();
// Construct a new Jest client according to configuration via factory
JestClientFactory factory = new JestClientFactory();
factory.setClientConfig(clientConfig);
JestClient client = factory.getObject();
String query = "{\n" +
" \"query\": {\n" +
" \"filtered\" : {\n" +
" \"query\" : {\n" +
" \"query_string\" : {\n" +
" \"query\" : \"search\"\n" +
" }\n" +
" },\n" +
" \"filter\" : {\n" +
" \"term\" : { \"user\" : \"kimchy\" }\n" +
" }\n" +
" }\n" +
" }\n" +
"}";
Thread.sleep(2000);
Search search = new Search.Builder(query)
// multiple index or types can be added.
.addIndex("twitter").addType("tweet")
.build();
for(int i=0; i<10; i++){
JestResult result = client.execute(search);
System.out.println(result.getJsonString());
}
client.shutdownClient();
System.out.println("terminated!");
}
}
This new process will never stops.
from jest.
I still cannot reproduce the issue even with the sample code you provided... When I run your sample code, both main thread and the JVM properly terminates. Are you customizing/overwriting any of the Jest classes, maybe that's the issue?
from jest.
@zykaka which jdk/jvm version you are using?
from jest.
IBM jdk 6.0
from jest.
Closing this, guess this bug is only happens with IBM JDK.
from jest.
Related Issues (20)
- Invalid type conversion Integer -> Double
- Why do not working the index pattern in search request
- Path to hits/total needs to be updated for ESV7 HOT 2
- update by query
- Documentation for Kerberos Authentication
- Geo distance which api can support
- Delete child documents without parent
- Node Discovery Frequency Only send to one node.
- Search query logging
- Support for alias is_write_index
- release of version 6.8.10
- How to exit main thread when executeAsync method execute completed? HOT 1
- Refactor Search to be Generic
- update gson version to latest 2.8.6?
- 在处理jejstId注解时, 注解属性存在父类无法识别
- How to add parameters on '/_search' method like this '/_search?preference=zxcvzxd123'
- io.searchbox.client.http.JestHttpClient#deserializeResponse cause oom exception
- CatResult.parseResultArray throws java.lang.UnsupportedOperationException: JsonNull
- a problem wen upgrading to ES 7
- Is this project dead? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest.