[6/6] accumulo git commit: Merge branch '1.7'

2016-01-11 Thread elserj
Merge branch '1.7'


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

Branch: refs/heads/master
Commit: 18725dd6c17cccd1060737e81956b6ee0d824c4a
Parents: 21123cc 6562828
Author: Josh Elser 
Authored: Tue Jan 12 00:24:37 2016 -0500
Committer: Josh Elser 
Committed: Tue Jan 12 00:24:37 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../tserver/session/ConditionalSession.java |   3 +-
 .../tserver/session/MultiScanSession.java   |   4 +-
 .../accumulo/tserver/session/ScanSession.java   |   6 +-
 .../accumulo/tserver/session/Session.java   |   4 +-
 .../tserver/session/SessionManager.java |  61 ++-
 .../apache/accumulo/tserver/tablet/Scanner.java |  68 +--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 9 files changed, 306 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ScanSession.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Scanner.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/18725dd6/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
--
diff --cc 
test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
index 78262ef,000..0074eac
mode 100644,00..100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
@@@ -1,144 -1,0 +1,153 @@@
 +/*
 + * 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.accumulo.test.functional;
 +
 +import static java.nio.charset.StandardCharsets.UTF_8;
 +
 +import java.util.Iterator;
 +import java.util.Map;
 +import java.util.Map.Entry;
 +import java.util.concurrent.TimeUnit;
 +
 +import org.apache.accumulo.core.client.BatchWriter;
 +import org.apache.accumulo.core.client.BatchWriterConfig;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.Scanner;
 +import org.apache.accumulo.core.client.admin.InstanceOperations;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.security.Authorizations;
 +import org.apache.accumulo.harness.AccumuloClusterHarness;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.hadoop.conf.Configuration;
 +import org.apache.hadoop.io.Text;
 +im

[5/6] accumulo git commit: Merge branch '1.6' into 1.7

2016-01-11 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:
server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java

server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java

test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java


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

Branch: refs/heads/1.7
Commit: 656282825ad0eb4ee51052e71492a3d3fd5c1f02
Parents: 642add8 46ad836
Author: Josh Elser 
Authored: Tue Jan 12 00:24:24 2016 -0500
Committer: Josh Elser 
Committed: Tue Jan 12 00:24:24 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../tserver/session/ConditionalSession.java |   3 +-
 .../tserver/session/MultiScanSession.java   |   4 +-
 .../accumulo/tserver/session/ScanSession.java   |   6 +-
 .../accumulo/tserver/session/Session.java   |   4 +-
 .../tserver/session/SessionManager.java |  61 ++-
 .../apache/accumulo/tserver/tablet/Scanner.java |  68 +--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 9 files changed, 306 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
index cd5e617,000..138f558
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
@@@ -1,44 -1,0 +1,45 @@@
 +/*
 + * 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.accumulo.tserver.session;
 +
 +import java.util.concurrent.atomic.AtomicBoolean;
 +
 +import org.apache.accumulo.core.client.Durability;
 +import org.apache.accumulo.core.security.Authorizations;
 +import org.apache.accumulo.core.security.thrift.TCredentials;
 +
 +public class ConditionalSession extends Session {
 +  public final TCredentials credentials;
 +  public final Authorizations auths;
 +  public final String tableId;
 +  public final AtomicBoolean interruptFlag = new AtomicBoolean();
 +  public final Durability durability;
 +
 +  public ConditionalSession(TCredentials credentials, Authorizations 
authorizations, String tableId, Durability durability) {
 +super(credentials);
 +this.credentials = credentials;
 +this.auths = authorizations;
 +this.tableId = tableId;
 +this.durability = durability;
 +  }
 +
 +  @Override
-   public void cleanup() {
++  public boolean cleanup() {
 +interruptFlag.set(true);
++return true;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
index b326e10,000..2fd590c
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
@@@ -1,63 -1,0 +1,65 @@@
 +/*
 + * 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 th

[2/6] accumulo git commit: ACCUMULO-3509: Make cleanup stateful to minimize blocking

2016-01-11 Thread elserj
ACCUMULO-3509: Make cleanup stateful to minimize blocking

By enabling state ( true/false) within the cleanup method, the change will 
avoid blocking
on a scan session being swept. if the session cleanup blocks because a 
ScanSession is
still being read, we may block until the ScanBatch returns for that ScanSession.

The change uses a simple semaphore ( purely because I like the word ) to 
attempt acquisition.
If that fails, we return false from the cleanup and reintroduce that Session 
back into
the queue to clean up.

Closes apache/accumulo#62


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

Branch: refs/heads/1.7
Commit: 46ad8368e160c56c03571b467f8ae603c50992f6
Parents: 567f52f
Author: phrocker 
Authored: Mon Jan 4 10:59:28 2016 -0500
Committer: Josh Elser 
Committed: Mon Jan 11 21:24:05 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../org/apache/accumulo/tserver/Tablet.java |  67 +--
 .../apache/accumulo/tserver/TabletServer.java   |  81 +++--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 5 files changed, 305 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 632bb59..9243494 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -225,7 +225,11 @@ public enum Property {
   + " tserver.walog.max.size >= this property."),
   TSERV_MEM_MGMT("tserver.memory.manager", 
"org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager", 
PropertyType.CLASSNAME,
   "An implementation of MemoryManger that accumulo will use."),
-  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "maximum idle time for a session"),
+  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "When a tablet server's SimpleTimer thread triggers 
to check "
+  + "idle sessions, this configurable option will be used to evaluate scan 
sessions to determine if they can be closed due to inactivity"),
+  TSERV_UPDATE_SESSION_MAXIDLE("tserver.session.update.idle.max", "1m", 
PropertyType.TIMEDURATION,
+  "When a tablet server's SimpleTimer thread triggers to check "
+  + "idle sessions, this configurable option will be used to evaluate 
update sessions to determine if they can be closed due to inactivity"),
   TSERV_READ_AHEAD_MAXCONCURRENT("tserver.readahead.concurrent.max", "16", 
PropertyType.COUNT,
   "The maximum number of concurrent read ahead that will execute. This 
effectively"
   + " limits the number of long running scans that can run 
concurrently per tserver."),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index efed665..3f00c0b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -39,6 +39,8 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
@@ -1761,33 +1763,47 @@ public class Tablet {
 private ScanDataSource isolatedDataSource;
 private boolean sawException = false;
 private boolean scanClosed = false;
+/**
+ * A fair semaphore of one is used since explicitly know the access 
pattern will be one thread to read and another to call close if the session 
becomes
+ * idle. Since we're explicitly preventing re-entrance, we're currently 
using a Sempahore. If at any point we decide read needs to be re-entrant, we can
+ * switch to a Reentrant lock.
+ */
+private Semaphore scannerSemaphore;
 
 Scanner(Range range, ScanOptions options) {
   this.range = range;
   this.options = options;
+  s

[3/6] accumulo git commit: ACCUMULO-3509: Make cleanup stateful to minimize blocking

2016-01-11 Thread elserj
ACCUMULO-3509: Make cleanup stateful to minimize blocking

By enabling state ( true/false) within the cleanup method, the change will 
avoid blocking
on a scan session being swept. if the session cleanup blocks because a 
ScanSession is
still being read, we may block until the ScanBatch returns for that ScanSession.

The change uses a simple semaphore ( purely because I like the word ) to 
attempt acquisition.
If that fails, we return false from the cleanup and reintroduce that Session 
back into
the queue to clean up.

Closes apache/accumulo#62


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

Branch: refs/heads/master
Commit: 46ad8368e160c56c03571b467f8ae603c50992f6
Parents: 567f52f
Author: phrocker 
Authored: Mon Jan 4 10:59:28 2016 -0500
Committer: Josh Elser 
Committed: Mon Jan 11 21:24:05 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../org/apache/accumulo/tserver/Tablet.java |  67 +--
 .../apache/accumulo/tserver/TabletServer.java   |  81 +++--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 5 files changed, 305 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 632bb59..9243494 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -225,7 +225,11 @@ public enum Property {
   + " tserver.walog.max.size >= this property."),
   TSERV_MEM_MGMT("tserver.memory.manager", 
"org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager", 
PropertyType.CLASSNAME,
   "An implementation of MemoryManger that accumulo will use."),
-  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "maximum idle time for a session"),
+  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "When a tablet server's SimpleTimer thread triggers 
to check "
+  + "idle sessions, this configurable option will be used to evaluate scan 
sessions to determine if they can be closed due to inactivity"),
+  TSERV_UPDATE_SESSION_MAXIDLE("tserver.session.update.idle.max", "1m", 
PropertyType.TIMEDURATION,
+  "When a tablet server's SimpleTimer thread triggers to check "
+  + "idle sessions, this configurable option will be used to evaluate 
update sessions to determine if they can be closed due to inactivity"),
   TSERV_READ_AHEAD_MAXCONCURRENT("tserver.readahead.concurrent.max", "16", 
PropertyType.COUNT,
   "The maximum number of concurrent read ahead that will execute. This 
effectively"
   + " limits the number of long running scans that can run 
concurrently per tserver."),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index efed665..3f00c0b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -39,6 +39,8 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
@@ -1761,33 +1763,47 @@ public class Tablet {
 private ScanDataSource isolatedDataSource;
 private boolean sawException = false;
 private boolean scanClosed = false;
+/**
+ * A fair semaphore of one is used since explicitly know the access 
pattern will be one thread to read and another to call close if the session 
becomes
+ * idle. Since we're explicitly preventing re-entrance, we're currently 
using a Sempahore. If at any point we decide read needs to be re-entrant, we can
+ * switch to a Reentrant lock.
+ */
+private Semaphore scannerSemaphore;
 
 Scanner(Range range, ScanOptions options) {
   this.range = range;
   this.options = options;
+

[4/6] accumulo git commit: Merge branch '1.6' into 1.7

2016-01-11 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:
server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java

server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java

test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java


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

Branch: refs/heads/master
Commit: 656282825ad0eb4ee51052e71492a3d3fd5c1f02
Parents: 642add8 46ad836
Author: Josh Elser 
Authored: Tue Jan 12 00:24:24 2016 -0500
Committer: Josh Elser 
Committed: Tue Jan 12 00:24:24 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../tserver/session/ConditionalSession.java |   3 +-
 .../tserver/session/MultiScanSession.java   |   4 +-
 .../accumulo/tserver/session/ScanSession.java   |   6 +-
 .../accumulo/tserver/session/Session.java   |   4 +-
 .../tserver/session/SessionManager.java |  61 ++-
 .../apache/accumulo/tserver/tablet/Scanner.java |  68 +--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 9 files changed, 306 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
index cd5e617,000..138f558
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java
@@@ -1,44 -1,0 +1,45 @@@
 +/*
 + * 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.accumulo.tserver.session;
 +
 +import java.util.concurrent.atomic.AtomicBoolean;
 +
 +import org.apache.accumulo.core.client.Durability;
 +import org.apache.accumulo.core.security.Authorizations;
 +import org.apache.accumulo.core.security.thrift.TCredentials;
 +
 +public class ConditionalSession extends Session {
 +  public final TCredentials credentials;
 +  public final Authorizations auths;
 +  public final String tableId;
 +  public final AtomicBoolean interruptFlag = new AtomicBoolean();
 +  public final Durability durability;
 +
 +  public ConditionalSession(TCredentials credentials, Authorizations 
authorizations, String tableId, Durability durability) {
 +super(credentials);
 +this.credentials = credentials;
 +this.auths = authorizations;
 +this.tableId = tableId;
 +this.durability = durability;
 +  }
 +
 +  @Override
-   public void cleanup() {
++  public boolean cleanup() {
 +interruptFlag.set(true);
++return true;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
index b326e10,000..2fd590c
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java
@@@ -1,63 -1,0 +1,65 @@@
 +/*
 + * 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

[1/6] accumulo git commit: ACCUMULO-3509: Make cleanup stateful to minimize blocking

2016-01-11 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.6 567f52fb2 -> 46ad8368e
  refs/heads/1.7 642add8cc -> 656282825
  refs/heads/master 21123cca7 -> 18725dd6c


ACCUMULO-3509: Make cleanup stateful to minimize blocking

By enabling state ( true/false) within the cleanup method, the change will 
avoid blocking
on a scan session being swept. if the session cleanup blocks because a 
ScanSession is
still being read, we may block until the ScanBatch returns for that ScanSession.

The change uses a simple semaphore ( purely because I like the word ) to 
attempt acquisition.
If that fails, we return false from the cleanup and reintroduce that Session 
back into
the queue to clean up.

Closes apache/accumulo#62


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

Branch: refs/heads/1.6
Commit: 46ad8368e160c56c03571b467f8ae603c50992f6
Parents: 567f52f
Author: phrocker 
Authored: Mon Jan 4 10:59:28 2016 -0500
Committer: Josh Elser 
Committed: Mon Jan 11 21:24:05 2016 -0500

--
 .../org/apache/accumulo/core/conf/Property.java |   6 +-
 .../org/apache/accumulo/tserver/Tablet.java |  67 +--
 .../apache/accumulo/tserver/TabletServer.java   |  81 +++--
 .../test/functional/ScanSessionTimeOutIT.java   |  15 +-
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 5 files changed, 305 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 632bb59..9243494 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -225,7 +225,11 @@ public enum Property {
   + " tserver.walog.max.size >= this property."),
   TSERV_MEM_MGMT("tserver.memory.manager", 
"org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager", 
PropertyType.CLASSNAME,
   "An implementation of MemoryManger that accumulo will use."),
-  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "maximum idle time for a session"),
+  TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1m", 
PropertyType.TIMEDURATION, "When a tablet server's SimpleTimer thread triggers 
to check "
+  + "idle sessions, this configurable option will be used to evaluate scan 
sessions to determine if they can be closed due to inactivity"),
+  TSERV_UPDATE_SESSION_MAXIDLE("tserver.session.update.idle.max", "1m", 
PropertyType.TIMEDURATION,
+  "When a tablet server's SimpleTimer thread triggers to check "
+  + "idle sessions, this configurable option will be used to evaluate 
update sessions to determine if they can be closed due to inactivity"),
   TSERV_READ_AHEAD_MAXCONCURRENT("tserver.readahead.concurrent.max", "16", 
PropertyType.COUNT,
   "The maximum number of concurrent read ahead that will execute. This 
effectively"
   + " limits the number of long running scans that can run 
concurrently per tserver."),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/46ad8368/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index efed665..3f00c0b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -39,6 +39,8 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
@@ -1761,33 +1763,47 @@ public class Tablet {
 private ScanDataSource isolatedDataSource;
 private boolean sawException = false;
 private boolean scanClosed = false;
+/**
+ * A fair semaphore of one is used since explicitly know the access 
pattern will be one thread to read and another to call close if the session 
becomes
+ * idle. Since we're explicitly preventing re-entrance, we're currently 
using a Sempahore. If at any point we decide read needs to be re-entrant, we can
+ * switch to a Reentrant lock.
+  

[accumulo] Git Push Summary

2016-01-11 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/ACCUMULO-2883 [deleted] 1ae1b34f3


[6/6] accumulo git commit: Merge branch '1.7'

2016-01-11 Thread ctubbsii
Merge branch '1.7'

Conflicts:
pom.xml


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

Branch: refs/heads/master
Commit: 21123cca72a576c237e17b2a95b0105202265d45
Parents: 6471355 642add8
Author: Christopher Tubbs 
Authored: Mon Jan 11 19:59:51 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 19:59:51 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/21123cca/pom.xml
--
diff --cc pom.xml
index 3f90af2,3fc5d96..e7bb0f6
--- a/pom.xml
+++ b/pom.xml
@@@ -689,8 -654,8 +689,8 @@@
  true
  clean deploy
  clean verify
- @{project.version}
+ rel/@{project.version}
 -
apache-release,move-source-tarball,seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 +
apache-release,accumulo-release,skip-plugin-its-with-skipTests
  false
  false
  true



[1/6] accumulo git commit: ACCUMULO-4106 Update release plugin tagNameFormat

2016-01-11 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/1.6 8669215b1 -> 567f52fb2
  refs/heads/1.7 78659a61f -> 642add8cc
  refs/heads/master 64713554b -> 21123cca7


ACCUMULO-4106 Update release plugin tagNameFormat


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

Branch: refs/heads/1.6
Commit: 567f52fb26588b65083f2e197a9fb85c8fe500ac
Parents: 8669215
Author: Christopher Tubbs 
Authored: Mon Jan 11 15:35:11 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 15:35:11 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/567f52fb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d51f406..de8302c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -625,7 +625,7 @@
 true
 clean deploy
 clean verify
-@{project.version}
+rel/@{project.version}
 
seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 false
 false



[4/6] accumulo git commit: Merge branch '1.6' into 1.7

2016-01-11 Thread ctubbsii
Merge branch '1.6' into 1.7

Conflicts:
pom.xml


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

Branch: refs/heads/master
Commit: 642add8cc6710ec5e396bd9e690e058ed8fe1837
Parents: 78659a6 567f52f
Author: Christopher Tubbs 
Authored: Mon Jan 11 19:57:51 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 19:57:51 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/642add8c/pom.xml
--
diff --cc pom.xml
index 0fa003a,de8302c..3fc5d96
--- a/pom.xml
+++ b/pom.xml
@@@ -654,8 -625,8 +654,8 @@@
  true
  clean deploy
  clean verify
- @{project.version}
+ rel/@{project.version}
 -
seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 +
apache-release,move-source-tarball,seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
  false
  false
  true



[2/6] accumulo git commit: ACCUMULO-4106 Update release plugin tagNameFormat

2016-01-11 Thread ctubbsii
ACCUMULO-4106 Update release plugin tagNameFormat


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

Branch: refs/heads/1.7
Commit: 567f52fb26588b65083f2e197a9fb85c8fe500ac
Parents: 8669215
Author: Christopher Tubbs 
Authored: Mon Jan 11 15:35:11 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 15:35:11 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/567f52fb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d51f406..de8302c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -625,7 +625,7 @@
 true
 clean deploy
 clean verify
-@{project.version}
+rel/@{project.version}
 
seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 false
 false



[5/6] accumulo git commit: Merge branch '1.6' into 1.7

2016-01-11 Thread ctubbsii
Merge branch '1.6' into 1.7

Conflicts:
pom.xml


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

Branch: refs/heads/1.7
Commit: 642add8cc6710ec5e396bd9e690e058ed8fe1837
Parents: 78659a6 567f52f
Author: Christopher Tubbs 
Authored: Mon Jan 11 19:57:51 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 19:57:51 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/642add8c/pom.xml
--
diff --cc pom.xml
index 0fa003a,de8302c..3fc5d96
--- a/pom.xml
+++ b/pom.xml
@@@ -654,8 -625,8 +654,8 @@@
  true
  clean deploy
  clean verify
- @{project.version}
+ rel/@{project.version}
 -
seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 +
apache-release,move-source-tarball,seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
  false
  false
  true



[3/6] accumulo git commit: ACCUMULO-4106 Update release plugin tagNameFormat

2016-01-11 Thread ctubbsii
ACCUMULO-4106 Update release plugin tagNameFormat


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

Branch: refs/heads/master
Commit: 567f52fb26588b65083f2e197a9fb85c8fe500ac
Parents: 8669215
Author: Christopher Tubbs 
Authored: Mon Jan 11 15:35:11 2016 -0500
Committer: Christopher Tubbs 
Committed: Mon Jan 11 15:35:11 2016 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/567f52fb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d51f406..de8302c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -625,7 +625,7 @@
 true
 clean deploy
 clean verify
-@{project.version}
+rel/@{project.version}
 
seal-jars,skip-findbugs,skip-plugin-its-with-skipTests
 false
 false



accumulo git commit: ACCUMULO-4095 Hacks on CustomNonBlockingServer to restore client address functionality.

2016-01-11 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/master e7fe96f2a -> 64713554b


ACCUMULO-4095 Hacks on CustomNonBlockingServer to restore client address 
functionality.

Closes apache/accumulo#63


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

Branch: refs/heads/master
Commit: 64713554b7c114088dcb7fd432e25bcd421cc04a
Parents: e7fe96f
Author: Josh Elser 
Authored: Fri Jan 8 00:49:44 2016 -0500
Committer: Josh Elser 
Committed: Mon Jan 11 14:23:25 2016 -0500

--
 .../server/rpc/CustomNonBlockingServer.java | 63 ++--
 1 file changed, 58 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/64713554/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
index f4737be..ae65c1e 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
@@ -16,30 +16,83 @@
  */
 package org.apache.accumulo.server.rpc;
 
+import java.io.IOException;
+import java.lang.reflect.Field;
 import java.net.Socket;
 import java.nio.channels.SelectionKey;
 
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.thrift.server.THsHaServer;
+import org.apache.thrift.server.TNonblockingServer;
+import org.apache.thrift.transport.TNonblockingServerTransport;
 import org.apache.thrift.transport.TNonblockingSocket;
 import org.apache.thrift.transport.TNonblockingTransport;
 
 /**
  * This class implements a custom non-blocking thrift server that stores the 
client address in thread-local storage for the invocation.
- *
  */
 public class CustomNonBlockingServer extends THsHaServer {
 
+  private final Field selectAcceptThreadField;
+
   public CustomNonBlockingServer(Args args) {
 super(args);
+
+try {
+  selectAcceptThreadField = 
TNonblockingServer.class.getDeclaredField("selectAcceptThread_");
+  selectAcceptThreadField.setAccessible(true);
+} catch (Exception e) {
+  throw new RuntimeException("Failed to access required field in Thrift 
code.", e);
+}
+  }
+
+  @Override
+  protected boolean startThreads() {
+// Yet another dirty/gross hack to get access to the client's address.
+
+// start the selector
+try {
+  // Hack in our SelectAcceptThread impl
+  SelectAcceptThread selectAcceptThread_ = new 
CustomSelectAcceptThread((TNonblockingServerTransport) serverTransport_);
+  // Set the private field before continuing.
+  selectAcceptThreadField.set(this, selectAcceptThread_);
+
+  selectAcceptThread_.start();
+  return true;
+} catch (IOException e) {
+  LOGGER.error("Failed to start selector thread!", e);
+  return false;
+} catch (IllegalAccessException | IllegalArgumentException e) {
+  throw new RuntimeException("Exception setting customer select thread in 
Thrift");
+}
   }
 
-  protected FrameBuffer createFrameBuffer(final TNonblockingTransport trans, 
final SelectionKey selectionKey, final AbstractSelectThread selectThread) {
-return new CustomAsyncFrameBuffer(trans, selectionKey, selectThread);
+  /**
+   * Custom wrapper around {@link 
org.apache.thrift.server.TNonblockingServer.SelectAcceptThread} to create our 
{@link CustomFrameBuffer}.
+   */
+  private class CustomSelectAcceptThread extends SelectAcceptThread {
+
+public CustomSelectAcceptThread(TNonblockingServerTransport 
serverTransport) throws IOException {
+  super(serverTransport);
+}
+
+@Override
+protected FrameBuffer createFrameBuffer(final TNonblockingTransport trans, 
final SelectionKey selectionKey, final AbstractSelectThread selectThread) {
+  if (processorFactory_.isAsyncProcessor()) {
+throw new IllegalStateException("This implementation does not support 
AsyncProcessors");
+  }
+
+  return new CustomFrameBuffer(trans, selectionKey, selectThread);
+}
   }
 
-  private class CustomAsyncFrameBuffer extends AsyncFrameBuffer {
+  /**
+   * Custom wrapper around {@link 
org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer} to extract the 
client's network location before accepting the
+   * request.
+   */
+  private class CustomFrameBuffer extends FrameBuffer {
 
-public CustomAsyncFrameBuffer(TNonblockingTransport trans, SelectionKey 
selectionKey, AbstractSelectThread select