accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3347 Log a message when a sesion is torn down due to it being idle or not accessed.
Date Thu, 20 Nov 2014 18:42:52 GMT
ACCUMULO-3347 Log a message when a sesion is torn down due to it being idle or not accessed.


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

Branch: refs/heads/master
Commit: d470f056b068ca642315157f7a1a39f2e79776f4
Parents: 7f8ef55
Author: Josh Elser <elserj@apache.org>
Authored: Thu Nov 20 12:51:39 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Nov 20 13:12:43 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/tserver/TabletServer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d470f056/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 8ef44da..3f594cc 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -495,6 +495,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
           Session session = iter.next();
           long idleTime = System.currentTimeMillis() - session.lastAccessTime;
           if (idleTime > maxIdle && !session.reserved) {
+            log.info("Closing idle session from user=" + session.user + ", client=" + session.client
+ ", idle=" + idleTime + "ms");
             iter.remove();
             sessionsToCleanup.add(session);
           }
@@ -507,7 +508,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
       }
     }
 
-    synchronized void removeIfNotAccessed(final long sessionId, long delay) {
+    synchronized void removeIfNotAccessed(final long sessionId, final long delay) {
       Session session = sessions.get(sessionId);
       if (session != null) {
         final long removeTime = session.lastAccessTime;
@@ -518,6 +519,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
             synchronized (SessionManager.this) {
               Session session2 = sessions.get(sessionId);
               if (session2 != null && session2.lastAccessTime == removeTime &&
!session2.reserved) {
+                log.info("Closing not accessed session from user=" + session2.user + ", client="
+ session2.client + ", duration=" + delay + "ms");
                 sessions.remove(sessionId);
                 sessionToCleanup = session2;
               }


Mime
View raw message