Category : jest

Order In springboot1.4.5 version 1.4.5, jest was referenced to access es, resulting in a Connection is still allocated exception. abnormal java.lang.IllegalStateException: Connection is still allocated at org.apache.http.util.Asserts.check(Asserts.java:34) at org.apache.http.impl.conn.BasicHttpClientConnectionManager.getConnection(BasicHttpClientConnectionManager.java:251) at org.apache.http.impl.conn.BasicHttpClientConnectionManager$1.get(BasicHttpClientConnectionManager.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:191) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:118) at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:57) Reason spring-boot-autoconfigure-1.4.5.RELEASE-sources.jar! /org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfiguration.javaThe default configuration does ..

Read more

Order This article mainly studies springboot jest autoconfigure. JestProperties spring-boot-autoconfigure-2.1.4.RELEASE-sources.jar! /org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java @ConfigurationProperties(prefix = “spring.elasticsearch.jest”) public class JestProperties { /** * Comma-separated list of the Elasticsearch instances to use. */ private List<String> uris = new ArrayList<>( Collections.singletonList(“http://localhost:9200”)); /** * Login username. */ private String username; /** * Login password. */ private String password; /** * Whether ..

Read more

Order This article mainly studies jest’s NodeChecker. NodeChecker jest-common-6.3.1-sources.jar! /io/searchbox/client/config/discovery/NodeChecker.java public class NodeChecker extends AbstractScheduledService { private final static Logger log = LoggerFactory.getLogger(NodeChecker.class); private final static String PUBLISH_ADDRESS_KEY = “http_address”; private final static String PUBLISH_ADDRESS_KEY_V5 = “publish_address”; // The one that under “http” node private final static Pattern INETSOCKETADDRESS_PATTERN = Pattern.compile(“(?:inet\\[)?(?:(?:[^:]+)?\\/)?([^:]+):(\\d+)\\]?”); private final NodesInfo action; ..

Read more

Order This article mainly studies jest’s IdleConnectionReaper IdleConnectionReaper jest-common-6.3.1-sources.jar! /io/searchbox/client/config/idle/IdleConnectionReaper.java public class IdleConnectionReaper extends AbstractScheduledService { final static Logger logger = LoggerFactory.getLogger(IdleConnectionReaper.class); private final ReapableConnectionManager reapableConnectionManager; private final ClientConfig clientConfig; public IdleConnectionReaper(ClientConfig clientConfig, ReapableConnectionManager reapableConnectionManager) { this.reapableConnectionManager = reapableConnectionManager; this.clientConfig = clientConfig; } @Override protected void runOneIteration() throws Exception { logger.debug(“closing idle connections…”); reapableConnectionManager.closeIdleConnections(clientConfig.getMaxConnectionIdleTime(), clientConfig.getMaxConnectionIdleTimeDurationTimeUnit()); ..

Read more