[2/6] accumulo git commit: ACCUMULO-3958 Ensure only non-null instance name is cached.

2015-08-24 Thread elserj
ACCUMULO-3958 Ensure only non-null instance name is cached.


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

Branch: refs/heads/1.7
Commit: 0a8ec61c9d5583dd33f93b127966048fb1c4a09c
Parents: d4c8fa6
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 13:02:22 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 13:02:52 2015 -0400

--
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a8ec61c/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
--
diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index ecc5ece..25ee34f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -255,7 +255,10 @@ public class Monitor {
   public void run() {
 synchronized (Monitor.class) {
   if (cachedInstanceName.get().equals(DEFAULT_INSTANCE_NAME)) {
-
cachedInstanceName.set(HdfsZooInstance.getInstance().getInstanceName());
+final String instanceName = 
HdfsZooInstance.getInstance().getInstanceName();
+if (null != instanceName) {
+  cachedInstanceName.set(instanceName);
+}
   }
 }
   }



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

2015-08-24 Thread elserj
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/5ccb54ea
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5ccb54ea
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5ccb54ea

Branch: refs/heads/master
Commit: 5ccb54eae9bc98aac6ccf8e2ad704a836722118b
Parents: af5a37d 0a8ec61
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 13:03:12 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 13:03:12 2015 -0400

--
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5ccb54ea/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
--



[3/6] accumulo git commit: ACCUMULO-3958 Ensure only non-null instance name is cached.

2015-08-24 Thread elserj
ACCUMULO-3958 Ensure only non-null instance name is cached.


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

Branch: refs/heads/master
Commit: 0a8ec61c9d5583dd33f93b127966048fb1c4a09c
Parents: d4c8fa6
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 13:02:22 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 13:02:52 2015 -0400

--
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a8ec61c/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
--
diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index ecc5ece..25ee34f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -255,7 +255,10 @@ public class Monitor {
   public void run() {
 synchronized (Monitor.class) {
   if (cachedInstanceName.get().equals(DEFAULT_INSTANCE_NAME)) {
-
cachedInstanceName.set(HdfsZooInstance.getInstance().getInstanceName());
+final String instanceName = 
HdfsZooInstance.getInstance().getInstanceName();
+if (null != instanceName) {
+  cachedInstanceName.set(instanceName);
+}
   }
 }
   }



[1/6] accumulo git commit: ACCUMULO-3958 Ensure only non-null instance name is cached.

2015-08-24 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.6 d4c8fa62b - 0a8ec61c9
  refs/heads/1.7 af5a37d5b - 5ccb54eae
  refs/heads/master 7059d734b - 7e45a37d7


ACCUMULO-3958 Ensure only non-null instance name is cached.


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

Branch: refs/heads/1.6
Commit: 0a8ec61c9d5583dd33f93b127966048fb1c4a09c
Parents: d4c8fa6
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 13:02:22 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 13:02:52 2015 -0400

--
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0a8ec61c/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
--
diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index ecc5ece..25ee34f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -255,7 +255,10 @@ public class Monitor {
   public void run() {
 synchronized (Monitor.class) {
   if (cachedInstanceName.get().equals(DEFAULT_INSTANCE_NAME)) {
-
cachedInstanceName.set(HdfsZooInstance.getInstance().getInstanceName());
+final String instanceName = 
HdfsZooInstance.getInstance().getInstanceName();
+if (null != instanceName) {
+  cachedInstanceName.set(instanceName);
+}
   }
 }
   }



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

2015-08-24 Thread elserj
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/5ccb54ea
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5ccb54ea
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5ccb54ea

Branch: refs/heads/1.7
Commit: 5ccb54eae9bc98aac6ccf8e2ad704a836722118b
Parents: af5a37d 0a8ec61
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 13:03:12 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 13:03:12 2015 -0400

--
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java  | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5ccb54ea/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
--



[2/9] accumulo git commit: ACCUMULO-3967 Fix whitespace

2015-08-24 Thread elserj
ACCUMULO-3967 Fix whitespace


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

Branch: refs/heads/1.7
Commit: e0cc9a843ad508e1c11db0caac488e5b99475e84
Parents: 0a8ec61
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:13:14 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:13:14 2015 -0400

--
 .../java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0cc9a84/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
index 9a3f489..04bfe88 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
@@ -83,7 +83,7 @@ public class BulkImportSequentialRowsIT extends 
AccumuloClusterIT {
 Path rfile = new Path(bulk, file.rf);
 FileSKVWriter writer = 
FileOperations.getInstance().openWriter(rfile.toString(), fs, new 
Configuration(), DefaultConfiguration.getInstance());
 writer.startDefaultLocalityGroup();
-
+
 final Value emptyValue = new Value(new byte[0]);
 final SortedSetText splits = new TreeSetText();
 for (int i = 0; i  100; i++) {



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

2015-08-24 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:

shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java


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

Branch: refs/heads/master
Commit: 67d6d7c56f859a33029e24da4aa025e52ecbd03b
Parents: 5ccb54e c3da293
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:35:58 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:35:58 2015 -0400

--

--




[1/9] accumulo git commit: ACCUMULO-3967 Fix whitespace

2015-08-24 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.6 0a8ec61c9 - c3da293a5
  refs/heads/1.7 5ccb54eae - 67d6d7c56
  refs/heads/master 7e45a37d7 - 5e1c0d1db


ACCUMULO-3967 Fix whitespace


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

Branch: refs/heads/1.6
Commit: e0cc9a843ad508e1c11db0caac488e5b99475e84
Parents: 0a8ec61
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:13:14 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:13:14 2015 -0400

--
 .../java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0cc9a84/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
index 9a3f489..04bfe88 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
@@ -83,7 +83,7 @@ public class BulkImportSequentialRowsIT extends 
AccumuloClusterIT {
 Path rfile = new Path(bulk, file.rf);
 FileSKVWriter writer = 
FileOperations.getInstance().openWriter(rfile.toString(), fs, new 
Configuration(), DefaultConfiguration.getInstance());
 writer.startDefaultLocalityGroup();
-
+
 final Value emptyValue = new Value(new byte[0]);
 final SortedSetText splits = new TreeSetText();
 for (int i = 0; i  100; i++) {



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

2015-08-24 Thread elserj
Merge branch '1.6' into 1.7

Conflicts:

shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java


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

Branch: refs/heads/1.7
Commit: 67d6d7c56f859a33029e24da4aa025e52ecbd03b
Parents: 5ccb54e c3da293
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:35:58 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:35:58 2015 -0400

--

--




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

2015-08-24 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/5e1c0d1d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5e1c0d1d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5e1c0d1d

Branch: refs/heads/master
Commit: 5e1c0d1db9d30dae31cc92a3ae4c088527ab6a2a
Parents: 7e45a37 67d6d7c
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:36:08 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:36:08 2015 -0400

--

--




[6/9] accumulo git commit: ACCUMULO-3965 Checkstyle

2015-08-24 Thread elserj
ACCUMULO-3965 Checkstyle


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

Branch: refs/heads/master
Commit: c3da293a51d8526af2d9b0d7b347ac3ed5b54a54
Parents: e0cc9a8
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:18:28 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:18:28 2015 -0400

--
 .../core/util/shell/commands/ActiveScanIterator.java| 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3da293a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
index b027739..6065900 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
@@ -42,11 +42,10 @@ class ActiveScanIterator implements IteratorString {
 final ListActiveScan asl = instanceOps.getActiveScans(tserver);
 
 for (ActiveScan as : asl) {
-  scans
-  .add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
-  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
-  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
-  as.getSsiList(), as.getSsio()));
+  scans.add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
+  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
+  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
+  as.getSsiList(), as.getSsio()));
 }
   } catch (Exception e) {
 scans.add(tserver +  ERROR  + e.getMessage());



[3/9] accumulo git commit: ACCUMULO-3967 Fix whitespace

2015-08-24 Thread elserj
ACCUMULO-3967 Fix whitespace


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

Branch: refs/heads/master
Commit: e0cc9a843ad508e1c11db0caac488e5b99475e84
Parents: 0a8ec61
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:13:14 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:13:14 2015 -0400

--
 .../java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0cc9a84/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
index 9a3f489..04bfe88 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
@@ -83,7 +83,7 @@ public class BulkImportSequentialRowsIT extends 
AccumuloClusterIT {
 Path rfile = new Path(bulk, file.rf);
 FileSKVWriter writer = 
FileOperations.getInstance().openWriter(rfile.toString(), fs, new 
Configuration(), DefaultConfiguration.getInstance());
 writer.startDefaultLocalityGroup();
-
+
 final Value emptyValue = new Value(new byte[0]);
 final SortedSetText splits = new TreeSetText();
 for (int i = 0; i  100; i++) {



[4/9] accumulo git commit: ACCUMULO-3965 Checkstyle

2015-08-24 Thread elserj
ACCUMULO-3965 Checkstyle


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

Branch: refs/heads/1.6
Commit: c3da293a51d8526af2d9b0d7b347ac3ed5b54a54
Parents: e0cc9a8
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:18:28 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:18:28 2015 -0400

--
 .../core/util/shell/commands/ActiveScanIterator.java| 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3da293a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
index b027739..6065900 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
@@ -42,11 +42,10 @@ class ActiveScanIterator implements IteratorString {
 final ListActiveScan asl = instanceOps.getActiveScans(tserver);
 
 for (ActiveScan as : asl) {
-  scans
-  .add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
-  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
-  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
-  as.getSsiList(), as.getSsio()));
+  scans.add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
+  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
+  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
+  as.getSsiList(), as.getSsio()));
 }
   } catch (Exception e) {
 scans.add(tserver +  ERROR  + e.getMessage());



[5/9] accumulo git commit: ACCUMULO-3965 Checkstyle

2015-08-24 Thread elserj
ACCUMULO-3965 Checkstyle


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

Branch: refs/heads/1.7
Commit: c3da293a51d8526af2d9b0d7b347ac3ed5b54a54
Parents: e0cc9a8
Author: Josh Elser els...@apache.org
Authored: Mon Aug 24 14:18:28 2015 -0400
Committer: Josh Elser els...@apache.org
Committed: Mon Aug 24 14:18:28 2015 -0400

--
 .../core/util/shell/commands/ActiveScanIterator.java| 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3da293a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
index b027739..6065900 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ActiveScanIterator.java
@@ -42,11 +42,10 @@ class ActiveScanIterator implements IteratorString {
 final ListActiveScan asl = instanceOps.getActiveScans(tserver);
 
 for (ActiveScan as : asl) {
-  scans
-  .add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
-  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
-  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
-  as.getSsiList(), as.getSsio()));
+  scans.add(String.format(%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s 
|%10s |%20s |%10s |%20s |%10s | %s, tserver, as.getClient(),
+  Duration.format(as.getAge(), , -), 
Duration.format(as.getLastContactTime(), , -), as.getState(), as.getType(), 
as.getUser(),
+  as.getTable(), as.getColumns(), as.getAuthorizations(), 
(as.getType() == ScanType.SINGLE ? as.getExtent() : N/A), as.getScanid(),
+  as.getSsiList(), as.getSsio()));
 }
   } catch (Exception e) {
 scans.add(tserver +  ERROR  + e.getMessage());



[2/2] accumulo git commit: ACCUMULO-3735 allow users to see the bulk imports in progress

2015-08-24 Thread ecn
ACCUMULO-3735 allow users to see the bulk imports in progress


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

Branch: refs/heads/master
Commit: 784bd05a0038f8bc7b55f886e71e0b5e06eac316
Parents: 5e1c0d1
Author: Eric C. Newton eric.new...@gmail.com
Authored: Mon Aug 24 19:27:38 2015 -0400
Committer: Eric C. Newton eric.new...@gmail.com
Committed: Mon Aug 24 19:27:38 2015 -0400

--
 .../core/master/thrift/BulkImportState.java |  76 +++
 .../core/master/thrift/BulkImportStatus.java| 618 +++
 .../core/master/thrift/FateService.java |  76 +--
 .../core/master/thrift/MasterClientService.java |  64 +-
 .../core/master/thrift/MasterMonitorInfo.java   | 358 ---
 .../core/master/thrift/TabletServerStatus.java  | 214 ++-
 .../core/master/thrift/TabletSplit.java |  36 +-
 core/src/main/thrift/master.thrift  |  24 +
 .../server/client/ClientServiceHandler.java |  16 +-
 .../server/util/ServerBulkImportStatus.java |  51 ++
 .../accumulo/master/FateServiceHandler.java |   2 +
 .../java/org/apache/accumulo/master/Master.java |  14 +-
 .../accumulo/master/tableOps/BulkImport.java|   7 +-
 .../master/tableOps/CleanUpBulkImport.java  |   3 +
 .../accumulo/master/tableOps/CopyFailed.java|   3 +-
 .../accumulo/master/tableOps/LoadFiles.java |   5 +-
 .../org/apache/accumulo/monitor/Monitor.java|   2 +
 .../accumulo/monitor/servlets/BasicServlet.java |   1 +
 .../monitor/servlets/BulkImportServlet.java |  91 +++
 .../util/celltypes/BulkImportStateType.java |  29 +
 .../apache/accumulo/tserver/TabletServer.java   |  18 +-
 .../apache/accumulo/tserver/tablet/Tablet.java  |   8 +-
 .../accumulo/test/BulkImportMonitoringIT.java   | 129 
 .../apache/accumulo/test/GetFileInfoBulkIT.java |   2 +-
 .../apache/accumulo/test/GetMasterStats.java|  14 +
 25 files changed, 1629 insertions(+), 232 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
 
b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
new file mode 100644
index 000..861d3b9
--- /dev/null
+++ 
b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
@@ -0,0 +1,76 @@
+/*
+ * 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.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.master.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings({unused}) public enum BulkImportState implements 
org.apache.thrift.TEnum {
+  INITIAL(0),
+  MOVING(1),
+  PROCESSING(2),
+  ASSIGNING(3),
+  LOADING(4),
+  COPY_FILES(5),
+  CLEANUP(6);
+
+  private final int value;
+
+  private BulkImportState(int value) {
+this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static BulkImportState findByValue(int value) { 
+switch (value) {
+  case 0:
+return INITIAL;
+  case 1:
+return MOVING;
+  case 2:
+return PROCESSING;
+  case 3:
+return ASSIGNING;
+  case 4:
+return LOADING;
+  case 5:
+return COPY_FILES;
+  case 6:
+return CLEANUP;
+  default:
+return null;
+}
+  }
+}


[1/2] accumulo git commit: ACCUMULO-3735 allow users to see the bulk imports in progress

2015-08-24 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/master 5e1c0d1db - 784bd05a0


http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
 
b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index 588e3e0..c306e85 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -50,6 +50,8 @@ import 
org.apache.accumulo.core.client.security.tokens.KerberosToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.master.thrift.BulkImportState;
+import org.apache.accumulo.core.master.thrift.BulkImportStatus;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SystemPermission;
@@ -61,6 +63,7 @@ import 
org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
+import org.apache.accumulo.server.util.ServerBulkImportStatus;
 import org.apache.accumulo.server.util.TableDiskUsage;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
@@ -75,6 +78,7 @@ public class ClientServiceHandler implements 
ClientService.Iface {
   private final Instance instance;
   private final VolumeManager fs;
   private final SecurityOperation security;
+  private final ServerBulkImportStatus bulkImportStatus = new 
ServerBulkImportStatus();
 
   public ClientServiceHandler(AccumuloServerContext context, 
TransactionWatcher transactionWatcher, VolumeManager fs) {
 this.context = context;
@@ -294,11 +298,17 @@ public class ClientServiceHandler implements 
ClientService.Iface {
 try {
   if (!security.canPerformSystemActions(credentials))
 throw new AccumuloSecurityException(credentials.getPrincipal(), 
SecurityErrorCode.PERMISSION_DENIED);
+  bulkImportStatus.updateBulkImportStatus(files, BulkImportState.INITIAL);
   log.debug(Got request to bulk import files to table( + tableId + ):  
+ files);
   return transactionWatcher.run(Constants.BULK_ARBITRATOR_TYPE, tid, new 
CallableListString() {
 @Override
 public ListString call() throws Exception {
-  return BulkImporter.bulkLoad(context, tid, tableId, files, errorDir, 
setTime);
+  bulkImportStatus.updateBulkImportStatus(files, 
BulkImportState.PROCESSING);
+  try {
+return BulkImporter.bulkLoad(context, tid, tableId, files, 
errorDir, setTime);
+  } finally {
+bulkImportStatus.removeBulkImportStatus(files);
+  }
 }
   });
 } catch (AccumuloSecurityException e) {
@@ -452,4 +462,8 @@ public class ClientServiceHandler implements 
ClientService.Iface {
 AccumuloConfiguration config = 
context.getServerConfigurationFactory().getNamespaceConfiguration(namespaceId);
 return conf(credentials, config);
   }
+
+  public ListBulkImportStatus getBulkLoadStatus() {
+return bulkImportStatus.getBulkLoadStatus();
+  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/784bd05a/server/base/src/main/java/org/apache/accumulo/server/util/ServerBulkImportStatus.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/ServerBulkImportStatus.java
 
b/server/base/src/main/java/org/apache/accumulo/server/util/ServerBulkImportStatus.java
new file mode 100644
index 000..21815f8
--- /dev/null
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/util/ServerBulkImportStatus.java
@@ -0,0 +1,51 @@
+/*
+ * 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