accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1449467 [9/9] - in /accumulo/branches/ACCUMULO-259-polishing: core/src/main/java/org/apache/accumulo/core/cli/ core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main/java...
Date Sun, 24 Feb 2013 12:30:14 GMT
Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/Admin.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/Admin.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/Admin.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/Admin.java Sun Feb 24 12:30:11 2013
@@ -27,7 +27,7 @@ import org.apache.accumulo.core.client.i
 import org.apache.accumulo.core.client.impl.MasterClient;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.security.SecurityConstants;
@@ -81,7 +81,7 @@ public class Admin {
     Instance instance = opts.getInstance();
       
     try {
-      Credential creds;
+      TCredentials creds;
       if (opts.getToken() == null) {
         creds = SecurityConstants.getSystemCredentials();
       } else {
@@ -103,7 +103,7 @@ public class Admin {
     }
   }
   
-  private static void stopServer(Instance instance, final Credential credentials, final boolean tabletServersToo) throws AccumuloException, AccumuloSecurityException {
+  private static void stopServer(Instance instance, final TCredentials credentials, final boolean tabletServersToo) throws AccumuloException, AccumuloSecurityException {
     MasterClient.execute(HdfsZooInstance.getInstance(), new ClientExec<MasterClientService.Client>() {
       @Override
       public void execute(MasterClientService.Client client) throws Exception {
@@ -112,7 +112,7 @@ public class Admin {
     });
   }
   
-  private static void stopTabletServer(Instance instance, final Credential creds, List<String> servers, final boolean force) throws AccumuloException, AccumuloSecurityException {
+  private static void stopTabletServer(Instance instance, final TCredentials creds, List<String> servers, final boolean force) throws AccumuloException, AccumuloSecurityException {
     for (String server : servers) {
       InetSocketAddress address = AddressUtil.parseAddress(server, Property.TSERV_CLIENTPORT);
       final String finalServer = org.apache.accumulo.core.util.AddressUtil.toString(address);

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Sun Feb 24 12:30:11 2013
@@ -59,7 +59,7 @@ import org.apache.accumulo.core.data.Ran
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.file.FileUtil;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
 import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
 import org.apache.accumulo.core.util.CachedConfiguration;
@@ -95,7 +95,7 @@ import org.apache.zookeeper.KeeperExcept
 public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
   
   private static final Text EMPTY_TEXT = new Text();
-  private static Map<Credential,Writer> metadata_tables = new HashMap<Credential,Writer>();
+  private static Map<TCredentials,Writer> metadata_tables = new HashMap<TCredentials,Writer>();
   private static final Logger log = Logger.getLogger(MetadataTable.class);
   
   private static final int SAVE_ROOT_TABLET_RETRIES = 3;
@@ -104,7 +104,7 @@ public class MetadataTable extends org.a
     
   }
   
-  public synchronized static Writer getMetadataTable(Credential credentials) {
+  public synchronized static Writer getMetadataTable(TCredentials credentials) {
     Writer metadataTable = metadata_tables.get(credentials);
     if (metadataTable == null) {
       metadataTable = new Writer(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID);
@@ -117,11 +117,11 @@ public class MetadataTable extends org.a
     Constants.METADATA_LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/").getBytes()));
   }
   
-  public static void update(Credential credentials, Mutation m) {
+  public static void update(TCredentials credentials, Mutation m) {
     update(credentials, null, m);
   }
   
-  public static void update(Credential credentials, ZooLock zooLock, Mutation m) {
+  public static void update(TCredentials credentials, ZooLock zooLock, Mutation m) {
     Writer t;
     t = getMetadataTable(credentials);
     if (zooLock != null)
@@ -155,7 +155,7 @@ public class MetadataTable extends org.a
    * @param flushId
    * 
    */
-  public static void updateTabletDataFile(KeyExtent extent, String path, String mergeFile, DataFileValue dfv, String time, Credential credentials,
+  public static void updateTabletDataFile(KeyExtent extent, String path, String mergeFile, DataFileValue dfv, String time, TCredentials credentials,
       Set<String> filesInUseByScans, String address, ZooLock zooLock, Set<String> unusedWalLogs, TServerInstance lastLocation, long flushId) {
     if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
       if (unusedWalLogs != null) {
@@ -232,7 +232,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static void updateTabletFlushID(KeyExtent extent, long flushID, Credential credentials, ZooLock zooLock) {
+  public static void updateTabletFlushID(KeyExtent extent, long flushID, TCredentials credentials, ZooLock zooLock) {
     if (!extent.isRootTablet()) {
       Mutation m = new Mutation(extent.getMetadataEntry());
       Constants.METADATA_FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes()));
@@ -240,7 +240,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static void updateTabletCompactID(KeyExtent extent, long compactID, Credential credentials, ZooLock zooLock) {
+  public static void updateTabletCompactID(KeyExtent extent, long compactID, TCredentials credentials, ZooLock zooLock) {
     if (!extent.isRootTablet()) {
       Mutation m = new Mutation(extent.getMetadataEntry());
       Constants.METADATA_COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes()));
@@ -248,7 +248,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static void updateTabletDataFile(long tid, KeyExtent extent, Map<String,DataFileValue> estSizes, String time, Credential credentials, ZooLock zooLock) {
+  public static void updateTabletDataFile(long tid, KeyExtent extent, Map<String,DataFileValue> estSizes, String time, TCredentials credentials, ZooLock zooLock) {
     Mutation m = new Mutation(extent.getMetadataEntry());
     byte[] tidBytes = Long.toString(tid).getBytes();
     
@@ -261,7 +261,7 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void addTablet(KeyExtent extent, String path, Credential credentials, char timeType, ZooLock lock) {
+  public static void addTablet(KeyExtent extent, String path, TCredentials credentials, char timeType, ZooLock lock) {
     Mutation m = extent.getPrevRowUpdateMutation();
     
     Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes()));
@@ -270,7 +270,7 @@ public class MetadataTable extends org.a
     update(credentials, lock, m);
   }
   
-  public static void updateTabletPrevEndRow(KeyExtent extent, Credential credentials) {
+  public static void updateTabletPrevEndRow(KeyExtent extent, TCredentials credentials) {
     Mutation m = extent.getPrevRowUpdateMutation(); //
     update(credentials, m);
   }
@@ -324,7 +324,7 @@ public class MetadataTable extends org.a
     return results;
   }
   
-  public static boolean getBatchFromRootTablet(AccumuloConfiguration conf, Credential credentials, Text startRow, SortedMap<Key,Value> results,
+  public static boolean getBatchFromRootTablet(AccumuloConfiguration conf, TCredentials credentials, Text startRow, SortedMap<Key,Value> results,
       SortedSet<Column> columns, boolean skipStartRow, int size) throws AccumuloSecurityException {
     while (true) {
       try {
@@ -355,7 +355,7 @@ public class MetadataTable extends org.a
     return false;
   }
   
-  public static SortedMap<String,DataFileValue> getDataFileSizes(KeyExtent extent, Credential credentials) {
+  public static SortedMap<String,DataFileValue> getDataFileSizes(KeyExtent extent, TCredentials credentials) {
     TreeMap<String,DataFileValue> sizes = new TreeMap<String,DataFileValue>();
     
     Scanner mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, Constants.NO_AUTHS);
@@ -379,7 +379,7 @@ public class MetadataTable extends org.a
   }
   
   public static void addNewTablet(KeyExtent extent, String path, TServerInstance location, Map<String,DataFileValue> datafileSizes,
-      Map<String,Long> bulkLoadedFiles, Credential credentials, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) {
+      Map<String,Long> bulkLoadedFiles, TCredentials credentials, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) {
     Mutation m = extent.getPrevRowUpdateMutation();
     
     Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes()));
@@ -406,7 +406,7 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, Credential credentials, ZooLock zooLock) {
+  public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, TCredentials credentials, ZooLock zooLock) {
     Mutation m = extent.getPrevRowUpdateMutation(); //
     
     Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes()));
@@ -416,7 +416,7 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void finishSplit(Text metadataEntry, Map<String,DataFileValue> datafileSizes, List<String> highDatafilesToRemove, Credential credentials,
+  public static void finishSplit(Text metadataEntry, Map<String,DataFileValue> datafileSizes, List<String> highDatafilesToRemove, TCredentials credentials,
       ZooLock zooLock) {
     Mutation m = new Mutation(metadataEntry);
     Constants.METADATA_SPLIT_RATIO_COLUMN.putDelete(m);
@@ -434,18 +434,18 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void finishSplit(KeyExtent extent, Map<String,DataFileValue> datafileSizes, List<String> highDatafilesToRemove, Credential credentials,
+  public static void finishSplit(KeyExtent extent, Map<String,DataFileValue> datafileSizes, List<String> highDatafilesToRemove, TCredentials credentials,
       ZooLock zooLock) {
     finishSplit(extent.getMetadataEntry(), datafileSizes, highDatafilesToRemove, credentials, zooLock);
   }
   
   public static void replaceDatafiles(KeyExtent extent, Set<String> datafilesToDelete, Set<String> scanFiles, String path, Long compactionId,
-      DataFileValue size, Credential credentials, String address, TServerInstance lastLocation, ZooLock zooLock) {
+      DataFileValue size, TCredentials credentials, String address, TServerInstance lastLocation, ZooLock zooLock) {
     replaceDatafiles(extent, datafilesToDelete, scanFiles, path, compactionId, size, credentials, address, lastLocation, zooLock, true);
   }
   
   public static void replaceDatafiles(KeyExtent extent, Set<String> datafilesToDelete, Set<String> scanFiles, String path, Long compactionId,
-      DataFileValue size, Credential credentials, String address, TServerInstance lastLocation, ZooLock zooLock, boolean insertDeleteFlags) {
+      DataFileValue size, TCredentials credentials, String address, TServerInstance lastLocation, ZooLock zooLock, boolean insertDeleteFlags) {
     
     if (insertDeleteFlags) {
       // add delete flags for those paths before the data file reference is removed
@@ -477,7 +477,7 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void addDeleteEntries(KeyExtent extent, Set<String> datafilesToDelete, Credential credentials) {
+  public static void addDeleteEntries(KeyExtent extent, Set<String> datafilesToDelete, TCredentials credentials) {
     
     String tableId = extent.getTableId().toString();
     
@@ -501,7 +501,7 @@ public class MetadataTable extends org.a
     return delFlag;
   }
   
-  public static void removeScanFiles(KeyExtent extent, Set<String> scanFiles, Credential credentials, ZooLock zooLock) {
+  public static void removeScanFiles(KeyExtent extent, Set<String> scanFiles, TCredentials credentials, ZooLock zooLock) {
     Mutation m = new Mutation(extent.getMetadataEntry());
     
     for (String pathToRemove : scanFiles)
@@ -510,16 +510,16 @@ public class MetadataTable extends org.a
     update(credentials, zooLock, m);
   }
   
-  public static void getTabletAndPrevTabletKeyValues(SortedMap<Key,Value> tkv, KeyExtent ke, List<ColumnFQ> columns, Credential credentials) {
+  public static void getTabletAndPrevTabletKeyValues(SortedMap<Key,Value> tkv, KeyExtent ke, List<ColumnFQ> columns, TCredentials credentials) {
     getTabletAndPrevTabletKeyValues(HdfsZooInstance.getInstance(), tkv, ke, columns, credentials);
   }
   
-  public static SortedMap<Text,SortedMap<ColumnFQ,Value>> getTabletEntries(KeyExtent ke, List<ColumnFQ> columns, Credential credentials) {
+  public static SortedMap<Text,SortedMap<ColumnFQ,Value>> getTabletEntries(KeyExtent ke, List<ColumnFQ> columns, TCredentials credentials) {
     return getTabletEntries(HdfsZooInstance.getInstance(), ke, columns, credentials);
   }
   
   private static KeyExtent fixSplit(Text table, Text metadataEntry, Text metadataPrevEndRow, Value oper, double splitRatio, TServerInstance tserver,
-      Credential credentials, String time, long initFlushID, long initCompactID, ZooLock lock) throws AccumuloException {
+      TCredentials credentials, String time, long initFlushID, long initCompactID, ZooLock lock) throws AccumuloException {
     if (metadataPrevEndRow == null)
       // something is wrong, this should not happen... if a tablet is split, it will always have a
       // prev end row....
@@ -615,7 +615,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static KeyExtent fixSplit(Text metadataEntry, SortedMap<ColumnFQ,Value> columns, TServerInstance tserver, Credential credentials, ZooLock lock)
+  public static KeyExtent fixSplit(Text metadataEntry, SortedMap<ColumnFQ,Value> columns, TServerInstance tserver, TCredentials credentials, ZooLock lock)
       throws AccumuloException {
     log.warn("Incomplete split " + metadataEntry + " attempting to fix");
     
@@ -659,7 +659,7 @@ public class MetadataTable extends org.a
     return fixSplit(table, metadataEntry, metadataPrevEndRow, oper, splitRatio, tserver, credentials, time.toString(), initFlushID, initCompactID, lock);
   }
   
-  public static void deleteTable(String tableId, boolean insertDeletes, Credential credentials, ZooLock lock) throws AccumuloException {
+  public static void deleteTable(String tableId, boolean insertDeletes, TCredentials credentials, ZooLock lock) throws AccumuloException {
     Scanner ms = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, Constants.NO_AUTHS);
     Text tableIdText = new Text(tableId);
     BatchWriter bw = new BatchWriterImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, new BatchWriterConfig().setMaxMemory(1000000)
@@ -772,7 +772,7 @@ public class MetadataTable extends org.a
     return ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZROOT_TABLET_WALOGS;
   }
   
-  public static void addLogEntry(Credential credentials, LogEntry entry, ZooLock zooLock) {
+  public static void addLogEntry(TCredentials credentials, LogEntry entry, ZooLock zooLock) {
     if (entry.extent.isRootTablet()) {
       String root = getZookeeperLogLocation();
       while (true) {
@@ -811,7 +811,7 @@ public class MetadataTable extends org.a
     return e;
   }
   
-  public static Pair<List<LogEntry>,SortedMap<String,DataFileValue>> getFileAndLogEntries(Credential credentials, KeyExtent extent) throws KeeperException,
+  public static Pair<List<LogEntry>,SortedMap<String,DataFileValue>> getFileAndLogEntries(TCredentials credentials, KeyExtent extent) throws KeeperException,
       InterruptedException, IOException {
     ArrayList<LogEntry> result = new ArrayList<LogEntry>();
     TreeMap<String,DataFileValue> sizes = new TreeMap<String,DataFileValue>();
@@ -854,7 +854,7 @@ public class MetadataTable extends org.a
     return new Pair<List<LogEntry>,SortedMap<String,DataFileValue>>(result, sizes);
   }
   
-  public static List<LogEntry> getLogEntries(Credential credentials, KeyExtent extent) throws IOException, KeeperException, InterruptedException {
+  public static List<LogEntry> getLogEntries(TCredentials credentials, KeyExtent extent) throws IOException, KeeperException, InterruptedException {
     log.info("Scanning logging entries for " + extent);
     ArrayList<LogEntry> result = new ArrayList<LogEntry>();
     if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
@@ -899,7 +899,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  private static Scanner getTabletLogScanner(Credential credentials, KeyExtent extent) {
+  private static Scanner getTabletLogScanner(TCredentials credentials, KeyExtent extent) {
     Scanner scanner = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, Constants.NO_AUTHS);
     scanner.fetchColumnFamily(Constants.METADATA_LOG_COLUMN_FAMILY);
     Text start = extent.getMetadataEntry();
@@ -914,7 +914,7 @@ public class MetadataTable extends org.a
     Iterator<LogEntry> rootTabletEntries = null;
     Iterator<Entry<Key,Value>> metadataEntries = null;
     
-    LogEntryIterator(Credential creds) throws IOException, KeeperException, InterruptedException {
+    LogEntryIterator(TCredentials creds) throws IOException, KeeperException, InterruptedException {
       rootTabletEntries = getLogEntries(creds, Constants.ROOT_TABLET_EXTENT).iterator();
       try {
         Scanner scanner = HdfsZooInstance.getInstance().getConnector(creds.getPrincipal(), CredentialHelper.extractToken(creds))
@@ -946,7 +946,7 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static Iterator<LogEntry> getLogEntries(Credential creds) throws IOException, KeeperException, InterruptedException {
+  public static Iterator<LogEntry> getLogEntries(TCredentials creds) throws IOException, KeeperException, InterruptedException {
     return new LogEntryIterator(creds);
   }
   
@@ -1211,11 +1211,11 @@ public class MetadataTable extends org.a
     }
   }
   
-  public static Map<String,Long> getBulkFilesLoaded(Credential credentials, KeyExtent extent) {
+  public static Map<String,Long> getBulkFilesLoaded(TCredentials credentials, KeyExtent extent) {
     return getBulkFilesLoaded(credentials, extent.getMetadataEntry());
   }
   
-  public static Map<String,Long> getBulkFilesLoaded(Credential credentials, Text metadataRow) {
+  public static Map<String,Long> getBulkFilesLoaded(TCredentials credentials, Text metadataRow) {
     
     Map<String,Long> ret = new HashMap<String,Long>();
     

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java Sun Feb 24 12:30:11 2013
@@ -44,7 +44,7 @@ import org.apache.accumulo.core.data.thr
 import org.apache.accumulo.core.data.thrift.TColumn;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
 import org.apache.accumulo.core.data.thrift.TRange;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
@@ -150,7 +150,7 @@ public class VerifyTabletAssignments {
     }
   }
   
-  private static void checkTabletServer(AccumuloConfiguration conf, Credential st, Entry<String,List<KeyExtent>> entry,
+  private static void checkTabletServer(AccumuloConfiguration conf, TCredentials st, Entry<String,List<KeyExtent>> entry,
       HashSet<KeyExtent> failures) throws ThriftSecurityException, TException, NoSuchScanIDException {
     TabletClientService.Iface client = ThriftUtil.getTServerClient(entry.getKey(), conf);
     

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java Sun Feb 24 12:30:11 2013
@@ -32,7 +32,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.hadoop.fs.FileSystem;
@@ -90,7 +90,7 @@ public class TestConfirmDeletes {
   }
   
   private void test1(String[] metadata, String[] deletes, int expectedInitial, int expected) throws Exception {
-    Credential auth = CredentialHelper.create("root", new PasswordToken().setPassword(new byte[0]), "instance");
+    TCredentials auth = CredentialHelper.create("root", new PasswordToken(new byte[0]), "instance");
     
     Instance instance = new MockInstance();
     FileSystem fs = FileSystem.getLocal(CachedConfiguration.getInstance());
@@ -106,9 +106,10 @@ public class TestConfirmDeletes {
   }
   
   private void load(Instance instance, String[] metadata, String[] deletes) throws Exception {
-    Credential credential = CredentialHelper.create("root", new PasswordToken().setPassword(new byte[0]), "instance");
+    TCredentials credential = CredentialHelper.create("root", new PasswordToken(new byte[0]), "instance");
     
-    Scanner scanner = instance.getConnector(credential.getPrincipal(), CredentialHelper.extractToken(credential)).createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = instance.getConnector(credential.getPrincipal(), CredentialHelper.extractToken(credential)).createScanner(Constants.METADATA_TABLE_NAME,
+        Constants.NO_AUTHS);
     int count = 0;
     for (@SuppressWarnings("unused")
     Entry<Key,Value> entry : scanner) {

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java Sun Feb 24 12:30:11 2013
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
 import org.apache.accumulo.server.master.state.Assignment;
 import org.apache.accumulo.server.master.state.CurrentState;
@@ -85,7 +85,7 @@ public class TestMergeState {
     bw.addMutation(m);
     bw.close();
   }
-
+  
   @Test
   public void test() throws Exception {
     Instance instance = new MockInstance();
@@ -113,8 +113,8 @@ public class TestMergeState {
     
     // Read out the TabletLocationStates
     MockCurrentState state = new MockCurrentState(new MergeInfo(new KeyExtent(tableId, new Text("p"), new Text("e")), MergeInfo.Operation.MERGE));
-    Credential auths = CredentialHelper.create("root", new PasswordToken().setPassword(new byte[0]), "instance");
-
+    TCredentials auths = CredentialHelper.create("root", new PasswordToken(new byte[0]), "instance");
+    
     // Verify the tablet state: hosted, and count
     MetaDataStateStore metaDataStateStore = new MetaDataStateStore(instance, auths, state);
     int count = 0;
@@ -161,10 +161,10 @@ public class TestMergeState {
     m = tablet.getPrevRowUpdateMutation();
     Constants.METADATA_CHOPPED_COLUMN.put(m, new Value("junk".getBytes()));
     update(connector, m);
-
+    
     stats = scan(state, metaDataStateStore);
     Assert.assertEquals(MergeState.WAITING_FOR_OFFLINE, stats.nextMergeState(connector, state));
-
+    
     // take it offline
     m = tablet.getPrevRowUpdateMutation();
     Collection<Collection<String>> walogs = Collections.emptyList();
@@ -173,9 +173,9 @@ public class TestMergeState {
     // now we can split
     stats = scan(state, metaDataStateStore);
     Assert.assertEquals(MergeState.MERGING, stats.nextMergeState(connector, state));
-
+    
   }
-
+  
   /**
    * @param state
    * @param metaDataStateStore

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java Sun Feb 24 12:30:11 2013
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.hadoop.io.Text;
@@ -43,7 +43,7 @@ import org.apache.hadoop.io.Text;
 import com.beust.jcommander.Parameter;
 
 public class QueryMetadataTable {
-  private static Credential credentials;
+  private static TCredentials credentials;
   
   static String location;
   

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTest.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTest.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTest.java Sun Feb 24 12:30:11 2013
@@ -40,9 +40,8 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
@@ -54,7 +53,7 @@ import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 
 public abstract class FunctionalTest {
-
+  
   public static Map<String,String> parseConfig(String... perTableConfigs) {
     
     TreeMap<String,String> config = new TreeMap<String,String>();
@@ -107,7 +106,7 @@ public abstract class FunctionalTest {
     
   }
   
-  private SecurityToken token = null;
+  private AuthenticationToken token = null;
   private String instanceName = "";
   private String principal = "";
   
@@ -119,11 +118,11 @@ public abstract class FunctionalTest {
     return principal;
   }
   
-  protected void setToken(SecurityToken token) {
+  protected void setToken(AuthenticationToken token) {
     this.token = token;
   }
   
-  protected SecurityToken getToken() {
+  protected AuthenticationToken getToken() {
     return token;
   }
   
@@ -239,27 +238,26 @@ public abstract class FunctionalTest {
   }
   
   static class Opts extends ClientOpts {
-    @Parameter(names="--classname", required=true, description="name of the class under test")
+    @Parameter(names = "--classname", required = true, description = "name of the class under test")
     String classname = null;
     
-    @Parameter(names="--opt", required=true, description="the options for test")
+    @Parameter(names = "--opt", required = true, description = "the options for test")
     String opt = null;
   }
   
-  
   public static void main(String[] args) throws Exception {
-    CredentialHelper.create("", new PasswordToken().setPassword(new byte[0]), "");
+    CredentialHelper.create("", new PasswordToken(new byte[0]), "");
     Opts opts = new Opts();
     opts.parseArgs(FunctionalTest.class.getName(), args);
     
     Class<? extends FunctionalTest> testClass = AccumuloVFSClassLoader.loadClass(opts.classname, FunctionalTest.class);
     FunctionalTest fTest = testClass.newInstance();
     
-    //fTest.setMaster(master);
+    // fTest.setMaster(master);
     fTest.setInstanceName(opts.instance);
     fTest.setPrincipal(opts.principal);
     fTest.setToken(opts.getToken());
-
+    
     if (opts.opt.equals("getConfig")) {
       Map<String,String> iconfig = fTest.getInitialConfig();
       System.out.println("{");
@@ -274,15 +272,15 @@ public abstract class FunctionalTest {
     } else if (opts.opt.equals("cleanup")) {
       fTest.cleanup();
     } else {
-    	printHelpAndExit("Unknown option: " + opts.opt);
+      printHelpAndExit("Unknown option: " + opts.opt);
     }
     
   }
-
+  
   static void printHelpAndExit(String message) {
-      System.out.println(message);
-      new JCommander(new Opts()).usage();
-      System.exit(1);
+    System.out.println(message);
+    new JCommander(new Opts()).usage();
+    System.exit(1);
   }
   
   static Mutation nm(String row, String cf, String cq, Value value) {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java Sun Feb 24 12:30:11 2013
@@ -46,15 +46,15 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
 public class PermissionsTest {
   private static final String TEST_USER = "test_user";
-  private static final SecurityToken TEST_PASS = new PasswordToken().setPassword("test_password".getBytes());
+  private static final AuthenticationToken TEST_PASS = new PasswordToken("test_password");
   
   public static class SystemPermissionsTest extends FunctionalTest {
     private static final Logger log = Logger.getLogger(SystemPermissionsTest.class);
@@ -169,29 +169,27 @@ public class PermissionsTest {
         case CREATE_USER:
           user = "__CREATE_USER_WITHOUT_PERM_TEST__";
           try {
-            test_user_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+            test_user_conn.securityOperations().createUser(user, new PasswordToken(password));
             throw new IllegalStateException("Should NOT be able to create a user");
           } catch (AccumuloSecurityException e) {
-            if (e.getErrorCode() != SecurityErrorCode.PERMISSION_DENIED
-                || root_conn.securityOperations().authenticateUser(user, password.getBytes()))
+            if (e.getErrorCode() != SecurityErrorCode.PERMISSION_DENIED || root_conn.securityOperations().authenticateUser(user, password.getBytes()))
               throw e;
           }
           break;
         case DROP_USER:
           user = "__DROP_USER_WITHOUT_PERM_TEST__";
-          root_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+          root_conn.securityOperations().createUser(user, new PasswordToken(password));
           try {
             test_user_conn.securityOperations().dropUser(user);
             throw new IllegalStateException("Should NOT be able to delete a user");
           } catch (AccumuloSecurityException e) {
-            if (e.getErrorCode() != SecurityErrorCode.PERMISSION_DENIED
-                || !root_conn.securityOperations().authenticateUser(user, password.getBytes()))
+            if (e.getErrorCode() != SecurityErrorCode.PERMISSION_DENIED || !root_conn.securityOperations().authenticateUser(user, password.getBytes()))
               throw e;
           }
           break;
         case ALTER_USER:
           user = "__ALTER_USER_WITHOUT_PERM_TEST__";
-          root_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+          root_conn.securityOperations().createUser(user, new PasswordToken(password));
           try {
             test_user_conn.securityOperations().changeUserAuthorizations(user, new Authorizations("A", "B"));
             throw new IllegalStateException("Should NOT be able to alter a user");
@@ -246,20 +244,20 @@ public class PermissionsTest {
           break;
         case CREATE_USER:
           user = "__CREATE_USER_WITH_PERM_TEST__";
-          test_user_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+          test_user_conn.securityOperations().createUser(user, new PasswordToken(password));
           if (!root_conn.securityOperations().authenticateUser(user, password.getBytes()))
             throw new IllegalStateException("Should be able to create a user");
           break;
         case DROP_USER:
           user = "__DROP_USER_WITH_PERM_TEST__";
-          root_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+          root_conn.securityOperations().createUser(user, new PasswordToken(password));
           test_user_conn.securityOperations().dropUser(user);
           if (root_conn.securityOperations().authenticateUser(user, password.getBytes()))
             throw new IllegalStateException("Should be able to delete a user");
           break;
         case ALTER_USER:
           user = "__ALTER_USER_WITH_PERM_TEST__";
-          root_conn.securityOperations().createUser(user, new PasswordToken().setPassword(password.getBytes()));
+          root_conn.securityOperations().createUser(user, new PasswordToken(password));
           test_user_conn.securityOperations().changeUserAuthorizations(user, new Authorizations("A", "B"));
           if (root_conn.securityOperations().getUserAuthorizations(user).isEmpty())
             throw new IllegalStateException("Should be able to alter a user");

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java Sun Feb 24 12:30:11 2013
@@ -25,7 +25,7 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor;
@@ -64,13 +64,13 @@ public class ZombieTServer {
     }
     
     @Override
-    synchronized public void fastHalt(TInfo tinfo, Credential credentials, String lock) {
+    synchronized public void fastHalt(TInfo tinfo, TCredentials credentials, String lock) {
       halted = true;
       notifyAll();
     }
     
     @Override
-    public TabletServerStatus getTabletServerStatus(TInfo tinfo, Credential credentials) throws ThriftSecurityException, TException {
+    public TabletServerStatus getTabletServerStatus(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
       synchronized (this) {
         if (statusCount++ < 1) {
           TabletServerStatus result = new TabletServerStatus();
@@ -83,7 +83,7 @@ public class ZombieTServer {
     }
     
     @Override
-    synchronized public void halt(TInfo tinfo, Credential credentials, String lock) throws ThriftSecurityException, TException {
+    synchronized public void halt(TInfo tinfo, TCredentials credentials, String lock) throws ThriftSecurityException, TException {
       halted = true;
       notifyAll();
     }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java Sun Feb 24 12:30:11 2013
@@ -63,7 +63,7 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.system.MultiIterator;
 import org.apache.accumulo.core.iterators.system.VisibilityFilter;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.MetadataTable;
@@ -339,7 +339,7 @@ public class CollectTabletStats {
     
   }
   
-  private static List<KeyExtent> findTablets(boolean selectLocalTablets, Credential credentials, String table, Instance zki,
+  private static List<KeyExtent> findTablets(boolean selectLocalTablets, TCredentials credentials, String table, Instance zki,
       Map<KeyExtent,String> locations) throws Exception {
     SortedSet<KeyExtent> tablets = new TreeSet<KeyExtent>();
     
@@ -374,7 +374,7 @@ public class CollectTabletStats {
     return tabletsToTest;
   }
   
-  private static List<String> getTabletFiles(Credential token, Instance zki, String tableId, KeyExtent ke) {
+  private static List<String> getTabletFiles(TCredentials token, Instance zki, String tableId, KeyExtent ke) {
     List<String> files = new ArrayList<String>();
     
     SortedMap<Key,Value> tkv = new TreeMap<Key,Value>();

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java Sun Feb 24 12:30:11 2013
@@ -46,7 +46,7 @@ import org.apache.accumulo.core.data.thr
 import org.apache.accumulo.core.data.thrift.TRange;
 import org.apache.accumulo.core.data.thrift.UpdateErrors;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction;
@@ -89,7 +89,7 @@ public class NullTserver {
     }
     
     @Override
-    public long startUpdate(TInfo tinfo, Credential credentials) {
+    public long startUpdate(TInfo tinfo, TCredentials credentials) {
       return updateSession++;
     }
     
@@ -102,7 +102,7 @@ public class NullTserver {
     }
     
     @Override
-    public List<TKeyExtent> bulkImport(TInfo tinfo, Credential credentials, long tid, Map<TKeyExtent,Map<String,MapFileInfo>> files, boolean setTime) {
+    public List<TKeyExtent> bulkImport(TInfo tinfo, TCredentials credentials, long tid, Map<TKeyExtent,Map<String,MapFileInfo>> files, boolean setTime) {
       return null;
     }
     
@@ -123,74 +123,74 @@ public class NullTserver {
     }
     
     @Override
-    public void splitTablet(TInfo tinfo, Credential credentials, TKeyExtent extent, ByteBuffer splitPoint) {
+    public void splitTablet(TInfo tinfo, TCredentials credentials, TKeyExtent extent, ByteBuffer splitPoint) {
       
     }
     
     @Override
-    public InitialMultiScan startMultiScan(TInfo tinfo, Credential credentials, Map<TKeyExtent,List<TRange>> batch, List<TColumn> columns,
+    public InitialMultiScan startMultiScan(TInfo tinfo, TCredentials credentials, Map<TKeyExtent,List<TRange>> batch, List<TColumn> columns,
         List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites) {
       return null;
     }
     
     @Override
-    public InitialScan startScan(TInfo tinfo, Credential credentials, TKeyExtent extent, TRange range, List<TColumn> columns, int batchSize,
+    public InitialScan startScan(TInfo tinfo, TCredentials credentials, TKeyExtent extent, TRange range, List<TColumn> columns, int batchSize,
         List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated) {
       return null;
     }
     
     @Override
-    public void update(TInfo tinfo, Credential credentials, TKeyExtent keyExtent, TMutation mutation) {
+    public void update(TInfo tinfo, TCredentials credentials, TKeyExtent keyExtent, TMutation mutation) {
       
     }
     
     @Override
-    public TabletServerStatus getTabletServerStatus(TInfo tinfo, Credential credentials) throws ThriftSecurityException, TException {
+    public TabletServerStatus getTabletServerStatus(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
       return null;
     }
     
     @Override
-    public List<TabletStats> getTabletStats(TInfo tinfo, Credential credentials, String tableId) throws ThriftSecurityException, TException {
+    public List<TabletStats> getTabletStats(TInfo tinfo, TCredentials credentials, String tableId) throws ThriftSecurityException, TException {
       return null;
     }
     
     @Override
-    public TabletStats getHistoricalStats(TInfo tinfo, Credential credentials) throws ThriftSecurityException, TException {
+    public TabletStats getHistoricalStats(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
       return null;
     }
     
     @Override
-    public void halt(TInfo tinfo, Credential credentials, String lock) throws ThriftSecurityException, TException {}
+    public void halt(TInfo tinfo, TCredentials credentials, String lock) throws ThriftSecurityException, TException {}
     
     @Override
-    public void fastHalt(TInfo tinfo, Credential credentials, String lock) {}
+    public void fastHalt(TInfo tinfo, TCredentials credentials, String lock) {}
     
     @Override
-    public void loadTablet(TInfo tinfo, Credential credentials, String lock, TKeyExtent extent) throws TException {}
+    public void loadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent) throws TException {}
     
     @Override
-    public void unloadTablet(TInfo tinfo, Credential credentials, String lock, TKeyExtent extent, boolean save) throws TException {}
+    public void unloadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent, boolean save) throws TException {}
     
     @Override
-    public List<ActiveScan> getActiveScans(TInfo tinfo, Credential credentials) throws ThriftSecurityException, TException {
+    public List<ActiveScan> getActiveScans(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
       return new ArrayList<ActiveScan>();
     }
     
     @Override
-    public void chop(TInfo tinfo, Credential credentials, String lock, TKeyExtent extent) throws TException {}
+    public void chop(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent) throws TException {}
     
     @Override
-    public void flushTablet(TInfo tinfo, Credential credentials, String lock, TKeyExtent extent) throws TException {
+    public void flushTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent) throws TException {
       
     }
     
     @Override
-    public void compact(TInfo tinfo, Credential credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws TException {
+    public void compact(TInfo tinfo, TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws TException {
       
     }
     
     @Override
-    public void flush(TInfo tinfo, Credential credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws TException {
+    public void flush(TInfo tinfo, TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws TException {
       
     }
     
@@ -201,11 +201,11 @@ public class NullTserver {
      * org.apache.accumulo.core.security.thrift.Credentials, java.util.List)
      */
     @Override
-    public void removeLogs(TInfo tinfo, Credential credentials, List<String> filenames) throws TException {
+    public void removeLogs(TInfo tinfo, TCredentials credentials, List<String> filenames) throws TException {
     }
     
     @Override
-    public List<ActiveCompaction> getActiveCompactions(TInfo tinfo, Credential credentials) throws ThriftSecurityException, TException {
+    public List<ActiveCompaction> getActiveCompactions(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
       return new ArrayList<ActiveCompaction>();
     }
   }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java Sun Feb 24 12:30:11 2013
@@ -30,7 +30,7 @@ import org.apache.accumulo.core.client.I
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.log4j.Logger;
@@ -78,7 +78,7 @@ public class State {
     return stateMap.get(key);
   }
   
-  public HashMap<String, Object> getMap() {
+  public HashMap<String,Object> getMap() {
     return stateMap;
   }
   
@@ -98,18 +98,18 @@ public class State {
     if (connector == null) {
       String instance = props.getProperty("INSTANCE");
       String zookeepers = props.getProperty("ZOOKEEPERS");
-      Credential credentials = getCredentials();
+      TCredentials credentials = getCredentials();
       connector = new ZooKeeperInstance(instance, zookeepers).getConnector(credentials.getPrincipal(), credentials.getToken());
     }
     return connector;
   }
   
-  public Credential getCredentials() {
+  public TCredentials getCredentials() {
     String username = props.getProperty("USERNAME");
     String password = props.getProperty("PASSWORD");
-    return CredentialHelper.createSquelchError(username, new PasswordToken().setPassword(password.getBytes()), this.getInstance().getInstanceID());
+    return CredentialHelper.createSquelchError(username, new PasswordToken(password), this.getInstance().getInstanceID());
   }
-
+  
   public Instance getInstance() {
     if (instance == null) {
       instance = HdfsZooInstance.getInstance();
@@ -156,8 +156,8 @@ public class State {
     files = libdir.list();
     for (int i = 0; i < files.length; i++) {
       String f = files[i];
-      if (f.matches("^accumulo-core-.+jar$") || f.matches("^accumulo-server-.+jar$") || f.matches("^accumulo-fate-.+jar$") || f.matches("^accumulo-trace-.+jar$")
-          || f.matches("^libthrift-.+jar$")) {
+      if (f.matches("^accumulo-core-.+jar$") || f.matches("^accumulo-server-.+jar$") || f.matches("^accumulo-fate-.+jar$")
+          || f.matches("^accumulo-trace-.+jar$") || f.matches("^libthrift-.+jar$")) {
         if (retval == null) {
           retval = String.format("%s/%s", libdir.getAbsolutePath(), f);
         } else {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CreateUser.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CreateUser.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CreateUser.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CreateUser.java Sun Feb 24 12:30:11 2013
@@ -40,7 +40,7 @@ public class CreateUser extends Test {
     
     try {
       log.debug("Creating user " + userName);
-      conn.securityOperations().createUser(userName, new PasswordToken().setPassword((userName + "pass").getBytes()));
+      conn.securityOperations().createUser(userName, new PasswordToken(userName + "pass"));
     } catch (AccumuloSecurityException ex) {
       log.debug("Create user failed " + ex.getCause());
     }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java Sun Feb 24 12:30:11 2013
@@ -17,7 +17,6 @@
 package org.apache.accumulo.test.randomwalk.multitable;
 
 import java.io.IOException;
-import java.nio.charset.Charset;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
@@ -56,7 +55,7 @@ public class CopyTool extends Configured
     }
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setConnectorInfo(job, args[0], new PasswordToken().setPassword(args[1].getBytes(Charset.forName("UTF-8"))));
+    AccumuloInputFormat.setConnectorInfo(job, args[0], new PasswordToken(args[1]));
     AccumuloInputFormat.setInputTableName(job, args[2]);
     AccumuloInputFormat.setScanAuthorizations(job, Constants.NO_AUTHS);
     AccumuloInputFormat.setZooKeeperInstance(job, args[3], args[4]);
@@ -68,7 +67,7 @@ public class CopyTool extends Configured
     job.setNumReduceTasks(0);
     
     job.setOutputFormatClass(AccumuloOutputFormat.class);
-    AccumuloOutputFormat.setConnectorInfo(job, args[0], new PasswordToken().setPassword(args[1].getBytes(Charset.forName("UTF-8"))));
+    AccumuloOutputFormat.setConnectorInfo(job, args[0], new PasswordToken(args[1]));
     AccumuloOutputFormat.setCreateTables(job, true);
     AccumuloOutputFormat.setDefaultTableName(job, args[5]);
     AccumuloOutputFormat.setZooKeeperInstance(job, args[3], args[4]);

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java Sun Feb 24 12:30:11 2013
@@ -24,7 +24,7 @@ import org.apache.accumulo.core.client.A
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
@@ -61,7 +61,7 @@ public class AlterTablePerm extends Test
     String tableName = WalkingSecurity.get(state).getTableName();
     boolean hasPerm = WalkingSecurity.get(state).hasTablePermission(target, tableName, tabPerm);
     boolean canGive;
-    Credential source;
+    TCredentials source;
     if ("system".equals(sourceUser)) {
       source = WalkingSecurity.get(state).getSysCredentials();
     } else if ("table".equals(sourceUser)) {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java Sun Feb 24 12:30:11 2013
@@ -22,7 +22,7 @@ import java.util.Properties;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
@@ -33,7 +33,7 @@ public class Authenticate extends Test {
     authenticate(WalkingSecurity.get(state).getSysCredentials(), state, props);
   }
   
-  public static void authenticate(Credential auth, State state, Properties props) throws Exception {
+  public static void authenticate(TCredentials auth, State state, Properties props) throws Exception {
     String targetProp = props.getProperty("target");
     boolean success = Boolean.parseBoolean(props.getProperty("valid"));
     

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java Sun Feb 24 12:30:11 2013
@@ -22,9 +22,9 @@ import java.util.Random;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
@@ -35,14 +35,14 @@ public class ChangePass extends Test {
     String target = props.getProperty("target");
     String source = props.getProperty("source");
     
-    Credential auth;
+    TCredentials auth;
     if (source.equals("system")) {
       auth = WalkingSecurity.get(state).getSysCredentials();
     } else {
       auth = WalkingSecurity.get(state).getTabCredentials();
     }
     Connector conn = state.getInstance().getConnector(auth.getPrincipal(), auth.getToken());
-        
+    
     boolean hasPerm;
     boolean targetExists;
     if (target.equals("table")) {
@@ -51,16 +51,16 @@ public class ChangePass extends Test {
       target = WalkingSecurity.get(state).getSysUserName();
     
     targetExists = WalkingSecurity.get(state).userExists(target);
-      
+    
     hasPerm = WalkingSecurity.get(state).canChangePassword(auth, target);
     
     Random r = new Random();
     
     byte[] newPassw = new byte[r.nextInt(50) + 1];
-    for (int i =0; i < newPassw.length; i++)
-      newPassw[i] = (byte) ((r.nextInt(26)+65) & 0xFF);
+    for (int i = 0; i < newPassw.length; i++)
+      newPassw[i] = (byte) ((r.nextInt(26) + 65) & 0xFF);
     
-    SecurityToken newPass = new PasswordToken().setPassword(newPassw);
+    AuthenticationToken newPass = new PasswordToken(newPassw);
     try {
       conn.securityOperations().changeLoginInfo(target, newPass);
     } catch (AccumuloSecurityException ae) {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java Sun Feb 24 12:30:11 2013
@@ -21,8 +21,8 @@ import java.util.Properties;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
@@ -36,7 +36,7 @@ public class CreateUser extends Test {
     
     boolean exists = WalkingSecurity.get(state).userExists(tableUserName);
     boolean hasPermission = WalkingSecurity.get(state).canCreateUser(WalkingSecurity.get(state).getSysCredentials(), tableUserName);
-    SecurityToken tabUserPass = new PasswordToken().setPassword("Super Sekret Table User Password".getBytes());
+    AuthenticationToken tabUserPass = new PasswordToken("Super Sekret Table User Password");
     try {
       conn.securityOperations().createUser(tableUserName, tabUserPass);
     } catch (AccumuloSecurityException ae) {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java Sun Feb 24 12:30:11 2013
@@ -23,7 +23,7 @@ import org.apache.accumulo.core.client.A
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
@@ -37,7 +37,7 @@ public class DropTable extends Test {
   
   public static void dropTable(State state, Properties props) throws Exception {
     String sourceUser = props.getProperty("source", "system");
-    Credential auth;
+    TCredentials auth;
     if (sourceUser.equals("table")) {
       auth = WalkingSecurity.get(state).getTabCredentials();
     } else {

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java Sun Feb 24 12:30:11 2013
@@ -23,8 +23,8 @@ import org.apache.accumulo.core.client.C
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.State;
 
@@ -49,7 +49,7 @@ public class SecurityFixture extends Fix
     if (users.contains(systemUserName))
       conn.securityOperations().dropUser(systemUserName);
     
-    SecurityToken sysUserPass = new PasswordToken().setPassword("sysUser".getBytes());
+    AuthenticationToken sysUserPass = new PasswordToken("sysUser");
     conn.securityOperations().createUser(systemUserName, sysUserPass);
     
     WalkingSecurity.get(state).setTableName(secTableName);
@@ -58,7 +58,7 @@ public class SecurityFixture extends Fix
     WalkingSecurity.get(state).setSysUserName(systemUserName);
     WalkingSecurity.get(state).createUser(systemUserName, sysUserPass);
     
-    WalkingSecurity.get(state).changePassword(tableUserName, new PasswordToken().setPassword(new byte[0]));
+    WalkingSecurity.get(state).changePassword(tableUserName, new PasswordToken(new byte[0]));
     
     WalkingSecurity.get(state).setTabUserName(tableUserName);
     

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java Sun Feb 24 12:30:11 2013
@@ -23,7 +23,7 @@ import org.apache.accumulo.core.client.A
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
@@ -31,7 +31,7 @@ public class SetAuths extends Test {
   
   @Override
   public void visit(State state, Properties props) throws Exception {
-    Credential auth;
+    TCredentials auth;
     
     String authsString = props.getProperty("auths", "_random");
     

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java Sun Feb 24 12:30:11 2013
@@ -29,11 +29,11 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.CredentialHelper;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.security.thrift.Credential;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
+import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
+import org.apache.accumulo.core.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.server.security.SecurityOperation;
 import org.apache.accumulo.server.security.handler.Authenticator;
@@ -108,7 +108,7 @@ public class WalkingSecurity extends Sec
   }
   
   @Override
-  public void initializeSecurity(Credential rootuser, String token) throws ThriftSecurityException {
+  public void initializeSecurity(TCredentials rootuser, String token) throws ThriftSecurityException {
     throw new UnsupportedOperationException("nope");
   }
   
@@ -138,14 +138,14 @@ public class WalkingSecurity extends Sec
   }
   
   @Override
-  public boolean authenticateUser(String principal, SecurityToken token) {
+  public boolean authenticateUser(String principal, AuthenticationToken token) {
     PasswordToken pass = (PasswordToken) state.get(principal + userPass);
     boolean ret = pass.equals(token);
     return ret;
   }
   
   @Override
-  public void createUser(String principal, SecurityToken token) throws AccumuloSecurityException {
+  public void createUser(String principal, AuthenticationToken token) throws AccumuloSecurityException {
     state.set(principal + userExists, Boolean.toString(true));
     changePassword(principal, token);
     cleanUser(principal);
@@ -160,7 +160,7 @@ public class WalkingSecurity extends Sec
   }
   
   @Override
-  public void changePassword(String principal, SecurityToken token) throws AccumuloSecurityException {
+  public void changePassword(String principal, AuthenticationToken token) throws AccumuloSecurityException {
     state.set(principal + userPass, token);
     state.set(principal + userPass + "time", System.currentTimeMillis());
   }
@@ -270,12 +270,12 @@ public class WalkingSecurity extends Sec
     return Boolean.parseBoolean(state.getString(tableExists));
   }
   
-  public Credential getSysCredentials() {
-    return CredentialHelper.createSquelchError(getSysUserName(), new PasswordToken().setPassword(getSysPassword()), state.getInstance().getInstanceID());
+  public TCredentials getSysCredentials() {
+    return CredentialHelper.createSquelchError(getSysUserName(), new PasswordToken(getSysPassword()), state.getInstance().getInstanceID());
   }
   
-  public Credential getTabCredentials() {
-    return CredentialHelper.createSquelchError(getTabUserName(), new PasswordToken().setPassword(getTabPassword()), state.getInstance().getInstanceID());
+  public TCredentials getTabCredentials() {
+    return CredentialHelper.createSquelchError(getTabUserName(), new PasswordToken(getTabPassword()), state.getInstance().getInstanceID());
   }
   
   public byte[] getUserPassword(String user) {
@@ -355,7 +355,8 @@ public class WalkingSecurity extends Sec
     return fs;
   }
   
-  public boolean canAskAboutUser(Credential credentials, String user) throws ThriftSecurityException {
+  @Override
+  public boolean canAskAboutUser(TCredentials credentials, String user) throws ThriftSecurityException {
     try {
       return super.canAskAboutUser(credentials, user);
     } catch (ThriftSecurityException tse) {
@@ -364,12 +365,12 @@ public class WalkingSecurity extends Sec
       throw tse;
     }
   }
-
+  
   @Override
-  public SecurityToken login(Properties properties) throws AccumuloSecurityException {
+  public AuthenticationToken login(Properties properties) throws AccumuloSecurityException {
     return authenticator.login(properties);
   }
-
+  
   @Override
   public boolean validTokenClass(String tokenClass) {
     return authenticator.validTokenClass(tokenClass);

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/MapRedVerifyTool.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/MapRedVerifyTool.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/MapRedVerifyTool.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/MapRedVerifyTool.java Sun Feb 24 12:30:11 2013
@@ -17,7 +17,6 @@
 package org.apache.accumulo.test.randomwalk.sequential;
 
 import java.io.IOException;
-import java.nio.charset.Charset;
 import java.util.Iterator;
 
 import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
@@ -87,7 +86,7 @@ public class MapRedVerifyTool extends Co
     }
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setConnectorInfo(job, args[0], new PasswordToken().setPassword(args[1].getBytes(Charset.forName("UTF-8"))));
+    AccumuloInputFormat.setConnectorInfo(job, args[0], new PasswordToken(args[1]));
     AccumuloInputFormat.setInputTableName(job, args[2]);
     AccumuloInputFormat.setZooKeeperInstance(job, args[3], args[4]);
     
@@ -99,7 +98,7 @@ public class MapRedVerifyTool extends Co
     job.setNumReduceTasks(1);
     
     job.setOutputFormatClass(AccumuloOutputFormat.class);
-    AccumuloOutputFormat.setConnectorInfo(job, args[0], new PasswordToken().setPassword(args[1].getBytes(Charset.forName("UTF-8"))));
+    AccumuloOutputFormat.setConnectorInfo(job, args[0], new PasswordToken(args[1]));
     AccumuloOutputFormat.setCreateTables(job, true);
     AccumuloOutputFormat.setDefaultTableName(job, args[5]);
     AccumuloOutputFormat.setZooKeeperInstance(job, args[3], args[4]);

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java?rev=1449467&r1=1449466&r2=1449467&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java (original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java Sun Feb 24 12:30:11 2013
@@ -46,33 +46,32 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-
 public class MiniAccumuloClusterTest {
   
   public static TemporaryFolder folder = new TemporaryFolder();
   
   private static MiniAccumuloCluster accumulo;
-
+  
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
-
+    
     folder.create();
     
     Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);
-
+    
     accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
     
     accumulo.start();
     
   }
-
+  
   @Test(timeout = 30000)
   public void test() throws Exception {
     Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", "superSecret");
     
     conn.tableOperations().create("table1");
     
-    conn.securityOperations().createUser("user1", new PasswordToken().setPassword("pass1".getBytes()));
+    conn.securityOperations().createUser("user1", new PasswordToken("pass1"));
     conn.securityOperations().changeUserAuthorizations("user1", new Authorizations("A", "B"));
     conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.WRITE);
     conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.READ);
@@ -82,7 +81,7 @@ public class MiniAccumuloClusterTest {
     SummingCombiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("META", "COUNT")));
     
     conn.tableOperations().attachIterator("table1", is);
-
+    
     Connector uconn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("user1", "pass1");
     
     BatchWriter bw = uconn.createBatchWriter("table1", new BatchWriterConfig());
@@ -102,7 +101,7 @@ public class MiniAccumuloClusterTest {
     m.put("META", "COUNT", new ColumnVisibility("A|B"), "1");
     m.put("META", "CRC", new ColumnVisibility("A|B"), "123");
     bw.addMutation(m);
-
+    
     bw.close();
     
     int count = 0;
@@ -146,11 +145,11 @@ public class MiniAccumuloClusterTest {
     File jarFile = File.createTempFile("iterator", ".jar");
     FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);
     jarFile.deleteOnExit();
-
+    
     conn.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1", jarFile.toURI().toString());
     conn.tableOperations().setProperty("table2", Property.TABLE_CLASSPATH.getKey(), "cx1");
     conn.tableOperations().attachIterator("table2", new IteratorSetting(100, "foocensor", "org.apache.accumulo.test.FooFilter"));
-
+    
     BatchWriter bw = conn.createBatchWriter("table2", new BatchWriterConfig());
     
     Mutation m1 = new Mutation("foo");
@@ -179,9 +178,9 @@ public class MiniAccumuloClusterTest {
     
     conn.instanceOperations().removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
     conn.tableOperations().delete("table2");
-
+    
   }
-
+  
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();



Mime
View raw message