accumulo git commit: ACCUMULO-4188 Fix PowerMock issue in ShellSetInstanceTest

2016-04-12 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/master a6133a6ae -> 584b81212


ACCUMULO-4188 Fix PowerMock issue in ShellSetInstanceTest

Instruct PowerMock to ignore javax.security.* classes in its classloader


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

Branch: refs/heads/master
Commit: 584b8121288c109945da62c97ea8727956de38bf
Parents: a6133a6
Author: Christopher Tubbs 
Authored: Tue Apr 12 17:15:23 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 17:15:23 2016 -0400

--
 .../test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/584b8121/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java
--
diff --git 
a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java 
b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java
index 4d2645b..331b183 100644
--- a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java
+++ b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java
@@ -55,10 +55,12 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 @RunWith(PowerMockRunner.class)
+@PowerMockIgnore("javax.security.*")
 @PrepareForTest({Shell.class, ZooUtil.class, ConfigSanityCheck.class})
 public class ShellSetInstanceTest {
   public static class TestOutputStream extends OutputStream {



[1/6] accumulo git commit: ACCUMULO-4186 Run newer findbugs with jdk7

2016-04-12 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/1.6 cf47ce2fd -> 666590567
  refs/heads/1.7 12ae485be -> d9e9d661f
  refs/heads/master 32a3beff0 -> a6133a6ae


ACCUMULO-4186 Run newer findbugs with jdk7

(Applies to 1.6 branch only)


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

Branch: refs/heads/1.6
Commit: 666590567652ad7e9336872e250da9db3e693406
Parents: cf47ce2
Author: Christopher Tubbs 
Authored: Tue Apr 12 14:59:01 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 14:59:01 2016 -0400

--
 pom.xml | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/66659056/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 09a4f4d..427fe30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1466,13 +1466,19 @@
   
 
 
-  jdk8
+  latest-findbugs
   
-[1.8,1.9)
+[1.7,)
   
   
 3.0.3
   
+
+
+  jdk8
+  
+[1.8,1.9)
+  
   
 
   



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

2016-04-12 Thread ctubbsii
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/a6133a6a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a6133a6a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a6133a6a

Branch: refs/heads/master
Commit: a6133a6ae936cc19aaae684c68f6e81c56e0a6dc
Parents: 32a3bef d9e9d66
Author: Christopher Tubbs 
Authored: Tue Apr 12 15:08:29 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 15:08:29 2016 -0400

--

--




[3/6] accumulo git commit: ACCUMULO-4186 Run newer findbugs with jdk7

2016-04-12 Thread ctubbsii
ACCUMULO-4186 Run newer findbugs with jdk7

(Applies to 1.6 branch only)


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

Branch: refs/heads/master
Commit: 666590567652ad7e9336872e250da9db3e693406
Parents: cf47ce2
Author: Christopher Tubbs 
Authored: Tue Apr 12 14:59:01 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 14:59:01 2016 -0400

--
 pom.xml | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/66659056/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 09a4f4d..427fe30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1466,13 +1466,19 @@
   
 
 
-  jdk8
+  latest-findbugs
   
-[1.8,1.9)
+[1.7,)
   
   
 3.0.3
   
+
+
+  jdk8
+  
+[1.8,1.9)
+  
   
 
   



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

2016-04-12 Thread ctubbsii
Merge branch '1.6' into 1.7


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

Branch: refs/heads/1.7
Commit: d9e9d661f13f752c6aa45e36e538ba094bd01352
Parents: 12ae485 6665905
Author: Christopher Tubbs 
Authored: Tue Apr 12 15:08:13 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 15:08:13 2016 -0400

--

--




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

2016-04-12 Thread ctubbsii
Merge branch '1.6' into 1.7


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

Branch: refs/heads/master
Commit: d9e9d661f13f752c6aa45e36e538ba094bd01352
Parents: 12ae485 6665905
Author: Christopher Tubbs 
Authored: Tue Apr 12 15:08:13 2016 -0400
Committer: Christopher Tubbs 
Committed: Tue Apr 12 15:08:13 2016 -0400

--

--




accumulo git commit: ACCUMULO-4173: Added HostRegexTableLoadBalancer that balances tablets for a table within a set of hosts

2016-04-12 Thread dlmarion
Repository: accumulo
Updated Branches:
  refs/heads/1.7 0f6e5ed55 -> 12ae485be


ACCUMULO-4173: Added HostRegexTableLoadBalancer that balances tablets for a 
table within a set of hosts


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

Branch: refs/heads/1.7
Commit: 12ae485bec187de60c4272c5e2424875ee39b2a5
Parents: 0f6e5ed
Author: Dave Marion 
Authored: Tue Apr 12 13:41:48 2016 -0400
Committer: Dave Marion 
Committed: Tue Apr 12 13:41:48 2016 -0400

--
 .../balancer/HostRegexTableLoadBalancer.java| 340 ++
 .../HostRegexTableLoadBalancerTest.java | 638 +++
 2 files changed, 978 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/12ae485b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
new file mode 100644
index 000..baf33c3
--- /dev/null
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -0,0 +1,340 @@
+/*
+ * 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.server.master.balancer;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.regex.Pattern;
+
+import org.apache.accumulo.core.client.admin.TableOperations;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.impl.KeyExtent;
+import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
+import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.master.state.TServerInstance;
+import org.apache.accumulo.server.master.state.TabletMigration;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This balancer creates groups of tablet servers using user-provided regular 
expressions over the tablet server hostnames. Then it delegates to the table
+ * balancer to balance the tablets within the resulting group of tablet 
servers. All tablet servers that do not match a regex are grouped into a 
default group.
+ * Regex properties for this balancer are specified as:
+ * table.custom.balancer.host.regex.tablename=regex
+ * Periodically (default 5m) this balancer will check to see if a tablet 
server is hosting tablets that it should not be according to the regex 
configuration.
+ * If this occurs then the offending tablets will be reassigned. This would 
cover the case where the configuration is changed and the master is restarted 
while
+ * the tablet servers are up. To change the out of bounds check time period, 
set the following property:
+ * table.custom.balancer.host.regex.oob.period=5m
+ * Periodically (default 1m) this balancer will regroup the set of current 
tablet servers into pools based on regexes applied to the tserver host names. 
This
+ * would cover the case of tservers dying or coming online. To change the host 
pool check time period, set the following property: 
+ * table.custom.balancer.host.regex.pool.check=5m
+ * Regex matching can be based on either the host name (default) or host ip 
address. To set this balancer to match the regular expressions to the tablet 
server
+ * IP address, then set 

accumulo git commit: Address PR comments

2016-04-12 Thread dlmarion
Repository: accumulo
Updated Branches:
  refs/heads/ACCUMULO-4173 9bef8b6c1 -> ac16962b7


Address PR comments


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

Branch: refs/heads/ACCUMULO-4173
Commit: ac16962b7450dc0c0732a0b1f3adec614ed7ac73
Parents: 9bef8b6
Author: Dave Marion 
Authored: Tue Apr 12 11:05:26 2016 -0400
Committer: Dave Marion 
Committed: Tue Apr 12 11:05:26 2016 -0400

--
 .../balancer/HostRegexTableLoadBalancer.java| 22 +---
 1 file changed, 14 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ac16962b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
index 9d92361..388fea7 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -43,15 +43,15 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * This balancer will create pools of tablet servers by grouping tablet 
servers that match a regex into the same pool and calling the balancer set on 
the table
- * to balance within the set of matching tablet servers. All tablet servers 
that do not match a regex are grouped into a default pool.
+ * This balancer creates groups of tablet servers using user-provided regular 
expressions over the tablet server hostnames. Then it delegates to the table
+ * balancer to balance the tablets within the resulting group of tablet 
servers. All tablet servers that do not match a regex are grouped into a 
default group.
  * Regex properties for this balancer are specified as:
  * table.custom.balancer.host.regex.tablename=regex
  * Periodically (default 5m) this balancer will check to see if a tablet 
server is hosting tablets that it should not be according to the regex 
configuration.
  * If this occurs then the offending tablets will be reassigned. This would 
cover the case where the configuration is changed and the master is restarted 
while
  * the tablet servers are up. To change the out of bounds check time period, 
set the following property:
  * table.custom.balancer.host.regex.oob.period=5m
- * Periodically (default 5m) this balancer will regroup the set of current 
tablet servers into pools based on regexes applied to the tserver host names. 
This
+ * Periodically (default 1m) this balancer will regroup the set of current 
tablet servers into pools based on regexes applied to the tserver host names. 
This
  * would cover the case of tservers dying or coming online. To change the host 
pool check time period, set the following property: 
  * table.custom.balancer.host.regex.pool.check=5m
  * Regex matching can be based on either the host name (default) or host ip 
address. To set this balancer to match the regular expressions to the tablet 
server
@@ -66,7 +66,7 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
   public static final String HOST_BALANCER_OOB_CHECK = 
Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + 
"balancer.host.regex.oob.period";
   private static final String HOST_BALANCER_OOB_DEFAULT = "5m";
   public static final String HOST_BALANCER_POOL_RECHECK_KEY = 
Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + 
"balancer.host.regex.pool.check";
-  private static final String HOST_BALANCER_POOL_RECHECK_DEFAULT = "5m";
+  private static final String HOST_BALANCER_POOL_RECHECK_DEFAULT = "1m";
   public static final String HOST_BALANCER_REGEX_USING_IPS = 
Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + "balancer.host.regex.is.ip";
   protected static final String DEFAULT_POOL = "HostTableLoadBalancer.ALL";
 
@@ -81,7 +81,8 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
   private Map> pools = 
new HashMap>();
 
   /**
-   * Group the set of current tservers by pool name. Tservers that don't match 
a regex are put into a default pool.
+   * Group the set of current tservers by pool name. Tservers that don't match 
a regex are put into a default pool. This could be expensive in the terms of the
+   * amount of time to recompute the groups, so 

[13/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/57423429
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/57423429
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/57423429

Branch: refs/heads/ACCUMULO-4173
Commit: 574234293147bbc63863d3210eb2baf94c5387f6
Parents: 0dd1d6a 2e4f320
Author: Keith Turner 
Authored: Fri Apr 1 13:00:21 2016 -0400
Committer: Keith Turner 
Committed: Fri Apr 1 13:00:21 2016 -0400

--
 core/src/main/findbugs/exclude-filter.xml   |   5 +
 .../core/file/blockfile/ABlockReader.java   |   2 +
 .../file/blockfile/impl/CachableBlockFile.java  |  31 ++-
 .../impl/SeekableByteArrayInputStream.java  | 141 
 .../core/file/rfile/MultiLevelIndex.java| 219 +--
 5 files changed, 308 insertions(+), 90 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/57423429/core/src/main/findbugs/exclude-filter.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/57423429/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/57423429/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
--



[15/39] accumulo git commit: ACCUMULO-4175 Move ITs to correct directory

2016-04-12 Thread dlmarion
ACCUMULO-4175 Move ITs to correct directory


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

Branch: refs/heads/ACCUMULO-4173
Commit: 7cefd872f9276ebb3a4be4cfcdda8f3112ccd250
Parents: f284027
Author: Christopher Tubbs 
Authored: Fri Apr 1 14:55:44 2016 -0400
Committer: Christopher Tubbs 
Committed: Fri Apr 1 14:57:10 2016 -0400

--
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 .../test/functional/SessionBlockVerifyIT.java   | 176 ---
 2 files changed, 176 insertions(+), 176 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7cefd872/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
--
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
 
b/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
new file mode 100644
index 000..05f304b
--- /dev/null
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
@@ -0,0 +1,176 @@
+/*
+ * 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+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.IteratorSetting;
+import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.admin.ActiveScan;
+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.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.io.Text;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * Verify that we have resolved blocking issue by ensuring that we have not 
lost scan sessions which we know to currently be running
+ */
+public class SessionBlockVerifyIT extends ScanSessionTimeOutIT {
+  private static final Logger log = 
LoggerFactory.getLogger(SessionBlockVerifyIT.class);
+
+  @Override
+  public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration 
hadoopCoreSite) {
+Map siteConfig = cfg.getSiteConfig();
+cfg.setNumTservers(1);
+siteConfig.put(Property.TSERV_SESSION_MAXIDLE.getKey(), 
getMaxIdleTimeString());
+siteConfig.put(Property.TSERV_READ_AHEAD_MAXCONCURRENT.getKey(), "11");
+cfg.setSiteConfig(siteConfig);
+  }
+
+  @Override
+  protected int defaultTimeoutSeconds() {
+return 60;
+  }
+
+  @Override
+  protected String getMaxIdleTimeString() {
+return "1s";
+  }
+
+  ExecutorService service = Executors.newFixedThreadPool(10);
+
+  @Test
+  public void run() throws Exception {
+Connector c = getConnector();
+String tableName = getUniqueNames(1)[0];
+c.tableOperations().create(tableName);
+
+BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
+
+for (int i = 0; i < 1000; i++) {
+  

[19/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/python/AccumuloProxy.py
--
diff --git a/proxy/src/main/python/AccumuloProxy.py 
b/proxy/src/main/python/AccumuloProxy.py
index 83c216c..19bd257 100644
--- a/proxy/src/main/python/AccumuloProxy.py
+++ b/proxy/src/main/python/AccumuloProxy.py
@@ -574,6 +574,36 @@ class Iface:
 """
 pass
 
+  def grantNamespacePermission(self, login, user, namespaceName, perm):
+"""
+Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+"""
+pass
+
+  def hasNamespacePermission(self, login, user, namespaceName, perm):
+"""
+Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+"""
+pass
+
+  def revokeNamespacePermission(self, login, user, namespaceName, perm):
+"""
+Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+"""
+pass
+
   def createBatchScanner(self, login, tableName, options):
 """
 Parameters:
@@ -710,6 +740,170 @@ class Iface:
 """
 pass
 
+  def systemNamespace(self):
+pass
+
+  def defaultNamespace(self):
+pass
+
+  def listNamespaces(self, login):
+"""
+Parameters:
+ - login
+"""
+pass
+
+  def namespaceExists(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def createNamespace(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def deleteNamespace(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def renameNamespace(self, login, oldNamespaceName, newNamespaceName):
+"""
+Parameters:
+ - login
+ - oldNamespaceName
+ - newNamespaceName
+"""
+pass
+
+  def setNamespaceProperty(self, login, namespaceName, property, value):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - property
+ - value
+"""
+pass
+
+  def removeNamespaceProperty(self, login, namespaceName, property):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - property
+"""
+pass
+
+  def getNamespaceProperties(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def namespaceIdMap(self, login):
+"""
+Parameters:
+ - login
+"""
+pass
+
+  def attachNamespaceIterator(self, login, namespaceName, setting, scopes):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - setting
+ - scopes
+"""
+pass
+
+  def removeNamespaceIterator(self, login, namespaceName, name, scopes):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - name
+ - scopes
+"""
+pass
+
+  def getNamespaceIteratorSetting(self, login, namespaceName, name, scope):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - name
+ - scope
+"""
+pass
+
+  def listNamespaceIterators(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def checkNamespaceIteratorConflicts(self, login, namespaceName, setting, 
scopes):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - setting
+ - scopes
+"""
+pass
+
+  def addNamespaceConstraint(self, login, namespaceName, constraintClassName):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - constraintClassName
+"""
+pass
+
+  def removeNamespaceConstraint(self, login, namespaceName, id):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - id
+"""
+pass
+
+  def listNamespaceConstraints(self, login, namespaceName):
+"""
+Parameters:
+ - login
+ - namespaceName
+"""
+pass
+
+  def testNamespaceClassLoad(self, login, namespaceName, className, 
asTypeName):
+"""
+Parameters:
+ - login
+ - namespaceName
+ - className
+ - asTypeName
+"""
+pass
+
 
 class Client(Iface):
   def __init__(self, iprot, oprot=None):
@@ -3050,6 +3244,125 @@ class Client(Iface):
   raise result.ouch3
 return
 
+  def grantNamespacePermission(self, login, user, namespaceName, perm):
+"""
+Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+"""
+self.send_grantNamespacePermission(login, user, namespaceName, perm)
+self.recv_grantNamespacePermission()
+
+  def send_grantNamespacePermission(self, login, user, namespaceName, perm):
+self._oprot.writeMessageBegin('grantNamespacePermission', 
TMessageType.CALL, self._seqid)
+args = grantNamespacePermission_args()
+args.login = login
+args.user = user
+args.namespaceName = namespaceName
+args.perm = perm
+args.write(self._oprot)
+self._oprot.writeMessageEnd()
+self._oprot.trans.flush()
+
+  def 

[12/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7

Conflicts:

core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java


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

Branch: refs/heads/ACCUMULO-4173
Commit: 2e4f32095f4da604ab1aa9ada0c679ce8997b024
Parents: f181cf6 2afc3dc
Author: Keith Turner 
Authored: Fri Apr 1 12:59:46 2016 -0400
Committer: Keith Turner 
Committed: Fri Apr 1 12:59:46 2016 -0400

--
 core/src/main/findbugs/exclude-filter.xml   |   5 +
 .../core/file/blockfile/ABlockReader.java   |   2 +
 .../file/blockfile/impl/CachableBlockFile.java  |  31 ++-
 .../impl/SeekableByteArrayInputStream.java  | 141 
 .../core/file/rfile/MultiLevelIndex.java| 219 +--
 5 files changed, 308 insertions(+), 90 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2e4f3209/core/src/main/findbugs/exclude-filter.xml
--
diff --cc core/src/main/findbugs/exclude-filter.xml
index aa854f0,88b7922..f5b84d9
--- a/core/src/main/findbugs/exclude-filter.xml
+++ b/core/src/main/findbugs/exclude-filter.xml
@@@ -15,88 -15,22 +15,93 @@@
limitations under the License.
  -->
  
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 +  
 +
 +
 +  
 +  
 +  
 +  
 +  
 +  
 +  
 +  
 +
 +  
 +  
 +
 +
 +  
 +
 +
 +
 +  
 +  
++
++
++
++  
++  
 +
 +
 +
 +
 +  
 +  
 +
 +
 +  
 +  
 +  
 +  
 +  
 +  
 +  
 +  
 +
 +
 +  
 +  
 +
 +  
 +  
 +
 +
 +
 +  
 +  
 +
 +
 +
 +  
 +  
 +
 +  
 +  
 +
 +
 +
 +
 +  
 +  
 +
 +
 +  
 +  
 +
 +
 +  
 +  
 +
 +
 +  
 +  
 +
 +
 +  
 +  
 +
 +
 +
 +  
  

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2e4f3209/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2e4f3209/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
--



[16/39] accumulo git commit: Merge remote-tracking branch 'ctubbsii/ACCUMULO-4175'

2016-04-12 Thread dlmarion
Merge remote-tracking branch 'ctubbsii/ACCUMULO-4175'


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

Branch: refs/heads/ACCUMULO-4173
Commit: ada31a9b8c87f817c5f5ce7135e369ef636dee2c
Parents: 5742342 7cefd87
Author: Christopher Tubbs 
Authored: Sat Apr 2 23:17:02 2016 -0400
Committer: Christopher Tubbs 
Committed: Sat Apr 2 23:17:02 2016 -0400

--
 test/pom.xml|  22 +++
 .../test/functional/SessionBlockVerifyIT.java   | 176 +++
 .../test/functional/SessionBlockVerifyIT.java   | 176 ---
 3 files changed, 198 insertions(+), 176 deletions(-)
--




[20/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
--
diff --git 
a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
 
b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
new file mode 100644
index 000..db1a380
--- /dev/null
+++ 
b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
@@ -0,0 +1,414 @@
+/*
+ * 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.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class NamespaceExistsException extends TException implements 
org.apache.thrift.TBase, java.io.Serializable, Cloneable, 
Comparable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new 
org.apache.thrift.protocol.TStruct("NamespaceExistsException");
+
+  private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new 
org.apache.thrift.protocol.TField("msg", 
org.apache.thrift.protocol.TType.STRING, (short)1);
+
+  private static final Map schemes = 
new HashMap();
+  static {
+schemes.put(StandardScheme.class, new 
NamespaceExistsExceptionStandardSchemeFactory());
+schemes.put(TupleScheme.class, new 
NamespaceExistsExceptionTupleSchemeFactory());
+  }
+
+  public String msg; // required
+
+  /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+MSG((short)1, "msg");
+
+private static final Map byName = new HashMap();
+
+static {
+  for (_Fields field : EnumSet.allOf(_Fields.class)) {
+byName.put(field.getFieldName(), field);
+  }
+}
+
+/**
+ * Find the _Fields constant that matches fieldId, or null if its not 
found.
+ */
+public static _Fields findByThriftId(int fieldId) {
+  switch(fieldId) {
+case 1: // MSG
+  return MSG;
+default:
+  return null;
+  }
+}
+
+/**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+public static _Fields findByThriftIdOrThrow(int fieldId) {
+  _Fields fields = findByThriftId(fieldId);
+  if (fields == null) throw new IllegalArgumentException("Field " + 
fieldId + " doesn't exist!");
+  return fields;
+}
+
+/**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+public static _Fields findByName(String name) {
+  return byName.get(name);
+}
+
+private final short _thriftId;
+private final String _fieldName;
+
+_Fields(short thriftId, String fieldName) {
+  _thriftId = thriftId;
+  _fieldName = fieldName;
+}
+
+public short 

[28/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/52318429
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52318429
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52318429

Branch: refs/heads/ACCUMULO-4173
Commit: 52318429a609ffa72fbce621134a111ef7bd4bac
Parents: 8839fe5 f7a24d7
Author: Josh Elser 
Authored: Tue Apr 5 11:19:48 2016 -0400
Committer: Josh Elser 
Committed: Tue Apr 5 11:23:01 2016 -0400

--
 .../core/client/impl/TabletServerBatchWriter.java  | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/52318429/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
--
diff --cc 
core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
index 35281d6,77d8307..459d230
--- 
a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
@@@ -843,10 -847,15 +845,15 @@@ public class TabletServerBatchWriter 
  try {
  
long count = 0;
-   for (List list : mutationBatch.values()) {
- count += list.size();
+ 
 -  Set tableIds = new TreeSet();
++  Set tableIds = new TreeSet<>();
+   for (Map.Entry entry : 
mutationBatch.entrySet()) {
+ count += entry.getValue().size();
+ tableIds.add(entry.getKey().getTableId());
}
-   String msg = "sending " + String.format("%,d", count) + " mutations 
to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location;
+ 
+   String msg = "sending " + String.format("%,d", count) + " mutations 
to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location
+   + " tids: [" + Joiner.on(',').join(tableIds) + ']';
Thread.currentThread().setName(msg);
  
Span span = Trace.start("sendMutations");



[21/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
--
diff --git 
a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java 
b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
index 1f4777f..150de3e 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
@@ -175,6 +175,12 @@ public class AccumuloProxy {
 
 public void revokeTablePermission(ByteBuffer login, String user, String 
table, TablePermission perm) throws AccumuloException, 
AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
+public void grantNamespacePermission(ByteBuffer login, String user, String 
namespaceName, NamespacePermission perm) throws AccumuloException, 
AccumuloSecurityException, org.apache.thrift.TException;
+
+public boolean hasNamespacePermission(ByteBuffer login, String user, 
String namespaceName, NamespacePermission perm) throws AccumuloException, 
AccumuloSecurityException, org.apache.thrift.TException;
+
+public void revokeNamespacePermission(ByteBuffer login, String user, 
String namespaceName, NamespacePermission perm) throws AccumuloException, 
AccumuloSecurityException, org.apache.thrift.TException;
+
 public String createBatchScanner(ByteBuffer login, String tableName, 
BatchScanOptions options) throws AccumuloException, AccumuloSecurityException, 
TableNotFoundException, org.apache.thrift.TException;
 
 public String createScanner(ByteBuffer login, String tableName, 
ScanOptions options) throws AccumuloException, AccumuloSecurityException, 
TableNotFoundException, org.apache.thrift.TException;
@@ -209,6 +215,46 @@ public class AccumuloProxy {
 
 public Key getFollowing(Key key, PartialKey part) throws 
org.apache.thrift.TException;
 
+public String systemNamespace() throws org.apache.thrift.TException;
+
+public String defaultNamespace() throws org.apache.thrift.TException;
+
+public List listNamespaces(ByteBuffer login) throws 
AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+
+public boolean namespaceExists(ByteBuffer login, String namespaceName) 
throws AccumuloException, AccumuloSecurityException, 
org.apache.thrift.TException;
+
+public void createNamespace(ByteBuffer login, String namespaceName) throws 
AccumuloException, AccumuloSecurityException, NamespaceExistsException, 
org.apache.thrift.TException;
+
+public void deleteNamespace(ByteBuffer login, String namespaceName) throws 
AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, 
NamespaceNotEmptyException, org.apache.thrift.TException;
+
+public void renameNamespace(ByteBuffer login, String oldNamespaceName, 
String newNamespaceName) throws AccumuloException, AccumuloSecurityException, 
NamespaceNotFoundException, NamespaceExistsException, 
org.apache.thrift.TException;
+
+public void setNamespaceProperty(ByteBuffer login, String namespaceName, 
String property, String value) throws AccumuloException, 
AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public void removeNamespaceProperty(ByteBuffer login, String 
namespaceName, String property) throws AccumuloException, 
AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public Map getNamespaceProperties(ByteBuffer login, String 
namespaceName) throws AccumuloException, AccumuloSecurityException, 
NamespaceNotFoundException, org.apache.thrift.TException;
+
+public Map namespaceIdMap(ByteBuffer login) throws 
AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+
+public void attachNamespaceIterator(ByteBuffer login, String 
namespaceName, IteratorSetting setting, Set scopes) throws 
AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public void removeNamespaceIterator(ByteBuffer login, String 
namespaceName, String name, Set scopes) throws 
AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public IteratorSetting getNamespaceIteratorSetting(ByteBuffer login, 
String namespaceName, String name, IteratorScope scope) throws 
AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public Map listNamespaceIterators(ByteBuffer 
login, String namespaceName) throws AccumuloException, 
AccumuloSecurityException, NamespaceNotFoundException, 
org.apache.thrift.TException;
+
+public void checkNamespaceIteratorConflicts(ByteBuffer login, String 
namespaceName, IteratorSetting setting, Set scopes) throws 
AccumuloException, AccumuloSecurityException, 

[33/39] accumulo git commit: ACCUMULO-4182 Update travis-ci configuration

2016-04-12 Thread dlmarion
ACCUMULO-4182 Update travis-ci configuration

* Support 1.6 branch builds
* Try building with multiple JDKs


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

Branch: refs/heads/ACCUMULO-4173
Commit: cf47ce2fdd0460ad44c821fd3dce276847226de1
Parents: b8084af
Author: Christopher Tubbs 
Authored: Thu Apr 7 14:27:53 2016 -0400
Committer: Christopher Tubbs 
Committed: Thu Apr 7 14:27:53 2016 -0400

--
 .travis.yml | 21 +
 1 file changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cf47ce2f/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..e4626ce
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,21 @@
+#  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.
+language: java
+jdk:
+  - openjdk6
+  - openjdk7
+  - oraclejdk7
+  - oraclejdk8
+script: mvn clean verify -DskipITs



[39/39] accumulo git commit: Merge branch 'master' into ACCUMULO-4173

2016-04-12 Thread dlmarion
Merge branch 'master' into ACCUMULO-4173


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

Branch: refs/heads/ACCUMULO-4173
Commit: 9bef8b6c1ef488dcbd6cdcdca13c087e4b17ecb0
Parents: d745e7c 25b99c2
Author: Dave Marion 
Authored: Tue Apr 12 09:48:21 2016 -0400
Committer: Dave Marion 
Committed: Tue Apr 12 09:48:21 2016 -0400

--
 .travis.yml | 4 +-
 core/src/main/findbugs/exclude-filter.xml   | 5 +
 .../client/impl/TabletServerBatchWriter.java|13 +-
 .../core/file/blockfile/ABlockReader.java   | 2 +
 .../file/blockfile/impl/CachableBlockFile.java  |31 +-
 .../impl/SeekableByteArrayInputStream.java  |   141 +
 .../core/file/rfile/MultiLevelIndex.java|   219 +-
 proxy/examples/python/TestNamespace.py  |   172 +
 proxy/src/main/cpp/AccumuloProxy.cpp| 33610 ---
 proxy/src/main/cpp/AccumuloProxy.h  |  5162 +-
 .../main/cpp/AccumuloProxy_server.skeleton.cpp  |   115 +
 proxy/src/main/cpp/proxy_types.cpp  |   315 +
 proxy/src/main/cpp/proxy_types.h|   166 +
 .../org/apache/accumulo/proxy/ProxyServer.java  |   289 +
 .../accumulo/proxy/thrift/AccumuloProxy.java| 88369 +++--
 .../proxy/thrift/NamespaceExistsException.java  |   414 +
 .../thrift/NamespaceNotEmptyException.java  |   414 +
 .../thrift/NamespaceNotFoundException.java  |   414 +
 .../proxy/thrift/NamespacePermission.java   |82 +
 proxy/src/main/python/AccumuloProxy-remote  |   161 +
 proxy/src/main/python/AccumuloProxy.py  | 15767 ++-
 proxy/src/main/python/ttypes.py |   239 +
 proxy/src/main/ruby/accumulo_proxy.rb   |  1740 +-
 proxy/src/main/ruby/proxy_types.rb  |83 +
 proxy/src/main/thrift/proxy.thrift  |61 +-
 .../apache/accumulo/tserver/InMemoryMap.java|23 +-
 .../org/apache/accumulo/tserver/MemKey.java |10 +-
 .../accumulo/tserver/MemKeyComparator.java  | 2 +-
 .../org/apache/accumulo/tserver/NativeMap.java  |27 +-
 .../PartialMutationSkippingIterator.java| 2 +-
 test/pom.xml|22 +
 .../org/apache/accumulo/test/InMemoryMapIT.java |   367 +
 .../test/functional/SessionBlockVerifyIT.java   |   176 +
 .../accumulo/test/proxy/SimpleProxyBase.java|   407 +-
 .../proxy/TestProxyNamespaceOperations.java |   165 +
 .../test/proxy/TestProxySecurityOperations.java |13 +
 .../test/functional/SessionBlockVerifyIT.java   |   176 -
 37 files changed, 103142 insertions(+), 46236 deletions(-)
--




[35/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/35252694
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/35252694
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/35252694

Branch: refs/heads/ACCUMULO-4173
Commit: 35252694b9f17fd5aec119b9799b641d665d92d9
Parents: 16c36b8 0cb15fa
Author: Christopher Tubbs 
Authored: Thu Apr 7 14:31:15 2016 -0400
Committer: Christopher Tubbs 
Committed: Thu Apr 7 14:31:15 2016 -0400

--
 .travis.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--




[07/39] accumulo git commit: Merge branch 'master' into ACCUMULO-4173

2016-04-12 Thread dlmarion
Merge branch 'master' into ACCUMULO-4173


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

Branch: refs/heads/ACCUMULO-4173
Commit: c77a5779c775d53e7b0c5f90a96d3d74c7b69235
Parents: fafcefd 02450e4
Author: Dave Marion 
Authored: Thu Mar 31 16:37:15 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 16:37:15 2016 -0400

--
 assemble/conf/templates/accumulo-env.sh |  2 +-
 .../org/apache/accumulo/core/conf/Property.java |  3 +-
 .../apache/accumulo/tserver/TabletServer.java   | 29 ++--
 .../tserver/log/TabletServerLogger.java | 11 ++--
 .../start/classloader/vfs/ContextManager.java   |  7 +++--
 5 files changed, 23 insertions(+), 29 deletions(-)
--




[03/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/173d80e1
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/173d80e1
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/173d80e1

Branch: refs/heads/ACCUMULO-4173
Commit: 173d80e11c2e6e99f26fd42f1a4c6726fe926ae5
Parents: 1d49030 cd5eb1f
Author: Dave Marion 
Authored: Thu Mar 31 14:54:32 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 14:54:32 2016 -0400

--
 assemble/conf/templates/accumulo-env.sh |  2 +-
 .../apache/accumulo/tserver/TabletServer.java   | 26 +---
 .../start/classloader/vfs/ContextManager.java   |  7 --
 3 files changed, 12 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/173d80e1/assemble/conf/templates/accumulo-env.sh
--
diff --cc assemble/conf/templates/accumulo-env.sh
index 205bd6c,42633a7..2ad753a
--- a/assemble/conf/templates/accumulo-env.sh
+++ b/assemble/conf/templates/accumulo-env.sh
@@@ -48,10 -48,8 +48,10 @@@ test -z "$ACCUMULO_TSERVER_OPTS" && exp
  test -z "$ACCUMULO_MASTER_OPTS"  && export ACCUMULO_MASTER_OPTS="${POLICY} 
${masterHigh_masterLow}"
  test -z "$ACCUMULO_MONITOR_OPTS" && export ACCUMULO_MONITOR_OPTS="${POLICY} 
${monitorHigh_monitorLow}"
  test -z "$ACCUMULO_GC_OPTS"  && export ACCUMULO_GC_OPTS="${gcHigh_gcLow}"
 +test -z "$ACCUMULO_SHELL_OPTS"   && export 
ACCUMULO_SHELL_OPTS="${shellHigh_shellLow}"
- test -z "$ACCUMULO_GENERAL_OPTS" && export 
ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC 
-XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true"
+ test -z "$ACCUMULO_GENERAL_OPTS" && export 
ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC 
-XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true 
-XX:+CMSClassUnloadingEnabled"
  test -z "$ACCUMULO_OTHER_OPTS"   && export 
ACCUMULO_OTHER_OPTS="${otherHigh_otherLow}"
 +test -z "${ACCUMULO_PID_DIR}"&& export 
ACCUMULO_PID_DIR="${ACCUMULO_HOME}/run"
  # what do when the JVM runs out of heap memory
  export ACCUMULO_KILL_CMD='kill -9 %p'
  

http://git-wip-us.apache.org/repos/asf/accumulo/blob/173d80e1/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index d19dfa9,eabf51d..b044b3e
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -2753,25 -2782,10 +2753,11 @@@ public class TabletServer extends Accum
  Runnable contextCleaner = new Runnable() {
@Override
public void run() {
- ArrayList extents;
- 
- synchronized (onlineTablets) {
-   extents = new ArrayList(onlineTablets.keySet());
- }
- 
- Set tables = new HashSet();
- 
- for (KeyExtent keyExtent : extents) {
-   tables.add(keyExtent.getTableId());
- }
- 
- HashSet contexts = new HashSet();
- 
- for (String tableid : tables) {
-   String context = getTableConfiguration(new KeyExtent(tableid, null, 
null)).get(Property.TABLE_CLASSPATH);
-   if (!context.equals("")) {
- contexts.add(context);
-   }
 -Set contextProperties = 
getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY).keySet();
++Set contextProperties = 
getServerConfigurationFactory().getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY)
++.keySet();
+ Set configuredContexts = new HashSet();
+ for (String prop : contextProperties) {
+   
configuredContexts.add(prop.substring(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.name().length()));
  }
  
  try {



[06/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/02450e4f
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/02450e4f
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/02450e4f

Branch: refs/heads/ACCUMULO-4173
Commit: 02450e4f60f41ea52ffed7103459c252e8654630
Parents: 173d80e 2b286ba
Author: Dave Marion 
Authored: Thu Mar 31 16:34:09 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 16:34:09 2016 -0400

--
 .../java/org/apache/accumulo/core/conf/Property.java |  3 +--
 .../java/org/apache/accumulo/tserver/TabletServer.java   |  3 ++-
 .../apache/accumulo/tserver/log/TabletServerLogger.java  | 11 ---
 3 files changed, 11 insertions(+), 6 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/accumulo/blob/02450e4f/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/02450e4f/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index b76b9cd,c7b6c98..1c9c5b9
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@@ -152,17 -146,19 +155,18 @@@ public class TabletServerLogger 
  this.flushCounter = flushCounter;
  this.retryFactory = retryFactory;
  this.retry = null;
+ this.maxAge = maxAge;
}
  
 -  private int initializeLoggers(final List copy) throws 
IOException {
 -final int[] result = {-1};
 -testLockAndRun(logSetLock, new TestCallWithWriteLock() {
 +  private DfsLogger initializeLoggers(final AtomicInteger logIdOut) throws 
IOException {
 +final AtomicReference result = new 
AtomicReference();
 +testLockAndRun(logIdLock, new TestCallWithWriteLock() {
@Override
boolean test() {
 -copy.clear();
 -copy.addAll(loggers);
 -if (!loggers.isEmpty())
 -  result[0] = logSetId.get();
 -return loggers.isEmpty();
 +result.set(currentLog);
 +if (currentLog != null)
 +  logIdOut.set(logId.get());
 +return currentLog == null;
}
  
@Override
@@@ -209,25 -200,18 +213,26 @@@
  }
  
  try {
 -  DfsLogger alog = new DfsLogger(tserver.getServerConfig(), syncCounter, 
flushCounter);
 -  alog.open(tserver.getClientAddressString());
 -  loggers.add(alog);
 -  logSetId.incrementAndGet();
 -
 -  // When we successfully create a WAL, make sure to reset the Retry.
 -  if (null != retry) {
 -retry = null;
 +  startLogMaker();
 +  Object next = nextLog.take();
 +  if (next instanceof Exception) {
 +throw (Exception) next;
}
 +  if (next instanceof DfsLogger) {
 +currentLog = (DfsLogger) next;
 +logId.incrementAndGet();
 +log.info("Using next log " + currentLog.getFileName());
 +
 +// When we successfully create a WAL, make sure to reset the Retry.
 +if (null != retry) {
 +  retry = null;
 +}
  
 -  this.createTime = System.currentTimeMillis();
 -  return;
++this.createTime = System.currentTimeMillis();
 +return;
 +  } else {
 +throw new RuntimeException("Error: unexpected type seen: " + next);
 +  }
  } catch (Exception t) {
if (null == retry) {
  retry = retryFactory.create();
@@@ -434,12 -363,12 +439,12 @@@
  });
}
  }
- // if the log gets too big, reset it .. grab the write lock first
+ // if the log gets too big or too old, reset it .. grab the write lock 
first
  logSizeEstimate.addAndGet(4 * 3); // event, tid, seq overhead
 -testLockAndRun(logSetLock, new TestCallWithWriteLock() {
 +testLockAndRun(logIdLock, new TestCallWithWriteLock() {
@Override
boolean test() {
- return logSizeEstimate.get() > maxSize;
+ return (logSizeEstimate.get() > maxSize) || 
((System.currentTimeMillis() - createTime) > maxAge);
}
  
@Override



[11/39] accumulo git commit: ACCUMULO-4164 Avoid copying rfile index when in cache. Avoid sync when deserializing index.

2016-04-12 Thread dlmarion
ACCUMULO-4164 Avoid copying rfile index when in cache.  Avoid sync when 
deserializing index.


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

Branch: refs/heads/ACCUMULO-4173
Commit: 2afc3dc87d158667da72a8959726bce62de5dee6
Parents: 41e002d
Author: Keith Turner 
Authored: Fri Apr 1 08:43:48 2016 -0400
Committer: Keith Turner 
Committed: Fri Apr 1 12:56:40 2016 -0400

--
 .../core/file/blockfile/ABlockReader.java   |   2 +
 .../file/blockfile/impl/CachableBlockFile.java  |  45 ++--
 .../impl/SeekableByteArrayInputStream.java  | 141 
 .../core/file/rfile/MultiLevelIndex.java| 219 +--
 4 files changed, 311 insertions(+), 96 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2afc3dc8/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java 
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
index 8df2469..9d7a01a 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
@@ -51,4 +51,6 @@ public interface ABlockReader extends DataInput {
   int getPosition();
 
T getIndex(Class clazz);
+
+  byte[] getBuffer();
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2afc3dc8/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
 
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 4d65c9f..7496202 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -70,21 +70,25 @@ public class CachableBlockFile {
   _bc = new BCFile.Writer(fsout, compressAlgor, conf, false, 
accumuloConfiguration);
 }
 
+@Override
 public ABlockWriter prepareMetaBlock(String name) throws IOException {
   _bw = new BlockWrite(_bc.prepareMetaBlock(name));
   return _bw;
 }
 
+@Override
 public ABlockWriter prepareMetaBlock(String name, String compressionName) 
throws IOException {
   _bw = new BlockWrite(_bc.prepareMetaBlock(name, compressionName));
   return _bw;
 }
 
+@Override
 public ABlockWriter prepareDataBlock() throws IOException {
   _bw = new BlockWrite(_bc.prepareDataBlock());
   return _bw;
 }
 
+@Override
 public void close() throws IOException {
 
   _bw.close();
@@ -369,6 +373,7 @@ public class CachableBlockFile {
  * NOTE: In the case of multi-read threads: This method can do redundant 
work where an entry is read from disk and other threads check the cache before 
it
  * has been inserted.
  */
+@Override
 public BlockRead getMetaBlock(String blockName) throws IOException {
   String _lookup = this.fileName + "M" + blockName;
   return getBlock(_lookup, _iCache, new MetaBlockLoader(blockName, 
accumuloConfiguration));
@@ -388,6 +393,7 @@ public class CachableBlockFile {
  * has been inserted.
  */
 
+@Override
 public BlockRead getDataBlock(int blockIndex) throws IOException {
   String _lookup = this.fileName + "O" + blockIndex;
   return getBlock(_lookup, _dCache, new OffsetBlockLoader(blockIndex));
@@ -400,6 +406,7 @@ public class CachableBlockFile {
   return getBlock(_lookup, _dCache, new RawBlockLoader(offset, 
compressedSize, rawSize));
 }
 
+@Override
 public synchronized void close() throws IOException {
   if (closed)
 return;
@@ -416,30 +423,6 @@ public class CachableBlockFile {
 
   }
 
-  static class SeekableByteArrayInputStream extends ByteArrayInputStream {
-
-public SeekableByteArrayInputStream(byte[] buf) {
-  super(buf);
-}
-
-public SeekableByteArrayInputStream(byte buf[], int offset, int length) {
-  super(buf, offset, length);
-  throw new UnsupportedOperationException("Seek code assumes offset is 
zero"); // do not need this constructor, documenting that seek will not work
-   
// unless offset it kept track of
-}
-
-public void seek(int position) {
-  if (pos < 0 || 

[10/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
Merge branch '1.7'

Conflicts:

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


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

Branch: refs/heads/ACCUMULO-4173
Commit: 0dd1d6a54f8ff25188e695c1fca8f1139559
Parents: 02450e4 f181cf6
Author: Josh Elser 
Authored: Fri Apr 1 12:52:15 2016 -0400
Committer: Josh Elser 
Committed: Fri Apr 1 12:52:15 2016 -0400

--
 .../apache/accumulo/tserver/InMemoryMap.java|  23 +-
 .../org/apache/accumulo/tserver/MemKey.java |  10 +-
 .../accumulo/tserver/MemKeyComparator.java  |   2 +-
 .../org/apache/accumulo/tserver/NativeMap.java  |  27 +-
 .../PartialMutationSkippingIterator.java|   2 +-
 .../org/apache/accumulo/test/InMemoryMapIT.java | 361 +++
 6 files changed, 401 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0dd1d6a5/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index f5141ff,72f84b5..1b02f14
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@@ -91,58 -79,43 +92,65 @@@ public class InMemoryMap 
  
private Map lggroups;
  
 +  private static Pair 
getSampler(AccumuloConfiguration config) {
 +try {
 +  SamplerConfigurationImpl sampleConfig = 
SamplerConfigurationImpl.newSamplerConfig(config);
 +  if (sampleConfig == null) {
 +return new Pair<>(null, null);
 +  }
 +
 +  return new Pair<>(sampleConfig, SamplerFactory.newSampler(sampleConfig, 
config));
 +} catch (IOException e) {
 +  throw new RuntimeException(e);
 +}
 +  }
 +
+   public static final String TYPE_NATIVE_MAP_WRAPPER = "NativeMapWrapper";
+   public static final String TYPE_DEFAULT_MAP = "DefaultMap";
+   public static final String TYPE_LOCALITY_GROUP_MAP = "LocalityGroupMap";
+   public static final String TYPE_LOCALITY_GROUP_MAP_NATIVE = 
"LocalityGroupMap with native";
+ 
 -  public InMemoryMap(boolean useNativeMap, String memDumpDir) {
 -this(new HashMap(), useNativeMap, memDumpDir);
 +  private AtomicReference> samplerRef 
= new AtomicReference<>(null);
 +
 +  private AccumuloConfiguration config;
 +
 +  // defer creating sampler until first write. This was done because an empty 
sample map configured with no sampler will not flush after a user changes sample
 +  // config.
 +  private Sampler getOrCreateSampler() {
 +Pair pair = samplerRef.get();
 +if (pair == null) {
 +  pair = getSampler(config);
 +  if (!samplerRef.compareAndSet(null, pair)) {
 +pair = samplerRef.get();
 +  }
 +}
 +
 +return pair.getSecond();
}
  
 -  public InMemoryMap(Map lggroups, boolean 
useNativeMap, String memDumpDir) {
 -this.memDumpDir = memDumpDir;
 -this.lggroups = lggroups;
 +  public InMemoryMap(AccumuloConfiguration config) throws 
LocalityGroupConfigurationError {
 +
 +boolean useNativeMap = 
config.getBoolean(Property.TSERV_NATIVEMAP_ENABLED);
 +
 +this.memDumpDir = config.get(Property.TSERV_MEMDUMP_DIR);
 +this.lggroups = LocalityGroupUtil.getLocalityGroups(config);
 +
 +this.config = config;
 +
 +SimpleMap allMap;
 +SimpleMap sampleMap;
  
  if (lggroups.size() == 0) {
 -  map = newMap(useNativeMap);
 +  allMap = newMap(useNativeMap);
 +  sampleMap = newMap(useNativeMap);
+   mapType = useNativeMap ? TYPE_NATIVE_MAP_WRAPPER : TYPE_DEFAULT_MAP;
  } else {
 -  map = new LocalityGroupMap(lggroups, useNativeMap);
 +  allMap = new LocalityGroupMap(lggroups, useNativeMap);
 +  sampleMap = new LocalityGroupMap(lggroups, useNativeMap);
+   mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP : 
TYPE_LOCALITY_GROUP_MAP_NATIVE;
  }
 -  }
  
 -  /**
 -   * Description of the type of SimpleMap that is created.
 -   * 
 -   * If no locality groups are present, the SimpleMap is either 
TYPE_DEFAULT_MAP or TYPE_NATIVE_MAP_WRAPPER. If there is one more locality 
groups, then the
 -   * InMemoryMap has an array for simple maps that either contain either 
TYPE_LOCALITY_GROUP_MAP which contains DefaultMaps or 
TYPE_LOCALITY_GROUP_MAP_NATIVE
 -   * which contains NativeMapWrappers.
 -   *
 -   * @return String that describes the Map type
 -   

[31/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
Merge branch '1.7'

Conflicts:

server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java


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

Branch: refs/heads/ACCUMULO-4173
Commit: aecfbd5c720d11a9f83912d996d94ab97f4a2423
Parents: 5231842 eb6a038
Author: Josh Elser 
Authored: Thu Apr 7 12:33:51 2016 -0400
Committer: Josh Elser 
Committed: Thu Apr 7 12:33:51 2016 -0400

--
 .../java/org/apache/accumulo/tserver/InMemoryMap.java |  2 +-
 .../main/java/org/apache/accumulo/test/InMemoryMapIT.java | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/aecfbd5c/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 1b02f14,c2bf890..ca4719d
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@@ -110,47 -84,38 +110,47 @@@ public class InMemoryMap 
public static final String TYPE_LOCALITY_GROUP_MAP = "LocalityGroupMap";
public static final String TYPE_LOCALITY_GROUP_MAP_NATIVE = 
"LocalityGroupMap with native";
  
 -  public InMemoryMap(boolean useNativeMap, String memDumpDir) {
 -this(new HashMap(), useNativeMap, memDumpDir);
 +  private AtomicReference> samplerRef 
= new AtomicReference<>(null);
 +
 +  private AccumuloConfiguration config;
 +
 +  // defer creating sampler until first write. This was done because an empty 
sample map configured with no sampler will not flush after a user changes sample
 +  // config.
 +  private Sampler getOrCreateSampler() {
 +Pair pair = samplerRef.get();
 +if (pair == null) {
 +  pair = getSampler(config);
 +  if (!samplerRef.compareAndSet(null, pair)) {
 +pair = samplerRef.get();
 +  }
 +}
 +
 +return pair.getSecond();
}
  
 -  public InMemoryMap(Map lggroups, boolean 
useNativeMap, String memDumpDir) {
 -this.memDumpDir = memDumpDir;
 -this.lggroups = lggroups;
 +  public InMemoryMap(AccumuloConfiguration config) throws 
LocalityGroupConfigurationError {
 +
 +boolean useNativeMap = 
config.getBoolean(Property.TSERV_NATIVEMAP_ENABLED);
 +
 +this.memDumpDir = config.get(Property.TSERV_MEMDUMP_DIR);
 +this.lggroups = LocalityGroupUtil.getLocalityGroups(config);
 +
 +this.config = config;
 +
 +SimpleMap allMap;
 +SimpleMap sampleMap;
  
  if (lggroups.size() == 0) {
 -  map = newMap(useNativeMap);
 +  allMap = newMap(useNativeMap);
 +  sampleMap = newMap(useNativeMap);
mapType = useNativeMap ? TYPE_NATIVE_MAP_WRAPPER : TYPE_DEFAULT_MAP;
  } else {
 -  map = new LocalityGroupMap(lggroups, useNativeMap);
 +  allMap = new LocalityGroupMap(lggroups, useNativeMap);
 +  sampleMap = new LocalityGroupMap(lggroups, useNativeMap);
-   mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP : 
TYPE_LOCALITY_GROUP_MAP_NATIVE;
+   mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP_NATIVE : 
TYPE_LOCALITY_GROUP_MAP;
  }
 -  }
  
 -  /**
 -   * Description of the type of SimpleMap that is created.
 -   * 
 -   * If no locality groups are present, the SimpleMap is either 
TYPE_DEFAULT_MAP or TYPE_NATIVE_MAP_WRAPPER. If there is one more locality 
groups, then the
 -   * InMemoryMap has an array for simple maps that either contain either 
TYPE_LOCALITY_GROUP_MAP which contains DefaultMaps or 
TYPE_LOCALITY_GROUP_MAP_NATIVE
 -   * which contains NativeMapWrappers.
 -   *
 -   * @return String that describes the Map type
 -   */
 -  public String getMapType() {
 -return mapType;
 -  }
 -
 -  public InMemoryMap(AccumuloConfiguration config) throws 
LocalityGroupConfigurationError {
 -this(LocalityGroupUtil.getLocalityGroups(config), 
config.getBoolean(Property.TSERV_NATIVEMAP_ENABLED), 
config.get(Property.TSERV_MEMDUMP_DIR));
 +map = new SampleMap(allMap, sampleMap);
}
  
private static SimpleMap newMap(boolean useNativeMap) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aecfbd5c/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java
--
diff --cc test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java
index 

[32/39] accumulo git commit: ACCUMULO-4180 Close the PR

2016-04-12 Thread dlmarion
ACCUMULO-4180 Close the PR

Closes apache/accumulo#88


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

Branch: refs/heads/ACCUMULO-4173
Commit: 16c36b850b9c0b3b27c7c3307bb019d1eee1130a
Parents: aecfbd5
Author: Josh Elser 
Authored: Thu Apr 7 12:34:03 2016 -0400
Committer: Josh Elser 
Committed: Thu Apr 7 12:34:03 2016 -0400

--

--




[37/39] accumulo git commit: Merge branch '1.7'

2016-04-12 Thread dlmarion
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/25b99c25
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/25b99c25
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/25b99c25

Branch: refs/heads/ACCUMULO-4173
Commit: 25b99c258be3768d144338548d1f14aeed4b8767
Parents: 3525269 0f6e5ed
Author: Josh Elser 
Authored: Mon Apr 11 13:54:11 2016 -0400
Committer: Josh Elser 
Committed: Mon Apr 11 13:54:11 2016 -0400

--

--




[23/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/cpp/AccumuloProxy.h
--
diff --git a/proxy/src/main/cpp/AccumuloProxy.h 
b/proxy/src/main/cpp/AccumuloProxy.h
index a14fda9..429cf55 100644
--- a/proxy/src/main/cpp/AccumuloProxy.h
+++ b/proxy/src/main/cpp/AccumuloProxy.h
@@ -97,6 +97,9 @@ class AccumuloProxyIf {
   virtual void listLocalUsers(std::set & _return, const 
std::string& login) = 0;
   virtual void revokeSystemPermission(const std::string& login, const 
std::string& user, const SystemPermission::type perm) = 0;
   virtual void revokeTablePermission(const std::string& login, const 
std::string& user, const std::string& table, const TablePermission::type perm) 
= 0;
+  virtual void grantNamespacePermission(const std::string& login, const 
std::string& user, const std::string& namespaceName, const 
NamespacePermission::type perm) = 0;
+  virtual bool hasNamespacePermission(const std::string& login, const 
std::string& user, const std::string& namespaceName, const 
NamespacePermission::type perm) = 0;
+  virtual void revokeNamespacePermission(const std::string& login, const 
std::string& user, const std::string& namespaceName, const 
NamespacePermission::type perm) = 0;
   virtual void createBatchScanner(std::string& _return, const std::string& 
login, const std::string& tableName, const BatchScanOptions& options) = 0;
   virtual void createScanner(std::string& _return, const std::string& login, 
const std::string& tableName, const ScanOptions& options) = 0;
   virtual bool hasNext(const std::string& scanner) = 0;
@@ -114,6 +117,26 @@ class AccumuloProxyIf {
   virtual void closeConditionalWriter(const std::string& conditionalWriter) = 
0;
   virtual void getRowRange(Range& _return, const std::string& row) = 0;
   virtual void getFollowing(Key& _return, const Key& key, const 
PartialKey::type part) = 0;
+  virtual void systemNamespace(std::string& _return) = 0;
+  virtual void defaultNamespace(std::string& _return) = 0;
+  virtual void listNamespaces(std::vector & _return, const 
std::string& login) = 0;
+  virtual bool namespaceExists(const std::string& login, const std::string& 
namespaceName) = 0;
+  virtual void createNamespace(const std::string& login, const std::string& 
namespaceName) = 0;
+  virtual void deleteNamespace(const std::string& login, const std::string& 
namespaceName) = 0;
+  virtual void renameNamespace(const std::string& login, const std::string& 
oldNamespaceName, const std::string& newNamespaceName) = 0;
+  virtual void setNamespaceProperty(const std::string& login, const 
std::string& namespaceName, const std::string& property, const std::string& 
value) = 0;
+  virtual void removeNamespaceProperty(const std::string& login, const 
std::string& namespaceName, const std::string& property) = 0;
+  virtual void getNamespaceProperties(std::map & 
_return, const std::string& login, const std::string& namespaceName) = 0;
+  virtual void namespaceIdMap(std::map & _return, 
const std::string& login) = 0;
+  virtual void attachNamespaceIterator(const std::string& login, const 
std::string& namespaceName, const IteratorSetting& setting, const 
std::set & scopes) = 0;
+  virtual void removeNamespaceIterator(const std::string& login, const 
std::string& namespaceName, const std::string& name, const 
std::set & scopes) = 0;
+  virtual void getNamespaceIteratorSetting(IteratorSetting& _return, const 
std::string& login, const std::string& namespaceName, const std::string& name, 
const IteratorScope::type scope) = 0;
+  virtual void listNamespaceIterators(std::map & _return, const std::string& login, const 
std::string& namespaceName) = 0;
+  virtual void checkNamespaceIteratorConflicts(const std::string& login, const 
std::string& namespaceName, const IteratorSetting& setting, const 
std::set & scopes) = 0;
+  virtual int32_t addNamespaceConstraint(const std::string& login, const 
std::string& namespaceName, const std::string& constraintClassName) = 0;
+  virtual void removeNamespaceConstraint(const std::string& login, const 
std::string& namespaceName, const int32_t id) = 0;
+  virtual void listNamespaceConstraints(std::map & 
_return, const std::string& login, const std::string& namespaceName) = 0;
+  virtual bool testNamespaceClassLoad(const std::string& login, const 
std::string& namespaceName, const std::string& className, const std::string& 
asTypeName) = 0;
 };
 
 class AccumuloProxyIfFactory {
@@ -330,6 +353,16 @@ class AccumuloProxyNull : virtual public AccumuloProxyIf {
   void revokeTablePermission(const std::string& /* login */, const 
std::string& /* user */, const std::string& /* table */, const 
TablePermission::type /* perm */) {
 return;
   }
+  void grantNamespacePermission(const std::string& /* login */, const 
std::string& /* user */, const std::string& /* namespaceName */, 

[22/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/cpp/AccumuloProxy_server.skeleton.cpp
--
diff --git a/proxy/src/main/cpp/AccumuloProxy_server.skeleton.cpp 
b/proxy/src/main/cpp/AccumuloProxy_server.skeleton.cpp
index 302aec2..6c2f52f 100644
--- a/proxy/src/main/cpp/AccumuloProxy_server.skeleton.cpp
+++ b/proxy/src/main/cpp/AccumuloProxy_server.skeleton.cpp
@@ -338,6 +338,21 @@ class AccumuloProxyHandler : virtual public 
AccumuloProxyIf {
 printf("revokeTablePermission\n");
   }
 
+  void grantNamespacePermission(const std::string& login, const std::string& 
user, const std::string& namespaceName, const NamespacePermission::type perm) {
+// Your implementation goes here
+printf("grantNamespacePermission\n");
+  }
+
+  bool hasNamespacePermission(const std::string& login, const std::string& 
user, const std::string& namespaceName, const NamespacePermission::type perm) {
+// Your implementation goes here
+printf("hasNamespacePermission\n");
+  }
+
+  void revokeNamespacePermission(const std::string& login, const std::string& 
user, const std::string& namespaceName, const NamespacePermission::type perm) {
+// Your implementation goes here
+printf("revokeNamespacePermission\n");
+  }
+
   void createBatchScanner(std::string& _return, const std::string& login, 
const std::string& tableName, const BatchScanOptions& options) {
 // Your implementation goes here
 printf("createBatchScanner\n");
@@ -423,6 +438,106 @@ class AccumuloProxyHandler : virtual public 
AccumuloProxyIf {
 printf("getFollowing\n");
   }
 
+  void systemNamespace(std::string& _return) {
+// Your implementation goes here
+printf("systemNamespace\n");
+  }
+
+  void defaultNamespace(std::string& _return) {
+// Your implementation goes here
+printf("defaultNamespace\n");
+  }
+
+  void listNamespaces(std::vector & _return, const std::string& 
login) {
+// Your implementation goes here
+printf("listNamespaces\n");
+  }
+
+  bool namespaceExists(const std::string& login, const std::string& 
namespaceName) {
+// Your implementation goes here
+printf("namespaceExists\n");
+  }
+
+  void createNamespace(const std::string& login, const std::string& 
namespaceName) {
+// Your implementation goes here
+printf("createNamespace\n");
+  }
+
+  void deleteNamespace(const std::string& login, const std::string& 
namespaceName) {
+// Your implementation goes here
+printf("deleteNamespace\n");
+  }
+
+  void renameNamespace(const std::string& login, const std::string& 
oldNamespaceName, const std::string& newNamespaceName) {
+// Your implementation goes here
+printf("renameNamespace\n");
+  }
+
+  void setNamespaceProperty(const std::string& login, const std::string& 
namespaceName, const std::string& property, const std::string& value) {
+// Your implementation goes here
+printf("setNamespaceProperty\n");
+  }
+
+  void removeNamespaceProperty(const std::string& login, const std::string& 
namespaceName, const std::string& property) {
+// Your implementation goes here
+printf("removeNamespaceProperty\n");
+  }
+
+  void getNamespaceProperties(std::map & _return, 
const std::string& login, const std::string& namespaceName) {
+// Your implementation goes here
+printf("getNamespaceProperties\n");
+  }
+
+  void namespaceIdMap(std::map & _return, const 
std::string& login) {
+// Your implementation goes here
+printf("namespaceIdMap\n");
+  }
+
+  void attachNamespaceIterator(const std::string& login, const std::string& 
namespaceName, const IteratorSetting& setting, const 
std::set & scopes) {
+// Your implementation goes here
+printf("attachNamespaceIterator\n");
+  }
+
+  void removeNamespaceIterator(const std::string& login, const std::string& 
namespaceName, const std::string& name, const std::set & 
scopes) {
+// Your implementation goes here
+printf("removeNamespaceIterator\n");
+  }
+
+  void getNamespaceIteratorSetting(IteratorSetting& _return, const 
std::string& login, const std::string& namespaceName, const std::string& name, 
const IteratorScope::type scope) {
+// Your implementation goes here
+printf("getNamespaceIteratorSetting\n");
+  }
+
+  void listNamespaceIterators(std::map & _return, const std::string& login, const 
std::string& namespaceName) {
+// Your implementation goes here
+printf("listNamespaceIterators\n");
+  }
+
+  void checkNamespaceIteratorConflicts(const std::string& login, const 
std::string& namespaceName, const IteratorSetting& setting, const 
std::set & scopes) {
+// Your implementation goes here
+printf("checkNamespaceIteratorConflicts\n");
+  }
+
+  int32_t addNamespaceConstraint(const std::string& login, const std::string& 
namespaceName, const std::string& constraintClassName) {
+// 

[29/39] accumulo git commit: ACCUMULO-4180 Fix bugs Josh found in InMemoryMapIT

2016-04-12 Thread dlmarion
ACCUMULO-4180 Fix bugs Josh found in InMemoryMapIT

Exposed a bug in InMemoryMap setting the map type, which is fixed as well.

Signed-off-by: Josh Elser 


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

Branch: refs/heads/ACCUMULO-4173
Commit: b8084af36c51ff3831d536c3c8238bef3222363f
Parents: 0712471
Author: Michael Wall 
Authored: Thu Apr 7 10:34:51 2016 -0400
Committer: Josh Elser 
Committed: Thu Apr 7 11:57:06 2016 -0400

--
 .../java/org/apache/accumulo/tserver/InMemoryMap.java |  2 +-
 .../test/java/org/apache/accumulo/test/InMemoryMapIT.java | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b8084af3/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 614b34a..792d35a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -213,7 +213,7 @@ public class InMemoryMap {
   mapType = useNativeMap ? TYPE_NATIVE_MAP_WRAPPER : TYPE_DEFAULT_MAP;
 } else {
   map = new LocalityGroupMap(lggroups, useNativeMap);
-  mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP : 
TYPE_LOCALITY_GROUP_MAP_NATIVE;
+  mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP_NATIVE : 
TYPE_LOCALITY_GROUP_MAP;
 }
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b8084af3/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java 
b/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
index 102762a..6eec2e8 100644
--- a/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
@@ -204,12 +204,18 @@ public class InMemoryMapIT {
   defaultMap = new InMemoryMap(false, 
tempFolder.newFolder().getAbsolutePath());
   nativeMapWrapper = new InMemoryMap(true, 
tempFolder.newFolder().getAbsolutePath());
   localityGroupMap = new InMemoryMap(getLocalityGroups(), false, 
tempFolder.newFolder().getAbsolutePath());
-  localityGroupMapWithNative = new InMemoryMap(getLocalityGroups(), false, 
tempFolder.newFolder().getAbsolutePath());
+  localityGroupMapWithNative = new InMemoryMap(getLocalityGroups(), true, 
tempFolder.newFolder().getAbsolutePath());
 } catch (IOException e) {
   log.error("Error getting new InMemoryMap ", e);
   fail(e.getMessage());
 }
 
+// ensure the maps are correct type
+assertEquals("Not a DefaultMap", InMemoryMap.TYPE_DEFAULT_MAP, 
defaultMap.getMapType());
+assertEquals("Not a NativeMapWrapper", 
InMemoryMap.TYPE_NATIVE_MAP_WRAPPER, nativeMapWrapper.getMapType());
+assertEquals("Not a LocalityGroupMap", 
InMemoryMap.TYPE_LOCALITY_GROUP_MAP, localityGroupMap.getMapType());
+assertEquals("Not a LocalityGroupMap with native", 
InMemoryMap.TYPE_LOCALITY_GROUP_MAP_NATIVE, 
localityGroupMapWithNative.getMapType());
+
 defaultMap.mutate(mutations);
 nativeMapWrapper.mutate(mutations);
 localityGroupMap.mutate(mutations);
@@ -303,7 +309,7 @@ public class InMemoryMapIT {
   private Map getLocalityGroups() {
 Map locgro = new 
HashMap();
 locgro.put("a", newCFSet("cf", "cf2"));
-locgro.put("a", newCFSet("cf3", "cf4"));
+locgro.put("b", newCFSet("cf3", "cf4"));
 return locgro;
   }
 



[14/39] accumulo git commit: ACCUMULO-4175 Validate the location of test ITs

2016-04-12 Thread dlmarion
ACCUMULO-4175 Validate the location of test ITs

* Verify ITs exist only in src/main/java for test module
  (change due to ACCUMULO-3871)


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

Branch: refs/heads/ACCUMULO-4173
Commit: f284027334c159e806f94e881e8648b4c0ce6dd9
Parents: 5742342
Author: Christopher Tubbs 
Authored: Fri Apr 1 13:25:41 2016 -0400
Committer: Christopher Tubbs 
Committed: Fri Apr 1 14:57:09 2016 -0400

--
 test/pom.xml | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f2840273/test/pom.xml
--
diff --git a/test/pom.xml b/test/pom.xml
index e78a9c1..6da0f0e 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -259,6 +259,28 @@
 
   
 
+
+  
+org.codehaus.mojo
+exec-maven-plugin
+
+  
+check-for-misplaced-ITs
+
+  exec
+
+validate
+
+  bash
+  
+-c
+! find src/test/java -name '*IT.java' -exec echo 
'[ERROR] {} should be in src/main/java' \; | grep 'src/test/java'
+  
+
+  
+
+  
+
   
   
 



[24/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/cpp/AccumuloProxy.cpp
--
diff --git a/proxy/src/main/cpp/AccumuloProxy.cpp 
b/proxy/src/main/cpp/AccumuloProxy.cpp
index d74ad95..d0add35 100644
--- a/proxy/src/main/cpp/AccumuloProxy.cpp
+++ b/proxy/src/main/cpp/AccumuloProxy.cpp
@@ -62,17 +62,17 @@ uint32_t 
AccumuloProxy_login_args::read(::apache::thrift::protocol::TProtocol* i
 if (ftype == ::apache::thrift::protocol::T_MAP) {
   {
 this->loginProperties.clear();
-uint32_t _size189;
-::apache::thrift::protocol::TType _ktype190;
-::apache::thrift::protocol::TType _vtype191;
-xfer += iprot->readMapBegin(_ktype190, _vtype191, _size189);
-uint32_t _i193;
-for (_i193 = 0; _i193 < _size189; ++_i193)
+uint32_t _size195;
+::apache::thrift::protocol::TType _ktype196;
+::apache::thrift::protocol::TType _vtype197;
+xfer += iprot->readMapBegin(_ktype196, _vtype197, _size195);
+uint32_t _i199;
+for (_i199 = 0; _i199 < _size195; ++_i199)
 {
-  std::string _key194;
-  xfer += iprot->readString(_key194);
-  std::string& _val195 = this->loginProperties[_key194];
-  xfer += iprot->readString(_val195);
+  std::string _key200;
+  xfer += iprot->readString(_key200);
+  std::string& _val201 = this->loginProperties[_key200];
+  xfer += iprot->readString(_val201);
 }
 xfer += iprot->readMapEnd();
   }
@@ -105,11 +105,11 @@ uint32_t 
AccumuloProxy_login_args::write(::apache::thrift::protocol::TProtocol*
   xfer += oprot->writeFieldBegin("loginProperties", 
::apache::thrift::protocol::T_MAP, 2);
   {
 xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, 
::apache::thrift::protocol::T_STRING, 
static_cast(this->loginProperties.size()));
-std::map ::const_iterator _iter196;
-for (_iter196 = this->loginProperties.begin(); _iter196 != 
this->loginProperties.end(); ++_iter196)
+std::map ::const_iterator _iter202;
+for (_iter202 = this->loginProperties.begin(); _iter202 != 
this->loginProperties.end(); ++_iter202)
 {
-  xfer += oprot->writeString(_iter196->first);
-  xfer += oprot->writeString(_iter196->second);
+  xfer += oprot->writeString(_iter202->first);
+  xfer += oprot->writeString(_iter202->second);
 }
 xfer += oprot->writeMapEnd();
   }
@@ -137,11 +137,11 @@ uint32_t 
AccumuloProxy_login_pargs::write(::apache::thrift::protocol::TProtocol*
   xfer += oprot->writeFieldBegin("loginProperties", 
::apache::thrift::protocol::T_MAP, 2);
   {
 xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, 
::apache::thrift::protocol::T_STRING, 
static_cast((*(this->loginProperties)).size()));
-std::map ::const_iterator _iter197;
-for (_iter197 = (*(this->loginProperties)).begin(); _iter197 != 
(*(this->loginProperties)).end(); ++_iter197)
+std::map ::const_iterator _iter203;
+for (_iter203 = (*(this->loginProperties)).begin(); _iter203 != 
(*(this->loginProperties)).end(); ++_iter203)
 {
-  xfer += oprot->writeString(_iter197->first);
-  xfer += oprot->writeString(_iter197->second);
+  xfer += oprot->writeString(_iter203->first);
+  xfer += oprot->writeString(_iter203->second);
 }
 xfer += oprot->writeMapEnd();
   }
@@ -605,15 +605,15 @@ uint32_t 
AccumuloProxy_addSplits_args::read(::apache::thrift::protocol::TProtoco
 if (ftype == ::apache::thrift::protocol::T_SET) {
   {
 this->splits.clear();
-uint32_t _size198;
-::apache::thrift::protocol::TType _etype201;
-xfer += iprot->readSetBegin(_etype201, _size198);
-uint32_t _i202;
-for (_i202 = 0; _i202 < _size198; ++_i202)
+uint32_t _size204;
+::apache::thrift::protocol::TType _etype207;
+xfer += iprot->readSetBegin(_etype207, _size204);
+uint32_t _i208;
+for (_i208 = 0; _i208 < _size204; ++_i208)
 {
-  std::string _elem203;
-  xfer += iprot->readBinary(_elem203);
-  this->splits.insert(_elem203);
+  std::string _elem209;
+  xfer += iprot->readBinary(_elem209);
+  this->splits.insert(_elem209);
 }
 xfer += iprot->readSetEnd();
   }
@@ -650,10 +650,10 @@ uint32_t 
AccumuloProxy_addSplits_args::write(::apache::thrift::protocol::TProtoc
   xfer += oprot->writeFieldBegin("splits", ::apache::thrift::protocol::T_SET, 
3);
   {
 xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, 

[02/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7


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

Branch: refs/heads/ACCUMULO-4173
Commit: cd5eb1f124ecc58021f33c73e963160974bd01c2
Parents: 7d06316 f6bfe90
Author: Dave Marion 
Authored: Thu Mar 31 14:32:46 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 14:32:46 2016 -0400

--
 assemble/conf/templates/accumulo-env.sh |  2 +-
 .../apache/accumulo/tserver/TabletServer.java   | 25 
 .../start/classloader/vfs/ContextManager.java   |  7 --
 3 files changed, 11 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd5eb1f1/assemble/conf/templates/accumulo-env.sh
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd5eb1f1/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 71ad6bc,ac8f2ec..eabf51d
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -2782,31 -3588,16 +2782,16 @@@ public class TabletServer extends Accum
  Runnable contextCleaner = new Runnable() {
@Override
public void run() {
- ArrayList extents;
- 
- synchronized (onlineTablets) {
-   extents = new ArrayList(onlineTablets.keySet());
- }
- 
- Set tables = new HashSet();
- 
- for (KeyExtent keyExtent : extents) {
-   tables.add(keyExtent.getTableId());
- }
- 
- HashSet contexts = new HashSet();
- 
- for (Text tableid : tables) {
-   String context = getTableConfiguration(new KeyExtent(tableid, null, 
null)).get(Property.TABLE_CLASSPATH);
-   if (!context.equals("")) {
- contexts.add(context);
-   }
 -Set contextProperties = 
getSystemConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY).keySet();
++Set contextProperties = 
getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY).keySet();
+ Set configuredContexts = new HashSet();
+ for (String prop : contextProperties) {
+   
configuredContexts.add(prop.substring(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.name().length()));
  }
  
  try {
-   
AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(contexts);
+   
AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(configuredContexts);
  } catch (IOException e) {
 -  log.warn(e.getMessage(), e);
 +  log.warn("{}", e.getMessage(), e);
  }
}
  };

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd5eb1f1/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
--



[27/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7


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

Branch: refs/heads/ACCUMULO-4173
Commit: f7a24d7516de880ba338a59d57346dbe82cf2dab
Parents: 2e4f320 0712471
Author: Josh Elser 
Authored: Tue Apr 5 11:19:23 2016 -0400
Committer: Josh Elser 
Committed: Tue Apr 5 11:19:23 2016 -0400

--
 .../core/client/impl/TabletServerBatchWriter.java  | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f7a24d75/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
--



[18/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/src/main/python/ttypes.py
--
diff --git a/proxy/src/main/python/ttypes.py b/proxy/src/main/python/ttypes.py
index c224c50..87a977d 100644
--- a/proxy/src/main/python/ttypes.py
+++ b/proxy/src/main/python/ttypes.py
@@ -114,6 +114,41 @@ class SystemPermission:
 "SYSTEM": 7,
   }
 
+class NamespacePermission:
+  READ = 0
+  WRITE = 1
+  ALTER_NAMESPACE = 2
+  GRANT = 3
+  ALTER_TABLE = 4
+  CREATE_TABLE = 5
+  DROP_TABLE = 6
+  BULK_IMPORT = 7
+  DROP_NAMESPACE = 8
+
+  _VALUES_TO_NAMES = {
+0: "READ",
+1: "WRITE",
+2: "ALTER_NAMESPACE",
+3: "GRANT",
+4: "ALTER_TABLE",
+5: "CREATE_TABLE",
+6: "DROP_TABLE",
+7: "BULK_IMPORT",
+8: "DROP_NAMESPACE",
+  }
+
+  _NAMES_TO_VALUES = {
+"READ": 0,
+"WRITE": 1,
+"ALTER_NAMESPACE": 2,
+"GRANT": 3,
+"ALTER_TABLE": 4,
+"CREATE_TABLE": 5,
+"DROP_TABLE": 6,
+"BULK_IMPORT": 7,
+"DROP_NAMESPACE": 8,
+  }
+
 class ScanType:
   SINGLE = 0
   BATCH = 1
@@ -3126,3 +3161,207 @@ class MutationsRejectedException(TException):
 
   def __ne__(self, other):
 return not (self == other)
+
+class NamespaceExistsException(TException):
+  """
+  Attributes:
+   - msg
+  """
+
+  thrift_spec = (
+None, # 0
+(1, TType.STRING, 'msg', None, None, ), # 1
+  )
+
+  def __init__(self, msg=None,):
+self.msg = msg
+
+  def read(self, iprot):
+if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and 
isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is 
not None and fastbinary is not None:
+  fastbinary.decode_binary(self, iprot.trans, (self.__class__, 
self.thrift_spec))
+  return
+iprot.readStructBegin()
+while True:
+  (fname, ftype, fid) = iprot.readFieldBegin()
+  if ftype == TType.STOP:
+break
+  if fid == 1:
+if ftype == TType.STRING:
+  self.msg = iprot.readString()
+else:
+  iprot.skip(ftype)
+  else:
+iprot.skip(ftype)
+  iprot.readFieldEnd()
+iprot.readStructEnd()
+
+  def write(self, oprot):
+if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and 
self.thrift_spec is not None and fastbinary is not None:
+  oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, 
self.thrift_spec)))
+  return
+oprot.writeStructBegin('NamespaceExistsException')
+if self.msg is not None:
+  oprot.writeFieldBegin('msg', TType.STRING, 1)
+  oprot.writeString(self.msg)
+  oprot.writeFieldEnd()
+oprot.writeFieldStop()
+oprot.writeStructEnd()
+
+  def validate(self):
+return
+
+
+  def __str__(self):
+return repr(self)
+
+  def __hash__(self):
+value = 17
+value = (value * 31) ^ hash(self.msg)
+return value
+
+  def __repr__(self):
+L = ['%s=%r' % (key, value)
+  for key, value in self.__dict__.iteritems()]
+return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+return isinstance(other, self.__class__) and self.__dict__ == 
other.__dict__
+
+  def __ne__(self, other):
+return not (self == other)
+
+class NamespaceNotFoundException(TException):
+  """
+  Attributes:
+   - msg
+  """
+
+  thrift_spec = (
+None, # 0
+(1, TType.STRING, 'msg', None, None, ), # 1
+  )
+
+  def __init__(self, msg=None,):
+self.msg = msg
+
+  def read(self, iprot):
+if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and 
isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is 
not None and fastbinary is not None:
+  fastbinary.decode_binary(self, iprot.trans, (self.__class__, 
self.thrift_spec))
+  return
+iprot.readStructBegin()
+while True:
+  (fname, ftype, fid) = iprot.readFieldBegin()
+  if ftype == TType.STOP:
+break
+  if fid == 1:
+if ftype == TType.STRING:
+  self.msg = iprot.readString()
+else:
+  iprot.skip(ftype)
+  else:
+iprot.skip(ftype)
+  iprot.readFieldEnd()
+iprot.readStructEnd()
+
+  def write(self, oprot):
+if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and 
self.thrift_spec is not None and fastbinary is not None:
+  oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, 
self.thrift_spec)))
+  return
+oprot.writeStructBegin('NamespaceNotFoundException')
+if self.msg is not None:
+  oprot.writeFieldBegin('msg', TType.STRING, 1)
+  oprot.writeString(self.msg)
+  oprot.writeFieldEnd()
+oprot.writeFieldStop()
+oprot.writeStructEnd()
+
+  def validate(self):
+return
+
+
+  def __str__(self):
+return repr(self)
+
+  def __hash__(self):
+value = 17
+value = (value * 31) ^ hash(self.msg)
+return value
+
+  def __repr__(self):
+L = ['%s=%r' % (key, value)
+  for key, value in self.__dict__.iteritems()]
+ 

[36/39] accumulo git commit: ACCUMULO-4185 Use SYNC durability and expect the update to be durable

2016-04-12 Thread dlmarion
ACCUMULO-4185 Use SYNC durability and expect the update to be durable

Using LOG is subject to race conditions with RawLocalFileSystem. It
is possible that we see or don't see the update which is bad for a
test. Using SYNC removes that race condition.


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

Branch: refs/heads/ACCUMULO-4173
Commit: 0f6e5ed5549132e8d63153fa9a0b9fa10779b264
Parents: 0cb15fa
Author: Josh Elser 
Authored: Mon Apr 11 13:52:49 2016 -0400
Committer: Josh Elser 
Committed: Mon Apr 11 13:52:49 2016 -0400

--
 .../test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f6e5ed5/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java 
b/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java
index 6338e00..b388cbf 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/ProxyDurabilityIT.java
@@ -111,7 +111,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT {
 assertEquals(0, count(tableName));
 
 ConditionalWriterOptions cfg = new ConditionalWriterOptions();
-cfg.setDurability(Durability.LOG);
+cfg.setDurability(Durability.SYNC);
 String cwriter = client.createConditionalWriter(login, tableName, cfg);
 ConditionalUpdates updates = new ConditionalUpdates();
 updates.addToConditions(new Condition(new Column(bytes("cf"), bytes("cq"), 
bytes("";
@@ -120,7 +120,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT {
 assertEquals(ConditionalStatus.ACCEPTED, status.get(bytes("row")));
 assertEquals(1, count(tableName));
 restartTServer();
-assertEquals(0, count(tableName));
+assertEquals(1, count(tableName));
 
 proxyServer.stop();
   }



[05/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7


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

Branch: refs/heads/ACCUMULO-4173
Commit: 2b286ba5660ec78e5f1cb675fde55ccdeba6a327
Parents: cd5eb1f 0206d78
Author: Dave Marion 
Authored: Thu Mar 31 16:23:03 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 16:23:03 2016 -0400

--
 .../java/org/apache/accumulo/core/conf/Property.java |  3 +--
 .../java/org/apache/accumulo/tserver/TabletServer.java   |  3 ++-
 .../apache/accumulo/tserver/log/TabletServerLogger.java  | 11 ---
 3 files changed, 11 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2b286ba5/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --cc core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 28cc861,2149ad9..dbb2036
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@@ -252,16 -209,7 +252,15 @@@ public enum Property 
+ "must be made, which is slower. However opening too many files at 
once can cause problems."),
TSERV_WALOG_MAX_SIZE("tserver.walog.max.size", "1G", PropertyType.MEMORY,
"The maximum size for each write-ahead log. See comment for property 
tserver.memory.maps.max"),
- 
+   TSERV_WALOG_MAX_AGE("tserver.walog.max.age", "24h", 
PropertyType.TIMEDURATION, "The maximum age for each write-ahead log."),
 +  
TSERV_WALOG_TOLERATED_CREATION_FAILURES("tserver.walog.tolerated.creation.failures",
 "50", PropertyType.COUNT,
 +  "The maximum number of failures tolerated when creating a new WAL file 
within the period specified by tserver.walog.failures.period."
 +  + " Exceeding this number of failures in the period causes the 
TabletServer to exit."),
 +  
TSERV_WALOG_TOLERATED_WAIT_INCREMENT("tserver.walog.tolerated.wait.increment", 
"1000ms", PropertyType.TIMEDURATION,
 +  "The amount of time to wait between failures to create a WALog."),
 +  // Never wait longer than 5 mins for a retry
 +  
TSERV_WALOG_TOLERATED_MAXIMUM_WAIT_DURATION("tserver.walog.maximum.wait.duration",
 "5m", PropertyType.TIMEDURATION,
 +  "The maximum amount of time to wait after a failure to create a WAL 
file."),
- 
TSERV_MAJC_DELAY("tserver.compaction.major.delay", "30s", 
PropertyType.TIMEDURATION,
"Time a tablet server will sleep between checking which tablets need 
compaction."),
TSERV_MAJC_THREAD_MAXOPEN("tserver.compaction.major.thread.files.open.max", 
"10", PropertyType.COUNT,

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2b286ba5/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index eabf51d,38bd8ac..a3b224f
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -254,132 -257,634 +254,133 @@@ public class TabletServer extends Accum
private static final long TIME_BETWEEN_GC_CHECKS = 5000;
private static final long TIME_BETWEEN_LOCATOR_CACHE_CLEARS = 60 * 60 * 
1000;
  
 -  private TabletServerLogger logger;
 -
 -  protected TabletServerMinCMetrics mincMetrics = new 
TabletServerMinCMetrics();
 +  private final GarbageCollectionLogger gcLogger = new 
GarbageCollectionLogger();
 +  private final TransactionWatcher watcher = new TransactionWatcher();
 +  private final ZooCache masterLockCache = new ZooCache();
  
 -  private ServerConfiguration serverConfig;
 -  private LogSorter logSorter = null;
 +  private final TabletServerLogger logger;
  
 -  public TabletServer(ServerConfiguration conf, VolumeManager fs) {
 -super();
 -this.serverConfig = conf;
 -this.instance = conf.getInstance();
 -this.fs = fs;
 -
 -log.info("Version " + Constants.VERSION);
 -log.info("Instance " + instance.getInstanceID());
 -
 -this.logSorter = new LogSorter(instance, fs, getSystemConfiguration());
 -SimpleTimer.getInstance().schedule(new Runnable() {
 -  @Override
 -  public void run() {
 -synchronized (onlineTablets) {
 -  long now = System.currentTimeMillis();
 -  for (Tablet tablet : onlineTablets.values())
 -try {
 -  tablet.updateRates(now);
 -} catch (Exception ex) {
 -  log.error(ex, ex);
 -}
 -}
 -  }
 -

[38/39] accumulo git commit: ACCUMULO-4173: Updated with changes based on testing

2016-04-12 Thread dlmarion
ACCUMULO-4173: Updated with changes based on testing


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

Branch: refs/heads/ACCUMULO-4173
Commit: d745e7c1e9baf333f4a54f5ceeac22a588a927d5
Parents: c77a577
Author: Dave Marion 
Authored: Tue Apr 12 09:47:44 2016 -0400
Committer: Dave Marion 
Committed: Tue Apr 12 09:47:44 2016 -0400

--
 .../balancer/HostRegexTableLoadBalancer.java| 129 +++
 .../HostRegexTableLoadBalancerTest.java |  48 ---
 2 files changed, 101 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d745e7c1/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
index 677e4ba..9d92361 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * This balancer will create pools of tablet servers by grouping tablet 
servers that match a regex into the same pool and calling the balancer set on 
the table
- * to balance within the set of matching tablet servers. 
+ * to balance within the set of matching tablet servers. All tablet servers 
that do not match a regex are grouped into a default pool.
  * Regex properties for this balancer are specified as:
  * table.custom.balancer.host.regex.tablename=regex
  * Periodically (default 5m) this balancer will check to see if a tablet 
server is hosting tablets that it should not be according to the regex 
configuration.
@@ -75,8 +75,8 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
 
   private Map tableIdToTableName = null;
   private Map poolNameToRegexPattern = null;
-  private long lastOOBCheck = System.currentTimeMillis();
-  private long lastPoolRecheck = 0;
+  private volatile long lastOOBCheck = System.currentTimeMillis();
+  private volatile long lastPoolRecheck = 0;
   private boolean isIpBasedRegex = false;
   private Map> pools = 
new HashMap>();
 
@@ -89,6 +89,7 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
*/
   protected synchronized 
Map> 
splitCurrentByRegex(SortedMap current) {
 if ((System.currentTimeMillis() - lastPoolRecheck) > poolRecheckMillis) {
+  LOG.debug("Performing pool recheck - regrouping tablet servers into 
pools based on regex");
   Map> newPools = new 
HashMap>();
   for (Entry e : current.entrySet()) {
 List poolNames = getPoolNamesForHost(e.getKey().host());
@@ -168,9 +169,11 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
   Map customProps = 
conf.getTableConfiguration(table.getValue()).getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
   if (null != customProps && customProps.size() > 0) {
 for (Entry customProp : customProps.entrySet()) {
-  String tableName = 
customProp.getKey().substring(HOST_BALANCER_PREFIX.length());
-  String regex = customProp.getValue();
-  poolNameToRegexPattern.put(tableName, Pattern.compile(regex));
+  if (customProp.getKey().startsWith(HOST_BALANCER_PREFIX)) {
+String tableName = 
customProp.getKey().substring(HOST_BALANCER_PREFIX.length());
+String regex = customProp.getValue();
+poolNameToRegexPattern.put(tableName, Pattern.compile(regex));
+  }
 }
   }
 }
@@ -218,40 +221,10 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
   public void getAssignments(SortedMap 
current, Map unassigned,
   Map assignments) {
 
-Map unassignedClone = new TreeMap<>(unassigned);
-if ((System.currentTimeMillis() - this.lastOOBCheck) > 

[08/39] accumulo git commit: ACCUMULO-4148 Native map doesn't increment counter for every cell, potentially losing some updates

2016-04-12 Thread dlmarion
ACCUMULO-4148 Native map doesn't increment counter for every cell, potentially 
losing some updates

The problem here is that InMemoryMap$DefaultMap increments the mutationCount or
kvCount for every key value pair in every Mutation that is passed in.  The
NativeMap, which is used by the InMemoryMap$NativeMapWrapper does not.  This
causes 2 different issues in the NativeMap.

1)  When a single Mutation has duplicate key value pairs, only the last is
recorded, because they all have the same mutationCount and the earlier ones are
hidden.
2 ) When multiple Mutations are passed in at the same time, the mutationCount
or kvCount starts over for each Mutation.  This can also lead to hiding of key
value pairs.

The tests added here expose both the issues as well as do some asserts on
simple Mutations.  A few tweaks were made to expose information to these tests.

1) Made MemKey public, made it's kvCount private and exposed that via a getter 
so
we can inspect directly instead of parsing the toString.  Required changing
some calls to kvCount to use the getter.

2) Added a final String to the InMemoryMap which is set during construction.  
This
allows you to see what kind of SimpleMap was setup in the InMemoryMap.

Closes apache/accumulo#82

Signed-off-by: Josh Elser 


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

Branch: refs/heads/ACCUMULO-4173
Commit: 41e002d7a07415ccd2826b2db98783187b9422b3
Parents: 0206d78
Author: Michael Wall 
Authored: Thu Feb 25 21:20:15 2016 -0500
Committer: Josh Elser 
Committed: Fri Apr 1 09:46:19 2016 -0400

--
 .../apache/accumulo/tserver/InMemoryMap.java|  32 +-
 .../org/apache/accumulo/tserver/MemKey.java |  10 +-
 .../org/apache/accumulo/tserver/NativeMap.java  |  25 +-
 .../org/apache/accumulo/test/InMemoryMapIT.java | 319 +++
 4 files changed, 361 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/41e002d7/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 57c9440..614b34a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -82,7 +82,7 @@ class MemKeyComparator implements Comparator, 
Serializable {
 if (cmp == 0) {
   if (k1 instanceof MemKey)
 if (k2 instanceof MemKey)
-  cmp = ((MemKey) k2).kvCount - ((MemKey) k1).kvCount;
+  cmp = ((MemKey) k2).getKVCount() - ((MemKey) k1).getKVCount();
 else
   cmp = 1;
   else if (k2 instanceof MemKey)
@@ -104,7 +104,7 @@ class PartialMutationSkippingIterator extends 
SkippingIterator implements Interr
 
   @Override
   protected void consume() throws IOException {
-while (getSource().hasTop() && ((MemKey) getSource().getTopKey()).kvCount 
> kvCount)
+while (getSource().hasTop() && ((MemKey) 
getSource().getTopKey()).getKVCount() > kvCount)
   getSource().next();
   }
 
@@ -191,9 +191,15 @@ public class InMemoryMap {
 
   private volatile String memDumpFile = null;
   private final String memDumpDir;
+  private final String mapType;
 
   private Map lggroups;
 
+  public static final String TYPE_NATIVE_MAP_WRAPPER = "NativeMapWrapper";
+  public static final String TYPE_DEFAULT_MAP = "DefaultMap";
+  public static final String TYPE_LOCALITY_GROUP_MAP = "LocalityGroupMap";
+  public static final String TYPE_LOCALITY_GROUP_MAP_NATIVE = 
"LocalityGroupMap with native";
+
   public InMemoryMap(boolean useNativeMap, String memDumpDir) {
 this(new HashMap(), useNativeMap, memDumpDir);
   }
@@ -202,10 +208,26 @@ public class InMemoryMap {
 this.memDumpDir = memDumpDir;
 this.lggroups = lggroups;
 
-if (lggroups.size() == 0)
+if (lggroups.size() == 0) {
   map = newMap(useNativeMap);
-else
+  mapType = useNativeMap ? TYPE_NATIVE_MAP_WRAPPER : TYPE_DEFAULT_MAP;
+} else {
   map = new LocalityGroupMap(lggroups, useNativeMap);
+  mapType = useNativeMap ? TYPE_LOCALITY_GROUP_MAP : 
TYPE_LOCALITY_GROUP_MAP_NATIVE;
+}
+  }
+
+  /**
+   * Description of the type of SimpleMap that is created.
+   * 
+   * If no locality groups are present, the SimpleMap is either 
TYPE_DEFAULT_MAP or TYPE_NATIVE_MAP_WRAPPER. If there is one more locality 
groups, then the
+   * InMemoryMap has 

[25/39] accumulo git commit: ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

2016-04-12 Thread dlmarion
ACCUMULO-4147 Add Accumulo Namespace Operations to Proxy

Squashed commit of the following:

commit a97782a97bddd0495fc493c7484907ff29b9e023
Author: Tristen Georgiou 
Date:   Tue Mar 29 22:29:55 2016 -0700

Added in missing calls to Assert.fail() to ensure that expected exceptions 
are thrown and removed a function call that doesn't actually throw the 
exception.

commit 3b9cff9219cecc93392e32741177531ed7d1dbe5
Merge: 9d2dc05 1d49030
Author: Tristen Georgiou 
Date:   Fri Mar 25 14:03:48 2016 -0700

Merge remote-tracking branch 'upstream/master'

commit 9d2dc05dde1a3896af1ac64e0e2bea67d784ad89
Author: Tristen Georgiou 
Date:   Fri Mar 25 14:01:52 2016 -0700

Added in integration tests for the proxy namespace operations.

commit 9cb8bc88fbc205ca841bf59159c5060fede43990
Merge: eacedaa c4d6eee
Author: Tristen Georgiou 
Date:   Thu Feb 25 17:05:55 2016 -0800

Merge remote-tracking branch 'upstream/master'

commit eacedaaccd9d79d8a1f2303a2aef15599acfcb10
Author: Tristen Georgiou 
Date:   Thu Feb 25 17:03:17 2016 -0800

Added in IT tests for namespace operations and added in a namespace example 
file under the python examples .

commit 8dc5ab95d97f5c825222ab2ed52afaf2553e05a2
Merge: e149233 2651ba8
Author: Tristen Georgiou 
Date:   Thu Feb 25 11:50:34 2016 -0800

Merge remote-tracking branch 'upstream/master'

commit e149233c5340329410d83270a523fdb6a8a57cb9
Author: Tristen Georgiou 
Date:   Sat Feb 20 12:13:58 2016 -0800

Formatting update.

commit cc254d7857adc696413afd6ff0d945f955af5853
Author: Tristen Georgiou 
Date:   Sat Feb 20 10:55:21 2016 -0800

Added in namespace security operation permission functions.

commit 7e3c4d40c7ec6df43730e142b5dc87fa498caebe
Author: Tristen Georgiou 
Date:   Fri Feb 19 16:10:21 2016 -0800

Initial implementation for proxy namespace operations.


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

Branch: refs/heads/ACCUMULO-4173
Commit: 8839fe5116337bbbf1e9b81109d0e9127fef7715
Parents: ada31a9
Author: Tristen Georgiou 
Authored: Mon Apr 4 12:19:41 2016 -0400
Committer: Keith Turner 
Committed: Mon Apr 4 13:47:10 2016 -0400

--
 proxy/examples/python/TestNamespace.py  |   172 +
 proxy/src/main/cpp/AccumuloProxy.cpp| 33610 ---
 proxy/src/main/cpp/AccumuloProxy.h  |  5162 +-
 .../main/cpp/AccumuloProxy_server.skeleton.cpp  |   115 +
 proxy/src/main/cpp/proxy_types.cpp  |   315 +
 proxy/src/main/cpp/proxy_types.h|   166 +
 .../org/apache/accumulo/proxy/ProxyServer.java  |   289 +
 .../accumulo/proxy/thrift/AccumuloProxy.java| 88369 +++--
 .../proxy/thrift/NamespaceExistsException.java  |   414 +
 .../thrift/NamespaceNotEmptyException.java  |   414 +
 .../thrift/NamespaceNotFoundException.java  |   414 +
 .../proxy/thrift/NamespacePermission.java   |82 +
 proxy/src/main/python/AccumuloProxy-remote  |   161 +
 proxy/src/main/python/AccumuloProxy.py  | 15767 ++-
 proxy/src/main/python/ttypes.py |   239 +
 proxy/src/main/ruby/accumulo_proxy.rb   |  1740 +-
 proxy/src/main/ruby/proxy_types.rb  |83 +
 proxy/src/main/thrift/proxy.thrift  |61 +-
 .../accumulo/test/proxy/SimpleProxyBase.java|   407 +-
 .../proxy/TestProxyNamespaceOperations.java |   165 +
 .../test/proxy/TestProxySecurityOperations.java |13 +
 21 files changed, 102216 insertions(+), 45942 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8839fe51/proxy/examples/python/TestNamespace.py
--
diff --git a/proxy/examples/python/TestNamespace.py 
b/proxy/examples/python/TestNamespace.py
new file mode 100644
index 000..e7d2377
--- /dev/null
+++ b/proxy/examples/python/TestNamespace.py
@@ -0,0 +1,172 @@
+#! /usr/bin/env python
+
+# 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 

[30/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7


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

Branch: refs/heads/ACCUMULO-4173
Commit: eb6a0381054becda3ade7e634b92e76546614ca0
Parents: f7a24d7 b8084af
Author: Josh Elser 
Authored: Thu Apr 7 12:12:48 2016 -0400
Committer: Josh Elser 
Committed: Thu Apr 7 12:12:48 2016 -0400

--
 .../java/org/apache/accumulo/tserver/InMemoryMap.java |  2 +-
 .../test/java/org/apache/accumulo/test/InMemoryMapIT.java | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/eb6a0381/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--



[26/39] accumulo git commit: ACCUMULO-4178: Updated the sender thread to include the table ids in thread name.

2016-04-12 Thread dlmarion
ACCUMULO-4178: Updated the sender thread to include the table ids in thread 
name.

Closes apache/accumulo#87

Signed-off-by: Josh Elser 


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

Branch: refs/heads/ACCUMULO-4173
Commit: 071247167613b490bf6b722f97299fb8aca3c3a6
Parents: 2afc3dc
Author: Ivan Bella 
Authored: Sun Apr 3 00:49:55 2016 -0400
Committer: Josh Elser 
Committed: Tue Apr 5 11:19:07 2016 -0400

--
 .../core/client/impl/TabletServerBatchWriter.java  | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07124716/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
 
b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
index 491bcc1..35d1e49 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
@@ -31,6 +31,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
+import java.util.TreeSet;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -38,6 +39,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
+import com.google.common.base.Joiner;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -831,10 +833,15 @@ public class TabletServerBatchWriter {
 try {
 
   long count = 0;
-  for (List list : mutationBatch.values()) {
-count += list.size();
+
+  Set tableIds = new TreeSet();
+  for (Map.Entry entry : 
mutationBatch.entrySet()) {
+count += entry.getValue().size();
+tableIds.add(entry.getKey().getTableId());
   }
-  String msg = "sending " + String.format("%,d", count) + " mutations 
to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location;
+
+  String msg = "sending " + String.format("%,d", count) + " mutations 
to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location
+  + " tids: [" + Joiner.on(',').join(tableIds) + ']';
   Thread.currentThread().setName(msg);
 
   Span span = Trace.start("sendMutations");



[01/39] accumulo git commit: ACCUMULO-4169: Close contexts that are not in the configuration.

2016-04-12 Thread dlmarion
Repository: accumulo
Updated Branches:
  refs/heads/ACCUMULO-4173 fafcefdf4 -> 9bef8b6c1


ACCUMULO-4169: Close contexts that are not in the configuration.


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

Branch: refs/heads/ACCUMULO-4173
Commit: f6bfe9018d1136e2ff972b8bb8a43732ee625fef
Parents: b040557
Author: Dave Marion 
Authored: Thu Mar 31 14:10:18 2016 -0400
Committer: Dave Marion 
Committed: Thu Mar 31 14:10:18 2016 -0400

--
 assemble/conf/templates/accumulo-env.sh |  2 +-
 .../apache/accumulo/tserver/TabletServer.java   | 25 
 .../start/classloader/vfs/ContextManager.java   |  7 --
 3 files changed, 11 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bfe901/assemble/conf/templates/accumulo-env.sh
--
diff --git a/assemble/conf/templates/accumulo-env.sh 
b/assemble/conf/templates/accumulo-env.sh
index e136a3f..a06a4cd 100644
--- a/assemble/conf/templates/accumulo-env.sh
+++ b/assemble/conf/templates/accumulo-env.sh
@@ -51,7 +51,7 @@ test -z "$ACCUMULO_TSERVER_OPTS" && export 
ACCUMULO_TSERVER_OPTS="${POLICY} ${tS
 test -z "$ACCUMULO_MASTER_OPTS"  && export ACCUMULO_MASTER_OPTS="${POLICY} 
${masterHigh_masterLow}"
 test -z "$ACCUMULO_MONITOR_OPTS" && export ACCUMULO_MONITOR_OPTS="${POLICY} 
${monitorHigh_monitorLow}"
 test -z "$ACCUMULO_GC_OPTS"  && export ACCUMULO_GC_OPTS="${gcHigh_gcLow}"
-test -z "$ACCUMULO_GENERAL_OPTS" && export 
ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC 
-XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true"
+test -z "$ACCUMULO_GENERAL_OPTS" && export 
ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC 
-XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true 
-XX:+CMSClassUnloadingEnabled"
 test -z "$ACCUMULO_OTHER_OPTS"   && export 
ACCUMULO_OTHER_OPTS="${otherHigh_otherLow}"
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bfe901/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 f3748d7..ac8f2ec 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
@@ -3588,29 +3588,14 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 Runnable contextCleaner = new Runnable() {
   @Override
   public void run() {
-ArrayList extents;
-
-synchronized (onlineTablets) {
-  extents = new ArrayList(onlineTablets.keySet());
-}
-
-Set tables = new HashSet();
-
-for (KeyExtent keyExtent : extents) {
-  tables.add(keyExtent.getTableId());
-}
-
-HashSet contexts = new HashSet();
-
-for (Text tableid : tables) {
-  String context = getTableConfiguration(new KeyExtent(tableid, null, 
null)).get(Property.TABLE_CLASSPATH);
-  if (!context.equals("")) {
-contexts.add(context);
-  }
+Set contextProperties = 
getSystemConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY).keySet();
+Set configuredContexts = new HashSet();
+for (String prop : contextProperties) {
+  
configuredContexts.add(prop.substring(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.name().length()));
 }
 
 try {
-  
AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(contexts);
+  
AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(configuredContexts);
 } catch (IOException e) {
   log.warn(e.getMessage(), e);
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bfe901/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
--
diff --git 
a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
 
b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
index c9ebc52..981322c 100644
--- 
a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
+++ 
b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
@@ 

[09/39] accumulo git commit: Merge branch '1.6' into 1.7

2016-04-12 Thread dlmarion
Merge branch '1.6' into 1.7

Conflicts:

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


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

Branch: refs/heads/ACCUMULO-4173
Commit: f181cf6a90a913e5453352a56d3ab470f15b068c
Parents: 2b286ba 41e002d
Author: Josh Elser 
Authored: Fri Apr 1 09:56:17 2016 -0400
Committer: Josh Elser 
Committed: Fri Apr 1 09:56:17 2016 -0400

--
 .../apache/accumulo/tserver/InMemoryMap.java|  28 +-
 .../org/apache/accumulo/tserver/MemKey.java |  10 +-
 .../accumulo/tserver/MemKeyComparator.java  |   2 +-
 .../org/apache/accumulo/tserver/NativeMap.java  |  27 +-
 .../PartialMutationSkippingIterator.java|   2 +-
 .../org/apache/accumulo/test/InMemoryMapIT.java | 319 +++
 6 files changed, 362 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKey.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java
index 739b923,000..a623cac
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java
@@@ -1,44 -1,0 +1,44 @@@
 +/*
 + * 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;
 +
 +import java.io.Serializable;
 +import java.util.Comparator;
 +
 +import org.apache.accumulo.core.data.Key;
 +
 +class MemKeyComparator implements Comparator, Serializable {
 +
 +  private static final long serialVersionUID = 1L;
 +
 +  @Override
 +  public int compare(Key k1, Key k2) {
 +int cmp = k1.compareTo(k2);
 +
 +if (cmp == 0) {
 +  if (k1 instanceof MemKey)
 +if (k2 instanceof MemKey)
-   cmp = ((MemKey) k2).kvCount - ((MemKey) k1).kvCount;
++  cmp = ((MemKey) k2).getKVCount() - ((MemKey) k1).getKVCount();
 +else
 +  cmp = 1;
 +  else if (k2 instanceof MemKey)
 +cmp = -1;
 +}
 +
 +return cmp;
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 6eb8e4e,7e1435e..a6f7cf1
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@@ -502,29 -531,17 +503,18 @@@ public class NativeMap implements Itera
long uid = startUpdate(nmPointer, mutation.getRow());
for (ColumnUpdate update : updates) {
  update(nmPointer, uid, update.getColumnFamily(), 
update.getColumnQualifier(), update.getColumnVisibility(), 
update.getTimestamp(), update.isDeleted(),
- update.getValue(), mutationCount);
+ update.getValue(), mutationCount++);
}
- 
  }
+ return mutationCount;
}
  
 +  @VisibleForTesting
public void mutate(Mutation mutation, int mutationCount) {
- wlock.lock();
- try {
-   if (nmPointer == 0) {
- throw new IllegalStateException("Native Map Deleted");
-   }
- 
-   modCount++;
- 
-