Repository: usergrid
Updated Branches:
  refs/heads/debug_logging 3c285e0c3 -> 2a65d57fc


Fix copyright and add more Debug logging for per issues


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/395bdea3
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/395bdea3
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/395bdea3

Branch: refs/heads/debug_logging
Commit: 395bdea3279eb06060c615330f1f555b1b8853e8
Parents: 433f4ef
Author: Peter Johnson <[email protected]>
Authored: Tue Oct 17 14:07:34 2017 -0700
Committer: Peter Johnson <[email protected]>
Committed: Tue Oct 17 14:07:34 2017 -0700

----------------------------------------------------------------------
 .../usergrid/persistence/core/util/DebugUtils.java | 17 +++++++++++++++++
 .../persistence/index/impl/EsEntityIndexImpl.java  | 15 ++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/395bdea3/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/util/DebugUtils.java
----------------------------------------------------------------------
diff --git 
a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/util/DebugUtils.java
 
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/util/DebugUtils.java
index 06d848e..7d00c12 100644
--- 
a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/util/DebugUtils.java
+++ 
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/util/DebugUtils.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.usergrid.persistence.core.util;
 
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/395bdea3/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 8124d0c..302e453 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
@@ -536,7 +536,20 @@ public class EsEntityIndexImpl implements 
EntityIndex,VersionedData {
                 logger.info("Before Query execute {} ",
                     DebugUtils.getLogMessage());
             }
-            searchResponse = srb.execute().actionGet();
+
+            ListenableActionFuture<SearchResponse> f =  srb.execute();
+            long start = System.nanoTime();
+            searchResponse = f.actionGet();
+            long end = System.nanoTime();
+
+            if (logger.isInfoEnabled()) {
+                logger.info("Waiting for ES Client took {}  class of executor 
is {} class of future is {} {} ",
+                    TimeUnit.NANOSECONDS.toMillis(end - start),
+                    srb.getClass().getCanonicalName(),
+                    f.getClass().getCanonicalName(),
+                    DebugUtils.getLogMessage());
+            }
+
         }
         catch ( Throwable t ) {
             logger.error( "Unable to communicate with Elasticsearch: {}", 
t.getMessage() );

Reply via email to