You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by md...@apache.org on 2017/10/18 21:10:55 UTC
[2/3] usergrid git commit: Add more logging Revert search pool size
Add more logging Revert search pool size
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3ad5b10c
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3ad5b10c
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3ad5b10c
Branch: refs/heads/debug_logging
Commit: 3ad5b10cd04812bfb173fcfa8fa7cac41263de56
Parents: fcc209a
Author: Peter Johnson <pj...@apigee.com>
Authored: Wed Oct 18 13:05:38 2017 -0700
Committer: Peter Johnson <pj...@apigee.com>
Committed: Wed Oct 18 13:05:38 2017 -0700
----------------------------------------------------------------------
.../index/impl/EsEntityIndexImpl.java | 30 ++++++++++++++++----
.../persistence/index/impl/EsProvider.java | 1 -
2 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/3ad5b10c/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index 302e453..86d7122 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -48,10 +48,7 @@ import org.apache.usergrid.persistence.index.query.tree.QueryVisitor;
import org.apache.usergrid.persistence.index.utils.IndexValidationUtils;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-import org.elasticsearch.action.ActionFuture;
-import org.elasticsearch.action.ActionListener;
-import org.elasticsearch.action.ListenableActionFuture;
-import org.elasticsearch.action.ShardOperationFailedException;
+import org.elasticsearch.action.*;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequestBuilder;
@@ -64,6 +61,7 @@ import org.elasticsearch.action.deletebyquery.DeleteByQueryResponse;
import org.elasticsearch.action.deletebyquery.IndexDeleteByQueryResponse;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
+import org.elasticsearch.action.support.PlainListenableActionFuture;
import org.elasticsearch.client.AdminClient;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
@@ -77,6 +75,7 @@ import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.metrics.sum.SumBuilder;
import org.elasticsearch.search.sort.SortOrder;
+import org.elasticsearch.threadpool.ThreadPoolStats;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -533,7 +532,8 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
try {
if (logger.isInfoEnabled()) {
- logger.info("Before Query execute {} ",
+ logger.info("Before Query execute srb = {} {} ",
+ srb.toString(),
DebugUtils.getLogMessage());
}
@@ -542,7 +542,27 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
searchResponse = f.actionGet();
long end = System.nanoTime();
+ String stats = "";
+ if (f instanceof PlainListenableActionFuture) {
+ PlainListenableActionFuture p = (PlainListenableActionFuture) f;
+ ThreadPoolStats ts = p.threadPool().stats();
+ for (ThreadPoolStats.Stats s : ts) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(" Thread Pool starts ")
+ .append(s.getName())
+ .append(s.getQueue())
+ .append(s.getActive())
+ .append(s.getThreads());
+ stats += sb.toString();
+ }
+ }
+
if (logger.isInfoEnabled()) {
+
+ logger.info("ThreadPool stats {} {} ",
+ stats,
+ DebugUtils.getLogMessage());
+
logger.info("Waiting for ES Client took {} class of executor is {} class of future is {} {} ",
TimeUnit.NANOSECONDS.toMillis(end - start),
srb.getClass().getCanonicalName(),
http://git-wip-us.apache.org/repos/asf/usergrid/blob/3ad5b10c/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsProvider.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsProvider.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsProvider.java
index 461241d..58f3191 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsProvider.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsProvider.java
@@ -125,7 +125,6 @@ public class EsProvider {
ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder()
.put( "cluster.name", clusterName )
- .put("size",32 )
.put( "client.transport.sniff", true );
String nodeName = indexFig.getNodeName();