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

2015-06-01 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:

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


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

Branch: refs/heads/master
Commit: 99c734c8c5c389ea600fe08117c183365c89d8b8
Parents: d71e5ee 9a4dd30
Author: Josh Elser 
Authored: Mon Jun 1 18:37:30 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:37:30 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/99c734c8/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 df0848d,128aaa9..b4c5e5f
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -1380,30 -2203,21 +1380,19 @@@ public class TabletServer extends Accum
return result;
  }
  
 -private ZooCache masterLockCache = new ZooCache();
 -
  private void checkPermission(TCredentials credentials, String lock, final 
String request) throws ThriftSecurityException {
-   boolean fatal = false;
try {
 -log.debug("Got " + request + " message from user: " + 
credentials.getPrincipal());
 +log.trace("Got " + request + " message from user: " + 
credentials.getPrincipal());
  if (!security.canPerformSystemActions(credentials)) {
log.warn("Got " + request + " message from user: " + 
credentials.getPrincipal());
throw new ThriftSecurityException(credentials.getPrincipal(), 
SecurityErrorCode.PERMISSION_DENIED);
  }
} catch (ThriftSecurityException e) {
  log.warn("Got " + request + " message from unauthenticatable user: " 
+ e.getUser());
 -if 
(SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
 -  log.fatal("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
 +if 
(getCredentials().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
 +  log.error("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
-   fatal = true;
  }
  throw e;
-   } finally {
- if (fatal) {
-   Halt.halt(1, new Runnable() {
- @Override
- public void run() {
-   gcLogger.logGCInfo(TabletServer.this.getConfiguration());
- }
-   });
- }
}
  
if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {



[2/6] accumulo git commit: ACCUMULO-3880 Remove halt on bad SystemToken.

2015-06-01 Thread elserj
ACCUMULO-3880 Remove halt on bad SystemToken.

While incorrect SystemTokens might sometimes be
the product of inconsistent system configuration,
it can also be used as an attack vector by
malicious parties. We need to treat invalid
authentications for the system user the same
as regular users (deny them and keep going).


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

Branch: refs/heads/1.7
Commit: 9a4dd3000ce5c8e1ebb884810b7ad3195bb1fa43
Parents: cc25f51
Author: Josh Elser 
Authored: Mon Jun 1 18:34:47 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:34:47 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9a4dd300/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 c502166..128aaa9 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
@@ -2206,7 +2206,6 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 private ZooCache masterLockCache = new ZooCache();
 
 private void checkPermission(TCredentials credentials, String lock, final 
String request) throws ThriftSecurityException {
-  boolean fatal = false;
   try {
 log.debug("Got " + request + " message from user: " + 
credentials.getPrincipal());
 if (!security.canPerformSystemActions(credentials)) {
@@ -2217,18 +2216,8 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 log.warn("Got " + request + " message from unauthenticatable user: " + 
e.getUser());
 if 
(SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
   log.fatal("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
-  fatal = true;
 }
 throw e;
-  } finally {
-if (fatal) {
-  Halt.halt(1, new Runnable() {
-@Override
-public void run() {
-  logGCInfo(getSystemConfiguration());
-}
-  });
-}
   }
 
   if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {



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

2015-06-01 Thread elserj
Merge branch '1.7'


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

Branch: refs/heads/master
Commit: fba068b7b5dab69428042f8e7fae50673079d7fe
Parents: 8c05943 99c734c
Author: Josh Elser 
Authored: Mon Jun 1 18:41:33 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:41:33 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


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



[1/6] accumulo git commit: ACCUMULO-3880 Remove halt on bad SystemToken.

2015-06-01 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.6 cc25f5135 -> 9a4dd3000
  refs/heads/1.7 d71e5ee4c -> 99c734c8c
  refs/heads/master 8c059437d -> fba068b7b


ACCUMULO-3880 Remove halt on bad SystemToken.

While incorrect SystemTokens might sometimes be
the product of inconsistent system configuration,
it can also be used as an attack vector by
malicious parties. We need to treat invalid
authentications for the system user the same
as regular users (deny them and keep going).


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

Branch: refs/heads/1.6
Commit: 9a4dd3000ce5c8e1ebb884810b7ad3195bb1fa43
Parents: cc25f51
Author: Josh Elser 
Authored: Mon Jun 1 18:34:47 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:34:47 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9a4dd300/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 c502166..128aaa9 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
@@ -2206,7 +2206,6 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 private ZooCache masterLockCache = new ZooCache();
 
 private void checkPermission(TCredentials credentials, String lock, final 
String request) throws ThriftSecurityException {
-  boolean fatal = false;
   try {
 log.debug("Got " + request + " message from user: " + 
credentials.getPrincipal());
 if (!security.canPerformSystemActions(credentials)) {
@@ -2217,18 +2216,8 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 log.warn("Got " + request + " message from unauthenticatable user: " + 
e.getUser());
 if 
(SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
   log.fatal("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
-  fatal = true;
 }
 throw e;
-  } finally {
-if (fatal) {
-  Halt.halt(1, new Runnable() {
-@Override
-public void run() {
-  logGCInfo(getSystemConfiguration());
-}
-  });
-}
   }
 
   if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {



[3/6] accumulo git commit: ACCUMULO-3880 Remove halt on bad SystemToken.

2015-06-01 Thread elserj
ACCUMULO-3880 Remove halt on bad SystemToken.

While incorrect SystemTokens might sometimes be
the product of inconsistent system configuration,
it can also be used as an attack vector by
malicious parties. We need to treat invalid
authentications for the system user the same
as regular users (deny them and keep going).


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

Branch: refs/heads/master
Commit: 9a4dd3000ce5c8e1ebb884810b7ad3195bb1fa43
Parents: cc25f51
Author: Josh Elser 
Authored: Mon Jun 1 18:34:47 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:34:47 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9a4dd300/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 c502166..128aaa9 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
@@ -2206,7 +2206,6 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 private ZooCache masterLockCache = new ZooCache();
 
 private void checkPermission(TCredentials credentials, String lock, final 
String request) throws ThriftSecurityException {
-  boolean fatal = false;
   try {
 log.debug("Got " + request + " message from user: " + 
credentials.getPrincipal());
 if (!security.canPerformSystemActions(credentials)) {
@@ -2217,18 +2216,8 @@ public class TabletServer extends AbstractMetricsImpl 
implements org.apache.accu
 log.warn("Got " + request + " message from unauthenticatable user: " + 
e.getUser());
 if 
(SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
   log.fatal("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
-  fatal = true;
 }
 throw e;
-  } finally {
-if (fatal) {
-  Halt.halt(1, new Runnable() {
-@Override
-public void run() {
-  logGCInfo(getSystemConfiguration());
-}
-  });
-}
   }
 
   if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {



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

2015-06-01 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:

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


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

Branch: refs/heads/1.7
Commit: 99c734c8c5c389ea600fe08117c183365c89d8b8
Parents: d71e5ee 9a4dd30
Author: Josh Elser 
Authored: Mon Jun 1 18:37:30 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 18:37:30 2015 -0400

--
 .../java/org/apache/accumulo/tserver/TabletServer.java   | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/99c734c8/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 df0848d,128aaa9..b4c5e5f
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -1380,30 -2203,21 +1380,19 @@@ public class TabletServer extends Accum
return result;
  }
  
 -private ZooCache masterLockCache = new ZooCache();
 -
  private void checkPermission(TCredentials credentials, String lock, final 
String request) throws ThriftSecurityException {
-   boolean fatal = false;
try {
 -log.debug("Got " + request + " message from user: " + 
credentials.getPrincipal());
 +log.trace("Got " + request + " message from user: " + 
credentials.getPrincipal());
  if (!security.canPerformSystemActions(credentials)) {
log.warn("Got " + request + " message from user: " + 
credentials.getPrincipal());
throw new ThriftSecurityException(credentials.getPrincipal(), 
SecurityErrorCode.PERMISSION_DENIED);
  }
} catch (ThriftSecurityException e) {
  log.warn("Got " + request + " message from unauthenticatable user: " 
+ e.getUser());
 -if 
(SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
 -  log.fatal("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
 +if 
(getCredentials().getToken().getClass().getName().equals(credentials.getTokenClassName()))
 {
 +  log.error("Got message from a service with a mismatched 
configuration. Please ensure a compatible configuration.", e);
-   fatal = true;
  }
  throw e;
-   } finally {
- if (fatal) {
-   Halt.halt(1, new Runnable() {
- @Override
- public void run() {
-   gcLogger.logGCInfo(TabletServer.this.getConfiguration());
- }
-   });
- }
}
  
if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {



accumulo git commit: ACCUMULO-2654 test should close filesystems it did not open

2015-06-01 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/master 4f8d61db5 -> 8c059437d


ACCUMULO-2654 test should close filesystems it did not open


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

Branch: refs/heads/master
Commit: 8c059437d077ddb441a2f01e37e4c58aa3c614cb
Parents: 4f8d61d
Author: Eric C. Newton 
Authored: Mon Jun 1 17:43:29 2015 -0400
Committer: Eric C. Newton 
Committed: Mon Jun 1 17:43:29 2015 -0400

--
 .../apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java  | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8c059437/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
 
b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
index 7793627..9fd52bb 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
@@ -32,7 +32,6 @@ import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Da
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
@@ -105,7 +104,6 @@ public class RecoveryWithEmptyRFileIT extends 
ConfigurableMacIT {
 }
 scan.close();
 assertEquals(0l, cells);
-FileSystem.closeAll();
   }
 
 }



[1/2] accumulo git commit: ACCUMULO-3871 broke replication with log markers in zookeeper

2015-06-01 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/master 5fbd67157 -> 4f8d61db5


ACCUMULO-3871 broke replication with log markers in zookeeper


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

Branch: refs/heads/master
Commit: a108651e3338f582b35fb7c44c4e29759ec3a41e
Parents: f6bd3ee
Author: Eric C. Newton 
Authored: Mon Jun 1 16:47:17 2015 -0400
Committer: Eric C. Newton 
Committed: Mon Jun 1 16:47:17 2015 -0400

--
 .../CloseWriteAheadLogReferences.java   | 88 +++-
 .../CloseWriteAheadLogReferencesTest.java   | 69 ---
 ...bageCollectorCommunicatesWithTServersIT.java |  6 +-
 3 files changed, 12 insertions(+), 151 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a108651e/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
--
diff --git 
a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
 
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
index a3652e2..1444127 100644
--- 
a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
+++ 
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
@@ -17,7 +17,6 @@
 package org.apache.accumulo.gc.replication;
 
 import java.util.Collections;
-import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map.Entry;
@@ -44,7 +43,6 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.trace.Span;
 import org.apache.accumulo.core.trace.Trace;
-import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.trace.thrift.TInfo;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.log.WalStateManager;
@@ -102,54 +100,23 @@ public class CloseWriteAheadLogReferences implements 
Runnable {
 }
 
 Span findWalsSpan = Trace.start("findReferencedWals");
-HashSet referencedWals = null;
+HashSet closed = null;
 try {
   sw.start();
-  referencedWals = getReferencedWals(conn);
+  closed = getClosedLogs(conn);
 } finally {
   sw.stop();
   findWalsSpan.stop();
 }
 
-log.info("Found " + referencedWals.size() + " WALs referenced in metadata 
in " + sw.toString());
-log.debug("Referenced WALs: " + referencedWals);
+log.info("Found " + closed.size() + " WALs referenced in metadata in " + 
sw.toString());
 sw.reset();
 
-// ACCUMULO-3320 WALs cannot be closed while a TabletServer may still use 
it later.
-//
-// In addition to the WALs that are actively referenced in the metadata 
table, tservers can also hold on to a WAL that is not presently referenced by 
any
-// tablet. For example, a tablet could MinC which would end in all logs 
for that tablet being removed. However, if more data was ingested into the 
table,
-// the same WAL could be re-used again by that tserver.
-//
-// If this code happened to run after the compaction but before the log is 
again referenced by a tabletserver, we might delete the WAL reference, only to
-// have it recreated again which causes havoc with the replication status 
for a table.
-final TInfo tinfo = Tracer.traceInfo();
-Set activeWals;
-Span findActiveWalsSpan = Trace.start("findActiveWals");
-try {
-  sw.start();
-  activeWals = getActiveWals(tinfo);
-} finally {
-  sw.stop();
-  findActiveWalsSpan.stop();
-}
-
-if (null == activeWals) {
-  log.warn("Could not compute the set of currently active WALs. Not 
closing any files");
-  return;
-}
-
-log.debug("Got active WALs from all tservers " + activeWals);
-
-referencedWals.addAll(activeWals);
-
-log.info("Found " + activeWals.size() + " WALs actively in use by 
TabletServers in " + sw.toString());
-
 Span updateReplicationSpan = Trace.start("updateReplicationTable");
 long recordsClosed = 0;
 try {
   sw.start();
-  recordsClosed = updateReplicationEntries(conn, referencedWals);
+  recordsClosed = updateReplicationEntries(conn, closed);
 } finally {
   sw.stop();
   updateReplicationSpan.stop();
@@ -158,8 +125,6 @@ public class CloseWriteAheadLogReferences implements 
Runnable {
 log.info("Closed " + recordsClosed + " WAL replication references in 
replication table in " + sw.toString());
   }
 
-  static final EnumSe

[2/2] accumulo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo

2015-06-01 Thread ecn
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo


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

Branch: refs/heads/master
Commit: 4f8d61db591343a31c0c31b7ea2f1f09da1afb6f
Parents: a108651 5fbd671
Author: Eric C. Newton 
Authored: Mon Jun 1 16:47:39 2015 -0400
Committer: Eric C. Newton 
Committed: Mon Jun 1 16:47:39 2015 -0400

--
 .../impl/MiniAccumuloClusterImpl.java   | 10 ++--
 .../security/handler/KerberosAuthenticator.java |  8 +--
 .../apache/accumulo/test/TableOperationsIT.java | 24 
 .../replication/MultiInstanceReplicationIT.java |  7 ++
 4 files changed, 41 insertions(+), 8 deletions(-)
--




[3/9] accumulo git commit: ACCUMULO-3879 Improved logging on MultiInstanceReplicationIT

2015-06-01 Thread elserj
ACCUMULO-3879 Improved logging on MultiInstanceReplicationIT


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

Branch: refs/heads/1.7
Commit: a31ada5425c62a07195cf8148e60ed4735c1af57
Parents: c100231
Author: Josh Elser 
Authored: Mon Jun 1 14:41:36 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 14:44:20 2015 -0400

--
 .../accumulo/test/replication/MultiInstanceReplicationIT.java | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a31ada54/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
 
b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 7dd31c0..3dc029e 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -216,6 +216,8 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
 
   final Set filesNeedingReplication = 
connMaster.replicationOperations().referencedFiles(masterTable);
 
+  log.info("Files to replicate: " + filesNeedingReplication);
+
   for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
 cluster.killProcess(ServerType.TABLET_SERVER, proc);
   }
@@ -403,6 +405,9 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
   Set filesFor1 = 
connMaster.replicationOperations().referencedFiles(masterTable1), filesFor2 = 
connMaster.replicationOperations().referencedFiles(
   masterTable2);
 
+  log.info("Files to replicate for table1: " + filesFor1);
+  log.info("Files to replicate for table2: " + filesFor2);
+
   // Restart the tserver to force a close on the WAL
   for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
 cluster.killProcess(ServerType.TABLET_SERVER, proc);
@@ -520,6 +525,8 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
 
 Set files = 
connMaster.replicationOperations().referencedFiles(masterTable);
 
+log.info("Files to replicate:" + files);
+
 for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
   cluster.killProcess(ServerType.TABLET_SERVER, proc);
 }



[1/9] accumulo git commit: ACCUMULO-3877 Fix the test to acct for compactions over both tablets.

2015-06-01 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.7 3289940fb -> d71e5ee4c
  refs/heads/master f6bd3eecd -> 5fbd67157


ACCUMULO-3877 Fix the test to acct for compactions over both tablets.


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

Branch: refs/heads/1.7
Commit: c100231a644a20b48aaa8014aa6c41dfa0781ed3
Parents: 3289940
Author: Josh Elser 
Authored: Mon Jun 1 13:05:28 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 13:05:28 2015 -0400

--
 .../apache/accumulo/test/TableOperationsIT.java | 24 
 1 file changed, 20 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c100231a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java 
b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
index ced9d69..dc8f9dd 100644
--- a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
@@ -61,7 +61,6 @@ import org.apache.accumulo.test.functional.BadIterator;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.junit.Assert;
-import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -305,9 +304,26 @@ public class TableOperationsIT extends AccumuloClusterIT {
 Map actual = new TreeMap<>(COMPARE_KEY_TO_COLQ); // only 
compare row, colF, colQ
 for (Map.Entry entry : scanner)
   actual.put(entry.getKey(), entry.getValue());
-Assume
-.assumeFalse("Compaction successfully occurred due to weird timing but 
we hoped it would cancel.", HardListIterator.allEntriesToInject.equals(actual));
-assertTrue("Scan should be empty if compaction canceled. " + "Actual is " 
+ actual, actual.isEmpty());
+switch (actual.size()) {
+  case 3:
+// Compaction cancel didn't happen in time
+assertTrue(HardListIterator.allEntriesToInject.equals(actual));
+break;
+  case 2:
+// Compacted the first tablet (-inf, f)
+assertEquals(HardListIterator.allEntriesToInject.headMap(new 
Key("f")), actual);
+break;
+  case 1:
+// Compacted the second tablet [f, +inf)
+assertEquals(HardListIterator.allEntriesToInject.tailMap(new 
Key("f")), actual);
+break;
+  case 0:
+// Cancelled the compaction before it ran. No generated entries.
+break;
+  default:
+Assert.fail("Unexpected number of entries");
+break;
+}
 connector.tableOperations().delete(tableName);
   }
 



[7/9] accumulo git commit: ACCUMULO-3874 base64 decode the principal before sending it back

2015-06-01 Thread elserj
ACCUMULO-3874 base64 decode the principal before sending it back


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

Branch: refs/heads/master
Commit: d71e5ee4c3b331e9467769d177876b0b2859e978
Parents: acb5d2e
Author: Josh Elser 
Authored: Mon Jun 1 15:38:55 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 15:38:55 2015 -0400

--
 .../server/security/handler/KerberosAuthenticator.java   | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d71e5ee4/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
 
b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
index 4ec4ba4..3ead57f 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
@@ -171,8 +171,12 @@ public class KerberosAuthenticator implements 
Authenticator {
 
   @Override
   public synchronized void dropUser(String user) throws 
AccumuloSecurityException {
-user = Base64.encodeBase64String(user.getBytes(UTF_8));
-zkAuthenticator.dropUser(user);
+final String encodedUser = Base64.encodeBase64String(user.getBytes(UTF_8));
+try {
+  zkAuthenticator.dropUser(encodedUser);
+} catch (AccumuloSecurityException e) {
+  throw new AccumuloSecurityException(user, 
e.asThriftException().getCode(), e.getCause());
+}
   }
 
   @Override



[5/9] accumulo git commit: ACCUMULO-3878 Add a missing list delimiter

2015-06-01 Thread elserj
ACCUMULO-3878 Add a missing list delimiter


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

Branch: refs/heads/1.7
Commit: acb5d2e2bed89db4d0b294e987cde18d1689fd12
Parents: a31ada5
Author: Josh Elser 
Authored: Mon Jun 1 14:47:54 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 15:38:46 2015 -0400

--
 .../minicluster/impl/MiniAccumuloClusterImpl.java | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/acb5d2e2/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
--
diff --git 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 2e631b8..5ca0429 100644
--- 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -90,6 +90,7 @@ import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriterFactory;
 import org.apache.accumulo.start.Main;
 import org.apache.accumulo.start.classloader.vfs.MiniDFSUtil;
+import org.apache.commons.configuration.AbstractConfiguration;
 import org.apache.commons.configuration.MapConfiguration;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.vfs2.FileObject;
@@ -728,8 +729,13 @@ public class MiniAccumuloClusterImpl implements 
AccumuloCluster {
 
   @Override
   public ClientConfiguration getClientConfig() {
-return new ClientConfiguration(Arrays.asList(new 
MapConfiguration(config.getSiteConfig(.withInstance(this.getInstanceName()).withZkHosts(
-this.getZooKeepers());
+return new 
ClientConfiguration(getConfigs(config)).withInstance(this.getInstanceName()).withZkHosts(this.getZooKeepers());
+  }
+
+  private static List getConfigs(MiniAccumuloConfigImpl 
config) {
+MapConfiguration cfg = new MapConfiguration(config.getSiteConfig());
+cfg.setListDelimiter('\0');
+return Collections. singletonList(cfg);
   }
 
   @Override



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

2015-06-01 Thread elserj
Merge branch '1.7'


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

Branch: refs/heads/master
Commit: 5fbd67157d05efa85b54cd350ef2a0f32302214d
Parents: f6bd3ee d71e5ee
Author: Josh Elser 
Authored: Mon Jun 1 15:40:07 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 15:40:07 2015 -0400

--
 .../impl/MiniAccumuloClusterImpl.java   | 10 ++--
 .../security/handler/KerberosAuthenticator.java |  8 +--
 .../apache/accumulo/test/TableOperationsIT.java | 24 
 .../replication/MultiInstanceReplicationIT.java |  7 ++
 4 files changed, 41 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5fbd6715/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5fbd6715/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
--



[8/9] accumulo git commit: ACCUMULO-3874 base64 decode the principal before sending it back

2015-06-01 Thread elserj
ACCUMULO-3874 base64 decode the principal before sending it back


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

Branch: refs/heads/1.7
Commit: d71e5ee4c3b331e9467769d177876b0b2859e978
Parents: acb5d2e
Author: Josh Elser 
Authored: Mon Jun 1 15:38:55 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 15:38:55 2015 -0400

--
 .../server/security/handler/KerberosAuthenticator.java   | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d71e5ee4/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
 
b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
index 4ec4ba4..3ead57f 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
@@ -171,8 +171,12 @@ public class KerberosAuthenticator implements 
Authenticator {
 
   @Override
   public synchronized void dropUser(String user) throws 
AccumuloSecurityException {
-user = Base64.encodeBase64String(user.getBytes(UTF_8));
-zkAuthenticator.dropUser(user);
+final String encodedUser = Base64.encodeBase64String(user.getBytes(UTF_8));
+try {
+  zkAuthenticator.dropUser(encodedUser);
+} catch (AccumuloSecurityException e) {
+  throw new AccumuloSecurityException(user, 
e.asThriftException().getCode(), e.getCause());
+}
   }
 
   @Override



[6/9] accumulo git commit: ACCUMULO-3878 Add a missing list delimiter

2015-06-01 Thread elserj
ACCUMULO-3878 Add a missing list delimiter


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

Branch: refs/heads/master
Commit: acb5d2e2bed89db4d0b294e987cde18d1689fd12
Parents: a31ada5
Author: Josh Elser 
Authored: Mon Jun 1 14:47:54 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 15:38:46 2015 -0400

--
 .../minicluster/impl/MiniAccumuloClusterImpl.java | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/acb5d2e2/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
--
diff --git 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 2e631b8..5ca0429 100644
--- 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -90,6 +90,7 @@ import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriterFactory;
 import org.apache.accumulo.start.Main;
 import org.apache.accumulo.start.classloader.vfs.MiniDFSUtil;
+import org.apache.commons.configuration.AbstractConfiguration;
 import org.apache.commons.configuration.MapConfiguration;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.vfs2.FileObject;
@@ -728,8 +729,13 @@ public class MiniAccumuloClusterImpl implements 
AccumuloCluster {
 
   @Override
   public ClientConfiguration getClientConfig() {
-return new ClientConfiguration(Arrays.asList(new 
MapConfiguration(config.getSiteConfig(.withInstance(this.getInstanceName()).withZkHosts(
-this.getZooKeepers());
+return new 
ClientConfiguration(getConfigs(config)).withInstance(this.getInstanceName()).withZkHosts(this.getZooKeepers());
+  }
+
+  private static List getConfigs(MiniAccumuloConfigImpl 
config) {
+MapConfiguration cfg = new MapConfiguration(config.getSiteConfig());
+cfg.setListDelimiter('\0');
+return Collections. singletonList(cfg);
   }
 
   @Override



[4/9] accumulo git commit: ACCUMULO-3879 Improved logging on MultiInstanceReplicationIT

2015-06-01 Thread elserj
ACCUMULO-3879 Improved logging on MultiInstanceReplicationIT


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

Branch: refs/heads/master
Commit: a31ada5425c62a07195cf8148e60ed4735c1af57
Parents: c100231
Author: Josh Elser 
Authored: Mon Jun 1 14:41:36 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 14:44:20 2015 -0400

--
 .../accumulo/test/replication/MultiInstanceReplicationIT.java | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a31ada54/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
 
b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 7dd31c0..3dc029e 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -216,6 +216,8 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
 
   final Set filesNeedingReplication = 
connMaster.replicationOperations().referencedFiles(masterTable);
 
+  log.info("Files to replicate: " + filesNeedingReplication);
+
   for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
 cluster.killProcess(ServerType.TABLET_SERVER, proc);
   }
@@ -403,6 +405,9 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
   Set filesFor1 = 
connMaster.replicationOperations().referencedFiles(masterTable1), filesFor2 = 
connMaster.replicationOperations().referencedFiles(
   masterTable2);
 
+  log.info("Files to replicate for table1: " + filesFor1);
+  log.info("Files to replicate for table2: " + filesFor2);
+
   // Restart the tserver to force a close on the WAL
   for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
 cluster.killProcess(ServerType.TABLET_SERVER, proc);
@@ -520,6 +525,8 @@ public class MultiInstanceReplicationIT extends 
ConfigurableMacIT {
 
 Set files = 
connMaster.replicationOperations().referencedFiles(masterTable);
 
+log.info("Files to replicate:" + files);
+
 for (ProcessReference proc : 
cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
   cluster.killProcess(ServerType.TABLET_SERVER, proc);
 }



[2/9] accumulo git commit: ACCUMULO-3877 Fix the test to acct for compactions over both tablets.

2015-06-01 Thread elserj
ACCUMULO-3877 Fix the test to acct for compactions over both tablets.


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

Branch: refs/heads/master
Commit: c100231a644a20b48aaa8014aa6c41dfa0781ed3
Parents: 3289940
Author: Josh Elser 
Authored: Mon Jun 1 13:05:28 2015 -0400
Committer: Josh Elser 
Committed: Mon Jun 1 13:05:28 2015 -0400

--
 .../apache/accumulo/test/TableOperationsIT.java | 24 
 1 file changed, 20 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c100231a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java 
b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
index ced9d69..dc8f9dd 100644
--- a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
@@ -61,7 +61,6 @@ import org.apache.accumulo.test.functional.BadIterator;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.junit.Assert;
-import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -305,9 +304,26 @@ public class TableOperationsIT extends AccumuloClusterIT {
 Map actual = new TreeMap<>(COMPARE_KEY_TO_COLQ); // only 
compare row, colF, colQ
 for (Map.Entry entry : scanner)
   actual.put(entry.getKey(), entry.getValue());
-Assume
-.assumeFalse("Compaction successfully occurred due to weird timing but 
we hoped it would cancel.", HardListIterator.allEntriesToInject.equals(actual));
-assertTrue("Scan should be empty if compaction canceled. " + "Actual is " 
+ actual, actual.isEmpty());
+switch (actual.size()) {
+  case 3:
+// Compaction cancel didn't happen in time
+assertTrue(HardListIterator.allEntriesToInject.equals(actual));
+break;
+  case 2:
+// Compacted the first tablet (-inf, f)
+assertEquals(HardListIterator.allEntriesToInject.headMap(new 
Key("f")), actual);
+break;
+  case 1:
+// Compacted the second tablet [f, +inf)
+assertEquals(HardListIterator.allEntriesToInject.tailMap(new 
Key("f")), actual);
+break;
+  case 0:
+// Cancelled the compaction before it ran. No generated entries.
+break;
+  default:
+Assert.fail("Unexpected number of entries");
+break;
+}
 connector.tableOperations().delete(tableName);
   }
 



[3/4] accumulo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo

2015-06-01 Thread ecn
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo


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

Branch: refs/heads/master
Commit: c5e6804871548addccaab77e9bdd33191a6bd0ee
Parents: 93cc4a1 fe97d51
Author: Eric C. Newton 
Authored: Mon Jun 1 11:31:25 2015 -0400
Committer: Eric C. Newton 
Committed: Mon Jun 1 11:31:25 2015 -0400

--
 .../core/client/ClientConfiguration.java|   1 +
 .../simple/mapreduce/bulk/VerifyIngest.java |  18 ++-
 .../impl/MiniAccumuloClusterControl.java|  31 ++---
 .../AuthenticationTokenSecretManager.java   |   5 +-
 .../ZooAuthenticationKeyDistributor.java|  15 ++-
 .../accumulo/master/tableOps/CloneTable.java|  17 ++-
 .../accumulo/tracer/AsyncSpanReceiver.java  |  14 +-
 .../accumulo/tracer/AsyncSpanReceiverTest.java  | 129 +++
 .../accumulo/test/functional/ExamplesIT.java|  31 +++--
 9 files changed, 206 insertions(+), 55 deletions(-)
--




[1/4] accumulo git commit: ACCUMULO-3423 little fixes to tests now that WAL refs are always in zookeeper

2015-06-01 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/master fe97d5111 -> f6bd3eecd


ACCUMULO-3423 little fixes to tests now that WAL refs are always in zookeeper


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

Branch: refs/heads/master
Commit: e97709a720009c4fa742083a362856b48ceb464e
Parents: 17646af
Author: Eric C. Newton 
Authored: Fri May 29 17:13:11 2015 -0400
Committer: Eric C. Newton 
Committed: Fri May 29 17:13:11 2015 -0400

--
 .../GarbageCollectorCommunicatesWithTServersIT.java| 3 ++-
 .../org/apache/accumulo/test/replication/ReplicationIT.java| 6 --
 2 files changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e97709a7/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
 
b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
index 4f9c69f..6196cca 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
@@ -219,7 +219,8 @@ public class GarbageCollectorCommunicatesWithTServersIT 
extends ConfigurableMacI
 Assert.assertEquals("Expected to only find one replication status 
message", 1, fileToStatus.size());
 
 String walName = fileToStatus.keySet().iterator().next();
-Assert.assertEquals("Expected log file name from tablet to equal 
replication entry", wals.iterator().next(), walName);
+wals.retainAll(fileToStatus.keySet());
+Assert.assertEquals(1, wals.size());
 
 Status status = fileToStatus.get(walName);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e97709a7/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java 
b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
index 5040295..4a3015d 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -349,8 +349,10 @@ public class ReplicationIT extends ConfigurableMacIT {
 // We should find an entry in tablet and in the repl row
 Assert.assertEquals("Rows found: " + replRows, 1, replRows.size());
 
-// This should be the same set of WALs that we also are using
-Assert.assertEquals(replRows, wals);
+// There should only be one extra WALog that replication doesn't know about
+replRows.removeAll(wals);
+Assert.assertEquals(2, wals.size());
+Assert.assertEquals(0, replRows.size());
   }
 
   @Test



[2/4] accumulo git commit: ACCUMULO-3871 added a small m/r job that can read tests from a file, and execute them

2015-06-01 Thread ecn
ACCUMULO-3871 added a small m/r job that can read tests from a file, and 
execute them


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

Branch: refs/heads/master
Commit: 93cc4a1dff255ed196efc8ed100f327e77226221
Parents: e97709a
Author: Eric C. Newton 
Authored: Fri May 29 17:19:50 2015 -0400
Committer: Eric C. Newton 
Committed: Fri May 29 17:19:50 2015 -0400

--
 assemble/pom.xml|  11 ++
 test/pom.xml|  24 
 .../accumulo/test/IntegrationTestMapReduce.java | 113 +++
 .../test/functional/ConfigurableMacIT.java  |   4 +-
 4 files changed, 151 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/93cc4a1d/assemble/pom.xml
--
diff --git a/assemble/pom.xml b/assemble/pom.xml
index b965fe6..525b443 100644
--- a/assemble/pom.xml
+++ b/assemble/pom.xml
@@ -223,6 +223,17 @@
   
   
 
+  test-jar
+  
+
+  org.apache.accumulo
+  accumulo-test
+  ${project.version}
+  tests
+
+  
+
+
   apache-release
   
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/93cc4a1d/test/pom.xml
--
diff --git a/test/pom.xml b/test/pom.xml
index f943eed..516461b 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -183,6 +183,11 @@
   test
 
 
+  org.easymock
+  easymock
+  test
+
+
   org.eclipse.jetty
   jetty-server
   test
@@ -235,6 +240,25 @@
   
   
 
+  test-jar
+  
+
+  
+org.apache.maven.plugins
+maven-jar-plugin
+
+  
+make-test-jar
+
+  test-jar
+
+  
+
+  
+
+  
+
+
   shared-mini-for-it
   

[4/4] accumulo git commit: ACCUMULO-3871 fixed NPE and added more output to m/r runner; fixed some tests

2015-06-01 Thread ecn
ACCUMULO-3871 fixed NPE and added more output to m/r runner; fixed some tests


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

Branch: refs/heads/master
Commit: f6bd3eecd8e7f5704ae9804e9cf07b205de78a12
Parents: c5e6804
Author: Eric C. Newton 
Authored: Mon Jun 1 13:37:37 2015 -0400
Committer: Eric C. Newton 
Committed: Mon Jun 1 13:37:37 2015 -0400

--
 test/pom.xml|  7 +++
 .../accumulo/test/IntegrationTestMapReduce.java | 22 
 .../MissingWalHeaderCompletesRecoveryIT.java|  4 ++--
 .../accumulo/test/functional/CloneTestIT.java   |  3 +--
 ...bageCollectorCommunicatesWithTServersIT.java |  6 +++---
 5 files changed, 35 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/pom.xml
--
diff --git a/test/pom.xml b/test/pom.xml
index 516461b..c68e158 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -246,6 +246,13 @@
   
 org.apache.maven.plugins
 maven-jar-plugin
+
+  
+
+  false
+
+  
+
 
   
 make-test-jar

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java 
b/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
index 6b9e82e..42c1095 100644
--- a/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
+++ b/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
@@ -32,8 +32,11 @@ import 
org.apache.hadoop.mapreduce.lib.input.NLineInputFormat;
 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+import org.junit.runner.Description;
 import org.junit.runner.JUnitCore;
 import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,8 +55,27 @@ public class IntegrationTestMapReduce extends Configured 
implements Tool {
   } catch (ClassNotFoundException e) {
 log.debug("Error finding class {}", className, e);
 context.write(new IntWritable(-1), new Text(e.toString()));
+return;
   }
   JUnitCore core = new JUnitCore();
+  core.addListener(new RunListener() {
+
+@Override
+public void testStarted(Description description) throws Exception {
+  log.info("Starting {}", description);
+}
+
+@Override
+public void testFinished(Description description) throws Exception {
+  log.info("Finished {}", description);
+}
+
+@Override
+public void testFailure(Failure failure) throws Exception {
+  log.info("Test failed: {}", failure.getDescription(), 
failure.getException());
+}
+
+  });
   log.info("Running test {}", className);
   Result result = core.run(test);
   if (result.wasSuccessful()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java
 
b/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java
index e315841..81c5d84 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java
@@ -105,7 +105,7 @@ public class MissingWalHeaderCompletesRecoveryIT extends 
ConfigurableMacIT {
   public void testEmptyWalRecoveryCompletes() throws Exception {
 Connector conn = getConnector();
 MiniAccumuloClusterImpl cluster = getCluster();
-FileSystem fs = FileSystem.get(new Configuration());
+FileSystem fs = cluster.getFileSystem();
 
 // Fake out something that looks like host:port, it's irrelevant
 String fakeServer = "127.0.0.1:12345";
@@ -157,7 +157,7 @@ public class MissingWalHeaderCompletesRecoveryIT extends 
ConfigurableMacIT {
   public void testPartialHeaderWalRecoveryCompletes() throws Exception {
 Connector conn = getC