accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [3/3] git commit: ACCUMULO-3263 merge 1.6
Date Wed, 29 Oct 2014 14:45:37 GMT
ACCUMULO-3263 merge 1.6


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

Branch: refs/heads/master
Commit: 04e4312ed947af790aaf77592c2104ff87c67f36
Parents: efc75d1 1abb862
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Oct 29 10:44:51 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Oct 29 10:44:51 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/server/util/Admin.java  |  2 +-
 .../accumulo/server/util/RandomizeVolumes.java  | 75 ++++++++++----------
 .../test/RewriteTabletDirectoriesIT.java        | 43 ++++++-----
 3 files changed, 67 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/04e4312e/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/04e4312e/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
index 197c46c,afc3902..751e28b
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
@@@ -46,14 -45,19 +45,19 @@@ import static org.apache.accumulo.core.
  
  public class RandomizeVolumes {
    private static final Logger log = Logger.getLogger(RandomizeVolumes.class);
 -
 +  
-   public static void main(String[] args) {
+   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException
{
      ClientOnRequiredTable opts = new ClientOnRequiredTable();
      opts.parseArgs(RandomizeVolumes.class.getName(), args);
-     String principal = SystemCredentials.get().getPrincipal();
-     AuthenticationToken token = SystemCredentials.get().getToken();
+     Connector c;
+     if (opts.getToken() == null) {
+       SystemCredentials creds = SystemCredentials.get();
+       c = opts.getInstance().getConnector(creds.getPrincipal(), creds.getToken());
+     } else {
+       c = opts.getConnector();
+     }
      try {
-       int status = randomize(opts.getInstance(), new Credentials(principal, token), opts.getTableName());
 -      int status = randomize(c, opts.tableName);
++      int status = randomize(c, opts.getTableName());
        System.exit(status);
      } catch (Exception ex) {
        log.error(ex, ex);


Mime
View raw message