accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [20/66] [abbrv] accumulo git commit: ACCUMULO-3451 Format master branch (1.7.0-SNAPSHOT)
Date Fri, 09 Jan 2015 02:44:24 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
index d318ccc..e2294cd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
@@ -47,14 +47,14 @@ import org.apache.log4j.Logger;
 
 public class MetaDataTableScanner implements ClosableIterator<TabletLocationState> {
   private static final Logger log = Logger.getLogger(MetaDataTableScanner.class);
-  
+
   BatchScanner mdScanner = null;
   Iterator<Entry<Key,Value>> iter = null;
-  
+
   public MetaDataTableScanner(ClientContext context, Range range, CurrentState state) {
     this(context, range, state, MetadataTable.NAME);
   }
-  
+
   MetaDataTableScanner(ClientContext context, Range range, CurrentState state, String tableName) {
     // scan over metadata table, looking for tablets in the wrong state based on the live servers and online tables
     try {
@@ -71,7 +71,7 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
       throw new RuntimeException(ex);
     }
   }
-  
+
   static public void configureScanner(ScannerBase scanner, CurrentState state) {
     TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
     scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
@@ -88,15 +88,15 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
     }
     scanner.addScanIterator(tabletChange);
   }
-  
+
   public MetaDataTableScanner(ClientContext context, Range range) {
     this(context, range, MetadataTable.NAME);
   }
-  
+
   public MetaDataTableScanner(ClientContext context, Range range, String tableName) {
     this(context, range, null, tableName);
   }
-  
+
   @Override
   public void close() {
     if (iter != null) {
@@ -104,12 +104,12 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
       iter = null;
     }
   }
-  
+
   @Override
   protected void finalize() {
     close();
   }
-  
+
   @Override
   public boolean hasNext() {
     if (iter == null)
@@ -120,12 +120,12 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
     }
     return result;
   }
-  
+
   @Override
   public TabletLocationState next() {
-      return fetch();
+    return fetch();
   }
-  
+
   public static TabletLocationState createTabletLocationState(Key k, Value v) throws IOException, BadLocationStateException {
     final SortedMap<Key,Value> decodedRow = WholeRowIterator.decodeRow(k, v);
     KeyExtent extent = null;
@@ -135,13 +135,13 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
     long lastTimestamp = 0;
     List<Collection<String>> walogs = new ArrayList<Collection<String>>();
     boolean chopped = false;
-    
+
     for (Entry<Key,Value> entry : decodedRow.entrySet()) {
       Key key = entry.getKey();
       Text row = key.getRow();
       Text cf = key.getColumnFamily();
       Text cq = key.getColumnQualifier();
-      
+
       if (cf.compareTo(TabletsSection.FutureLocationColumnFamily.NAME) == 0) {
         TServerInstance location = new TServerInstance(entry.getValue(), cq);
         if (future != null) {
@@ -174,7 +174,7 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
     }
     return new TabletLocationState(extent, future, current, last, walogs, chopped);
   }
-  
+
   private TabletLocationState fetch() {
     try {
       Entry<Key,Value> e = iter.next();
@@ -185,7 +185,7 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
       throw new RuntimeException(ex);
     }
   }
-  
+
   @Override
   public void remove() {
     throw new RuntimeException("Unimplemented");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java
index 5c8e102..ecc246b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java
@@ -22,20 +22,20 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.server.AccumuloServerContext;
 
 public class RootTabletStateStore extends MetaDataStateStore {
-  
+
   public RootTabletStateStore(ClientContext context, CurrentState state) {
     super(context, state, RootTable.NAME);
   }
-  
+
   public RootTabletStateStore(AccumuloServerContext context) {
     super(context, RootTable.NAME);
   }
-  
+
   @Override
   public ClosableIterator<TabletLocationState> iterator() {
     return new MetaDataTableScanner(context, MetadataSchema.TabletsSection.getRange(), state, RootTable.NAME);
   }
-  
+
   @Override
   public String name() {
     return "Metadata Tablets";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
index f473ba3..c0c71e6 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
@@ -33,51 +34,51 @@ import com.google.common.net.HostAndPort;
 /**
  * A tablet is assigned to a tablet server at the given address as long as it is alive and well. When the tablet server is restarted, the instance information
  * it advertises will change. Therefore tablet assignments can be considered out-of-date if the tablet server instance information has been changed.
- * 
+ *
  */
 public class TServerInstance implements Comparable<TServerInstance>, Serializable {
-  
+
   private static final long serialVersionUID = 1L;
-  
+
   // HostAndPort is not Serializable
   private transient HostAndPort location;
   private String session;
   private String cachedStringRepresentation;
-  
+
   public TServerInstance(HostAndPort address, String session) {
     this.location = address;
     this.session = session;
     this.cachedStringRepresentation = hostPort() + "[" + session + "]";
   }
-  
+
   public TServerInstance(HostAndPort address, long session) {
     this(address, Long.toHexString(session));
   }
-  
+
   public TServerInstance(String address, long session) {
     this(AddressUtil.parseAddress(address, false), Long.toHexString(session));
   }
-  
+
   public TServerInstance(Value address, Text session) {
     this(AddressUtil.parseAddress(new String(address.get(), UTF_8), false), session.toString());
   }
-  
+
   public void putLocation(Mutation m) {
     m.put(TabletsSection.CurrentLocationColumnFamily.NAME, asColumnQualifier(), asMutationValue());
   }
-  
+
   public void putFutureLocation(Mutation m) {
     m.put(TabletsSection.FutureLocationColumnFamily.NAME, asColumnQualifier(), asMutationValue());
   }
-  
+
   public void putLastLocation(Mutation m) {
     m.put(TabletsSection.LastLocationColumnFamily.NAME, asColumnQualifier(), asMutationValue());
   }
-  
+
   public void clearLastLocation(Mutation m) {
     m.putDelete(TabletsSection.LastLocationColumnFamily.NAME, asColumnQualifier());
   }
-  
+
   public void clearFutureLocation(Mutation m) {
     m.putDelete(TabletsSection.FutureLocationColumnFamily.NAME, asColumnQualifier());
   }
@@ -85,19 +86,19 @@ public class TServerInstance implements Comparable<TServerInstance>, Serializabl
   public void clearLocation(Mutation m) {
     m.putDelete(TabletsSection.CurrentLocationColumnFamily.NAME, asColumnQualifier());
   }
-  
+
   @Override
   public int compareTo(TServerInstance other) {
     if (this == other)
       return 0;
     return this.toString().compareTo(other.toString());
   }
-  
+
   @Override
   public int hashCode() {
     return toString().hashCode();
   }
-  
+
   @Override
   public boolean equals(Object obj) {
     if (obj instanceof TServerInstance) {
@@ -105,45 +106,45 @@ public class TServerInstance implements Comparable<TServerInstance>, Serializabl
     }
     return false;
   }
-  
+
   @Override
   public String toString() {
     return cachedStringRepresentation;
   }
-  
+
   public int port() {
     return getLocation().getPort();
   }
-  
+
   public String host() {
     return getLocation().getHostText();
   }
-  
+
   public String hostPort() {
     return getLocation().toString();
   }
-  
+
   private Text asColumnQualifier() {
     return new Text(this.getSession());
   }
-  
+
   private Value asMutationValue() {
     return new Value(getLocation().toString().getBytes(UTF_8));
   }
-  
+
   public HostAndPort getLocation() {
     return location;
   }
-  
+
   public String getSession() {
     return session;
   }
-  
+
   private void writeObject(ObjectOutputStream out) throws IOException {
     out.defaultWriteObject();
     out.writeObject(location.toString());
   }
-  
+
   private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
     in.defaultReadObject();
     location = HostAndPort.fromString(in.readObject().toString());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java
index 5432d32..b24b562 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java
@@ -26,21 +26,26 @@ import org.apache.hadoop.io.Text;
 /**
  * When a tablet is assigned, we mark its future location. When the tablet is opened, we set its current location. A tablet should never have both a future and
  * current location.
- * 
+ *
  * A tablet server is always associated with a unique session id. If the current tablet server has a different session, we know the location information is
  * out-of-date.
  */
 public class TabletLocationState {
-  
+
   static public class BadLocationStateException extends Exception {
     private static final long serialVersionUID = 1L;
     private Text metadataTableEntry;
 
-    BadLocationStateException(String msg, Text row) { super(msg); this.metadataTableEntry = row; }
+    BadLocationStateException(String msg, Text row) {
+      super(msg);
+      this.metadataTableEntry = row;
+    }
 
-    public Text getEncodedEndRow() { return metadataTableEntry; }
+    public Text getEncodedEndRow() {
+      return metadataTableEntry;
+    }
   }
-  
+
   public TabletLocationState(KeyExtent extent, TServerInstance future, TServerInstance current, TServerInstance last, Collection<Collection<String>> walogs,
       boolean chopped) throws BadLocationStateException {
     this.extent = extent;
@@ -55,18 +60,18 @@ public class TabletLocationState {
       throw new BadLocationStateException(extent + " is both assigned and hosted, which should never happen: " + this, extent.getMetadataEntry());
     }
   }
-  
+
   final public KeyExtent extent;
   final public TServerInstance future;
   final public TServerInstance current;
   final public TServerInstance last;
   final public Collection<Collection<String>> walogs;
   final public boolean chopped;
-  
+
   public String toString() {
     return extent + "@(" + future + "," + current + "," + last + ")" + (chopped ? " chopped" : "");
   }
-  
+
   public TServerInstance getServer() {
     TServerInstance result = null;
     if (current != null) {
@@ -78,7 +83,7 @@ public class TabletLocationState {
     }
     return result;
   }
-  
+
   public TabletState getState(Set<TServerInstance> liveServers) {
     TServerInstance server = getServer();
     if (server == null)
@@ -97,5 +102,5 @@ public class TabletLocationState {
     // server == last
     return TabletState.UNASSIGNED;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletMigration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletMigration.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletMigration.java
index f0a3664..e852af3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletMigration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletMigration.java
@@ -22,13 +22,13 @@ public class TabletMigration {
   public KeyExtent tablet;
   public TServerInstance oldServer;
   public TServerInstance newServer;
-  
+
   public TabletMigration(KeyExtent extent, TServerInstance before, TServerInstance after) {
     this.tablet = extent;
     this.oldServer = before;
     this.newServer = after;
   }
-  
+
   public String toString() {
     return tablet + ": " + oldServer + " -> " + newServer;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java
index 23f16e3..dde9807 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java
@@ -24,13 +24,13 @@ import java.util.Set;
 public enum TabletServerState {
   // not a valid state, reserved for internal use only
   RESERVED((byte) (-1)),
-  
+
   // the following are normally functioning states
   NEW((byte) 0),
   ONLINE((byte) 1),
   UNRESPONSIVE((byte) 2),
   DOWN((byte) 3),
-  
+
   // the following are bad states and cause tservers to be ignored by the master
   BAD_SYSTEM_PASSWORD((byte) 101),
   BAD_VERSION((byte) 102),
@@ -40,12 +40,12 @@ public enum TabletServerState {
   BAD_VERSION_AND_CONFIG((byte) 106),
   BAD_VERSION_AND_INSTANCE_AND_CONFIG((byte) 107),
   BAD_INSTANCE_AND_CONFIG((byte) 108);
-  
+
   private byte id;
-  
+
   private static HashMap<Byte,TabletServerState> mapping;
   private static HashSet<TabletServerState> badStates;
-  
+
   static {
     mapping = new HashMap<Byte,TabletServerState>(TabletServerState.values().length);
     badStates = new HashSet<TabletServerState>();
@@ -55,21 +55,21 @@ public enum TabletServerState {
         badStates.add(state);
     }
   }
-  
+
   private TabletServerState(byte id) {
     this.id = id;
   }
-  
+
   public byte getId() {
     return this.id;
   }
-  
+
   public static TabletServerState getStateById(byte id) {
     if (mapping.containsKey(id))
       return mapping.get(id);
     throw new IndexOutOfBoundsException("No such state");
   }
-  
+
   public static Set<TabletServerState> getBadStates() {
     return Collections.unmodifiableSet(badStates);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
index 2a84e70..9351cd0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
@@ -45,16 +45,16 @@ import org.apache.hadoop.io.Text;
 import com.google.common.base.Joiner;
 
 public class TabletStateChangeIterator extends SkippingIterator {
-  
+
   private static final String SERVERS_OPTION = "servers";
   private static final String TABLES_OPTION = "tables";
   private static final String MERGES_OPTION = "merges";
   // private static final Logger log = Logger.getLogger(TabletStateChangeIterator.class);
-  
+
   Set<TServerInstance> current;
   Set<String> onlineTables;
   Map<Text,MergeInfo> merges;
-  
+
   @Override
   public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
     super.init(source, options, env);
@@ -62,7 +62,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
     onlineTables = parseTables(options.get(TABLES_OPTION));
     merges = parseMerges(options.get(MERGES_OPTION));
   }
-  
+
   private Set<String> parseTables(String tables) {
     if (tables == null)
       return null;
@@ -71,7 +71,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
       result.add(table);
     return result;
   }
-  
+
   private Set<TServerInstance> parseServers(String servers) {
     if (servers == null)
       return null;
@@ -89,7 +89,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
     }
     return result;
   }
-  
+
   private Map<Text,MergeInfo> parseMerges(String merges) {
     if (merges == null)
       return null;
@@ -108,16 +108,16 @@ public class TabletStateChangeIterator extends SkippingIterator {
       throw new RuntimeException(ex);
     }
   }
-  
+
   @Override
   protected void consume() throws IOException {
     while (getSource().hasTop()) {
       Key k = getSource().getTopKey();
       Value v = getSource().getTopValue();
-      
+
       if (onlineTables == null || current == null)
         return;
-      
+
       TabletLocationState tls;
       try {
         tls = MetaDataTableScanner.createTabletLocationState(k, v);
@@ -134,7 +134,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
       }
       // is the table supposed to be online or offline?
       boolean shouldBeOnline = onlineTables.contains(tls.extent.getTableId().toString());
-      
+
       switch (tls.getState(current)) {
         case ASSIGNED:
           // we always want data about assigned tablets
@@ -152,12 +152,12 @@ public class TabletStateChangeIterator extends SkippingIterator {
       getSource().next();
     }
   }
-  
+
   @Override
   public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
     throw new UnsupportedOperationException();
   }
-  
+
   public static void setCurrentServers(IteratorSetting cfg, Set<TServerInstance> goodServers) {
     if (goodServers != null) {
       List<String> servers = new ArrayList<String>();
@@ -166,12 +166,12 @@ public class TabletStateChangeIterator extends SkippingIterator {
       cfg.addOption(SERVERS_OPTION, Joiner.on(",").join(servers));
     }
   }
-  
+
   public static void setOnlineTables(IteratorSetting cfg, Set<String> onlineTables) {
     if (onlineTables != null)
       cfg.addOption(TABLES_OPTION, Joiner.on(",").join(onlineTables));
   }
-  
+
   public static void setMerges(IteratorSetting cfg, Collection<MergeInfo> merges) {
     DataOutputBuffer buffer = new DataOutputBuffer();
     try {
@@ -187,5 +187,5 @@ public class TabletStateChangeIterator extends SkippingIterator {
     String encoded = Base64.encodeBase64String(Arrays.copyOf(buffer.getData(), buffer.getLength()));
     cfg.addOption(MERGES_OPTION, encoded);
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
index 41de64a..5413e31 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateStore.java
@@ -23,42 +23,42 @@ import org.apache.accumulo.server.AccumuloServerContext;
 
 /**
  * Interface for storing information about tablet assignments. There are three implementations:
- * 
+ *
  * ZooTabletStateStore: information about the root tablet is stored in ZooKeeper MetaDataStateStore: information about the other tablets are stored in the
  * metadata table
- * 
+ *
  */
 public abstract class TabletStateStore implements Iterable<TabletLocationState> {
-  
+
   /**
    * Identifying name for this tablet state store.
    */
   abstract public String name();
-  
+
   /**
    * Scan the information about the tablets covered by this store
    */
   @Override
   abstract public ClosableIterator<TabletLocationState> iterator();
-  
+
   /**
    * Store the assigned locations in the data store.
    */
   abstract public void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException;
-  
+
   /**
    * Tablet servers will update the data store with the location when they bring the tablet online
    */
   abstract public void setLocations(Collection<Assignment> assignments) throws DistributedStoreException;
-  
+
   /**
    * Mark the tablets as having no known or future location.
-   * 
+   *
    * @param tablets
    *          the tablets' current information
    */
   abstract public void unassign(Collection<TabletLocationState> tablets) throws DistributedStoreException;
-  
+
   public static void unassign(AccumuloServerContext context, TabletLocationState tls) throws DistributedStoreException {
     TabletStateStore store;
     if (tls.extent.isRootTablet()) {
@@ -70,7 +70,7 @@ public abstract class TabletStateStore implements Iterable<TabletLocationState>
     }
     store.unassign(Collections.singletonList(tls));
   }
-  
+
   public static void setLocation(AccumuloServerContext context, Assignment assignment) throws DistributedStoreException {
     TabletStateStore store;
     if (assignment.tablet.isRootTablet()) {
@@ -82,5 +82,5 @@ public abstract class TabletStateStore implements Iterable<TabletLocationState>
     }
     store.setLocations(Collections.singletonList(assignment));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
index 1bcf482..2b7cb4c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
@@ -31,23 +31,23 @@ import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 
 public class ZooStore implements DistributedStore {
-  
+
   private static final Logger log = Logger.getLogger(ZooStore.class);
-  
+
   String basePath;
-  
+
   ZooCache cache = new ZooCache();
-  
+
   public ZooStore(String basePath) throws IOException {
     if (basePath.endsWith("/"))
       basePath = basePath.substring(0, basePath.length() - 1);
     this.basePath = basePath;
   }
-  
+
   public ZooStore() throws IOException {
     this(ZooUtil.getRoot(HdfsZooInstance.getInstance().getInstanceID()));
   }
-  
+
   @Override
   public byte[] get(String path) throws DistributedStoreException {
     try {
@@ -56,11 +56,11 @@ public class ZooStore implements DistributedStore {
       throw new DistributedStoreException(ex);
     }
   }
-  
+
   private String relative(String path) {
     return basePath + path;
   }
-  
+
   @Override
   public List<String> getChildren(String path) throws DistributedStoreException {
     try {
@@ -69,7 +69,7 @@ public class ZooStore implements DistributedStore {
       throw new DistributedStoreException(ex);
     }
   }
-  
+
   @Override
   public void put(String path, byte[] bs) throws DistributedStoreException {
     try {
@@ -81,7 +81,7 @@ public class ZooStore implements DistributedStore {
       throw new DistributedStoreException(ex);
     }
   }
-  
+
   @Override
   public void remove(String path) throws DistributedStoreException {
     try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
index 5481531..58b8446 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
@@ -32,14 +32,14 @@ import org.apache.log4j.Logger;
 import com.google.common.net.HostAndPort;
 
 public class ZooTabletStateStore extends TabletStateStore {
-  
+
   private static final Logger log = Logger.getLogger(ZooTabletStateStore.class);
   final private DistributedStore store;
-  
+
   public ZooTabletStateStore(DistributedStore store) {
     this.store = store;
   }
-  
+
   public ZooTabletStateStore() throws DistributedStoreException {
     try {
       store = new ZooStore();
@@ -47,17 +47,17 @@ public class ZooTabletStateStore extends TabletStateStore {
       throw new DistributedStoreException(ex);
     }
   }
-  
+
   @Override
   public ClosableIterator<TabletLocationState> iterator() {
     return new ClosableIterator<TabletLocationState>() {
       boolean finished = false;
-      
+
       @Override
       public boolean hasNext() {
         return !finished;
       }
-      
+
       @Override
       public TabletLocationState next() {
         finished = true;
@@ -65,17 +65,17 @@ public class ZooTabletStateStore extends TabletStateStore {
           byte[] future = store.get(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
           byte[] current = store.get(RootTable.ZROOT_TABLET_LOCATION);
           byte[] last = store.get(RootTable.ZROOT_TABLET_LAST_LOCATION);
-          
+
           TServerInstance currentSession = null;
           TServerInstance futureSession = null;
           TServerInstance lastSession = null;
-          
+
           if (future != null)
             futureSession = parse(future);
-          
+
           if (last != null)
             lastSession = parse(last);
-          
+
           if (current != null) {
             currentSession = parse(current);
             futureSession = null;
@@ -97,18 +97,17 @@ public class ZooTabletStateStore extends TabletStateStore {
           throw new RuntimeException(ex);
         }
       }
-      
+
       @Override
       public void remove() {
         throw new NotImplementedException();
       }
 
       @Override
-      public void close() {
-      }
+      public void close() {}
     };
   }
-  
+
   protected TServerInstance parse(byte[] current) {
     String str = new String(current, UTF_8);
     String[] parts = str.split("[|]", 2);
@@ -120,7 +119,7 @@ public class ZooTabletStateStore extends TabletStateStore {
       return null;
     }
   }
-  
+
   @Override
   public void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException {
     if (assignments.size() != 1)
@@ -136,7 +135,7 @@ public class ZooTabletStateStore extends TabletStateStore {
     }
     store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(UTF_8));
   }
-  
+
   @Override
   public void setLocations(Collection<Assignment> assignments) throws DistributedStoreException {
     if (assignments.size() != 1)
@@ -159,7 +158,7 @@ public class ZooTabletStateStore extends TabletStateStore {
     store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
     log.debug("Put down root tablet location");
   }
-  
+
   @Override
   public void unassign(Collection<TabletLocationState> tablets) throws DistributedStoreException {
     if (tablets.size() != 1)
@@ -171,10 +170,10 @@ public class ZooTabletStateStore extends TabletStateStore {
     store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
     log.debug("unassign root tablet location");
   }
-  
+
   @Override
   public String name() {
     return "Root Table";
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/master/tableOps/UserCompactionConfig.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/tableOps/UserCompactionConfig.java b/server/base/src/main/java/org/apache/accumulo/server/master/tableOps/UserCompactionConfig.java
index 6314105..98d7fd7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/tableOps/UserCompactionConfig.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/tableOps/UserCompactionConfig.java
@@ -23,10 +23,9 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.admin.CompactionStrategyConfig;
 import org.apache.accumulo.core.client.impl.CompactionStrategyConfigUtil;
-
-import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 
@@ -117,4 +116,4 @@ public class UserCompactionConfig implements Writable {
   public CompactionStrategyConfig getCompactionStrategy() {
     return compactionStrategy;
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
index 657fc31..93db9c8 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
@@ -85,7 +85,8 @@ public abstract class AbstractMetricsImpl implements Metrics {
 
     @Override
     public String toString() {
-      return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count).append("average", avg).append("minimum", min).append("maximum", max).toString();
+      return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count).append("average", avg).append("minimum", min)
+          .append("maximum", max).toString();
     }
 
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
index 087ca12..b0ffd64 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
@@ -32,50 +32,50 @@ import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
 import org.apache.commons.lang.builder.ToStringBuilder;
 
 public class MetricsConfiguration {
-  
+
   private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(MetricsConfiguration.class);
-  
+
   private static final String metricsFileName = "accumulo-metrics.xml";
-  
+
   private static boolean alreadyWarned = false;
-  
+
   private boolean notFound = false;
-  
+
   private int notFoundCount = 0;
-  
+
   private static SystemConfiguration sysConfig = null;
-  
+
   private static EnvironmentConfiguration envConfig = null;
-  
+
   private XMLConfiguration xConfig = null;
-  
+
   private Configuration config = null;
-  
+
   private final Object lock = new Object();
-  
+
   private boolean needsReloading = false;
-  
+
   private long lastCheckTime = 0;
-  
+
   private static long CONFIG_FILE_CHECK_INTERVAL = 1000 * 60 * 10; // 10 minutes
-  
+
   private static int CONFIG_FILE_CHECK_COUNTER = 100;
-  
+
   public final static long CONFIG_FILE_RELOAD_DELAY = 60000;
-  
+
   private MetricsConfigWatcher watcher = null;
-  
+
   private boolean enabled = false;
-  
+
   private String enabledName = null;
-  
+
   /**
    * Background thread that pokes the XMLConfiguration file to see if it has changed. If it has, then the Configuration Listener will get an event.
-   * 
+   *
    */
   private class MetricsConfigWatcher extends Daemon {
     public MetricsConfigWatcher() {}
-    
+
     public void run() {
       while (this.isAlive()) {
         try {
@@ -87,7 +87,7 @@ public class MetricsConfiguration {
       }
     }
   }
-  
+
   /**
    * ConfigurationListener that sets a flag to reload the XML config file
    */
@@ -97,7 +97,7 @@ public class MetricsConfiguration {
         needsReloading = true;
     }
   }
-  
+
   public MetricsConfiguration(String name) {
     // We are going to store the "enabled" parameter for this
     // name as a shortcut so that it doesn't have to be looked
@@ -105,7 +105,7 @@ public class MetricsConfiguration {
     this.enabledName = name + ".enabled";
     getMetricsConfiguration();
   }
-  
+
   public Configuration getEnvironmentConfiguration() {
     synchronized (MetricsConfiguration.class) {
       if (null == envConfig)
@@ -113,7 +113,7 @@ public class MetricsConfiguration {
       return envConfig;
     }
   }
-  
+
   public Configuration getSystemConfiguration() {
     synchronized (MetricsConfiguration.class) {
       if (null == sysConfig)
@@ -121,7 +121,7 @@ public class MetricsConfiguration {
       return sysConfig;
     }
   }
-  
+
   public Configuration getMetricsConfiguration() {
     if (notFound) {
       if (notFoundCount <= CONFIG_FILE_CHECK_COUNTER) {
@@ -145,7 +145,7 @@ public class MetricsConfiguration {
       }
     return config;
   }
-  
+
   private void loadConfiguration() {
     // Check to see if ACCUMULO_HOME environment variable is set.
     String ACUHOME = getEnvironmentConfiguration().getString("ACCUMULO_CONF_DIR");
@@ -160,7 +160,7 @@ public class MetricsConfiguration {
           xConfig.append(getEnvironmentConfiguration());
           xConfig.addConfigurationListener(new MetricsConfigListener());
           xConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
-          
+
           // Start a background Thread that checks a property from the XMLConfiguration
           // every so often to force the FileChangedReloadingStrategy to fire.
           if (null == watcher || !watcher.isAlive()) {
@@ -197,16 +197,16 @@ public class MetricsConfiguration {
     } else {
       enabled = false;
     }
-    
+
   }
-  
+
   public boolean isEnabled() {
     // Force reload if necessary
     if (null == getMetricsConfiguration())
       return false;
     return enabled;
   }
-  
+
   public static String toStringValue(Configuration config) {
     ToStringBuilder tsb = new ToStringBuilder(MetricsConfiguration.class);
     Iterator<?> keys = config.getKeys();
@@ -220,7 +220,7 @@ public class MetricsConfiguration {
     }
     return tsb.toString();
   }
-  
+
   public static void main(String[] args) throws Exception {
     MetricsConfiguration mc = new MetricsConfiguration("master");
     while (true) {
@@ -232,5 +232,5 @@ public class MetricsConfiguration {
       Thread.sleep(1000);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
index d87d055..869f3c2 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
@@ -18,7 +18,6 @@ package org.apache.accumulo.server.metrics;
 
 import javax.management.ObjectName;
 
-
 public class ThriftMetrics extends AbstractMetricsImpl implements ThriftMetricsMBean {
 
   static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(ThriftMetrics.class);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java b/server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
index 4acb1a9..96966ec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
@@ -19,32 +19,32 @@ package org.apache.accumulo.server.monitor;
 import org.apache.log4j.spi.LoggingEvent;
 
 public class DedupedLogEvent {
-  
+
   private LoggingEvent event;
   private int count = 0;
   private int hash = -1;
-  
+
   public DedupedLogEvent(LoggingEvent event) {
     this(event, 1);
   }
-  
+
   public DedupedLogEvent(LoggingEvent event, int count) {
     this.event = event;
     this.count = count;
   }
-  
+
   public LoggingEvent getEvent() {
     return event;
   }
-  
+
   public int getCount() {
     return count;
   }
-  
+
   public void setCount(int count) {
     this.count = count;
   }
-  
+
   @Override
   public int hashCode() {
     if (hash == -1) {
@@ -53,14 +53,14 @@ public class DedupedLogEvent {
     }
     return hash;
   }
-  
+
   @Override
   public boolean equals(Object obj) {
     if (obj instanceof DedupedLogEvent)
       return this.event.equals(((DedupedLogEvent) obj).event);
     return false;
   }
-  
+
   @Override
   public String toString() {
     return event.getMDC("application").toString() + ":" + event.getLevel().toString() + ":" + event.getMessage().toString();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
index 930b634..8f0f13e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
@@ -40,7 +40,7 @@ import org.apache.zookeeper.KeeperException;
 
 /**
  * Hijack log4j and capture log events for display.
- * 
+ *
  */
 public class LogService extends org.apache.log4j.AppenderSkeleton {
 
@@ -48,7 +48,7 @@ public class LogService extends org.apache.log4j.AppenderSkeleton {
 
   /**
    * Read logging events forward to us over the net.
-   * 
+   *
    */
   static class SocketServer implements Runnable {
     private ServerSocket server = null;
@@ -83,7 +83,7 @@ public class LogService extends org.apache.log4j.AppenderSkeleton {
 
   /**
    * Place the host:port advertisement for the Monitor's Log4j listener in ZooKeeper
-   * 
+   *
    * @param conf
    *          configuration for the instance
    * @param instanceId

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
index 0dfe9c0..2f2d0c4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
@@ -50,32 +50,32 @@ public class ProblemReport {
   private String exception;
   private String server;
   private long creationTime;
-  
+
   public ProblemReport(String table, ProblemType problemType, String resource, String server, Throwable e, long creationTime) {
     checkNotNull(table, "table is null");
     checkNotNull(problemType, "problemType is null");
     checkNotNull(resource, "resource is null");
     this.tableName = table;
-    
+
     this.problemType = problemType;
     this.resource = resource;
-    
+
     if (e != null) {
       this.exception = e.getMessage();
     }
-    
+
     if (server == null) {
       try {
         server = InetAddress.getLocalHost().getHostAddress();
       } catch (UnknownHostException e1) {
-        
+
       }
     }
-    
+
     this.server = server;
     this.creationTime = creationTime;
   }
-  
+
   public ProblemReport(String table, ProblemType problemType, String resource, String server, Throwable e) {
     this(table, problemType, resource, server, e, System.currentTimeMillis());
   }
@@ -83,7 +83,7 @@ public class ProblemReport {
   public ProblemReport(String table, ProblemType problemType, String resource, Throwable e) {
     this(table, problemType, resource, null, e);
   }
-  
+
   private ProblemReport(String table, ProblemType problemType, String resource, byte enc[]) throws IOException {
     checkNotNull(table, "table is null");
     checkNotNull(problemType, "problemType is null");
@@ -91,63 +91,63 @@ public class ProblemReport {
     this.tableName = table;
     this.problemType = problemType;
     this.resource = resource;
-    
+
     decode(enc);
   }
-  
+
   private byte[] encode() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream dos = new DataOutputStream(baos);
-    
+
     dos.writeLong(creationTime);
-    
+
     dos.writeBoolean(server != null);
     if (server != null) {
       dos.writeUTF(server);
     }
-    
+
     dos.writeBoolean(exception != null);
     if (exception != null) {
       dos.writeUTF(exception);
     }
-    
+
     dos.close();
     baos.close();
-    
+
     return baos.toByteArray();
   }
-  
+
   private void decode(byte enc[]) throws IOException {
     ByteArrayInputStream bais = new ByteArrayInputStream(enc);
     DataInputStream dis = new DataInputStream(bais);
-    
+
     creationTime = dis.readLong();
-    
+
     if (dis.readBoolean()) {
       server = dis.readUTF();
     } else {
       server = null;
     }
-    
+
     if (dis.readBoolean()) {
       exception = dis.readUTF();
     } else {
       exception = null;
     }
   }
-  
+
   void removeFromMetadataTable(AccumuloServerContext context) throws Exception {
     Mutation m = new Mutation(new Text("~err_" + tableName));
     m.putDelete(new Text(problemType.name()), new Text(resource));
     MetadataTableUtil.getMetadataTable(context).update(m);
   }
-  
+
   void saveToMetadataTable(AccumuloServerContext context) throws Exception {
     Mutation m = new Mutation(new Text("~err_" + tableName));
     m.put(new Text(problemType.name()), new Text(resource), new Value(encode()));
     MetadataTableUtil.getMetadataTable(context).update(m);
   }
-  
+
   void removeFromZooKeeper() throws Exception {
     removeFromZooKeeper(ZooReaderWriter.getInstance(), HdfsZooInstance.getInstance());
   }
@@ -156,7 +156,7 @@ public class ProblemReport {
     String zpath = getZPath(instance);
     zoorw.recursiveDelete(zpath, NodeMissingPolicy.SKIP);
   }
-  
+
   void saveToZooKeeper() throws Exception {
     saveToZooKeeper(ZooReaderWriter.getInstance(), HdfsZooInstance.getInstance());
   }
@@ -164,7 +164,7 @@ public class ProblemReport {
   void saveToZooKeeper(ZooReaderWriter zoorw, Instance instance) throws IOException, KeeperException, InterruptedException {
     zoorw.putPersistentData(getZPath(instance), encode(), NodeExistsPolicy.OVERWRITE);
   }
-  
+
   private String getZPath(Instance instance) throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream dos = new DataOutputStream(baos);
@@ -173,69 +173,69 @@ public class ProblemReport {
     dos.writeUTF(getResource());
     dos.close();
     baos.close();
-    
+
     String zpath = ZooUtil.getRoot(instance) + Constants.ZPROBLEMS + "/" + Encoding.encodeAsBase64FileName(new Text(baos.toByteArray()));
     return zpath;
   }
-  
+
   static ProblemReport decodeZooKeeperEntry(String node) throws Exception {
     return decodeZooKeeperEntry(node, ZooReaderWriter.getInstance(), HdfsZooInstance.getInstance());
   }
 
   static ProblemReport decodeZooKeeperEntry(String node, ZooReaderWriter zoorw, Instance instance) throws IOException, KeeperException, InterruptedException {
     byte bytes[] = Encoding.decodeBase64FileName(node);
-    
+
     ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
     DataInputStream dis = new DataInputStream(bais);
-    
+
     String tableName = dis.readUTF();
     String problemType = dis.readUTF();
     String resource = dis.readUTF();
-    
+
     String zpath = ZooUtil.getRoot(instance) + Constants.ZPROBLEMS + "/" + node;
     byte[] enc = zoorw.getData(zpath, null);
-    
+
     return new ProblemReport(tableName, ProblemType.valueOf(problemType), resource, enc);
-    
+
   }
-  
+
   public static ProblemReport decodeMetadataEntry(Entry<Key,Value> entry) throws IOException {
     String tableName = entry.getKey().getRow().toString().substring("~err_".length());
     String problemType = entry.getKey().getColumnFamily().toString();
     String resource = entry.getKey().getColumnQualifier().toString();
-    
+
     return new ProblemReport(tableName, ProblemType.valueOf(problemType), resource, entry.getValue().get());
   }
-  
+
   public String getTableName() {
     return tableName;
   }
-  
+
   public ProblemType getProblemType() {
     return problemType;
   }
-  
+
   public String getResource() {
     return resource;
   }
-  
+
   public String getException() {
     return exception;
   }
-  
+
   public String getServer() {
     return server;
   }
-  
+
   public long getTime() {
     return creationTime;
   }
-  
+
   @Override
   public int hashCode() {
     return tableName.hashCode() + problemType.hashCode() + resource.hashCode();
   }
-  
+
   @Override
   public boolean equals(Object o) {
     if (o instanceof ProblemReport) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReportingIterator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReportingIterator.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReportingIterator.java
index 51ac12f..349ed20 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReportingIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReportingIterator.java
@@ -37,7 +37,7 @@ public class ProblemReportingIterator implements InterruptibleIterator {
   private String resource;
   private String table;
   private final AccumuloServerContext context;
-  
+
   public ProblemReportingIterator(AccumuloServerContext context, String table, String resource, boolean continueOnError,
       SortedKeyValueIterator<Key,Value> source) {
     this.context = context;
@@ -46,22 +46,22 @@ public class ProblemReportingIterator implements InterruptibleIterator {
     this.continueOnError = continueOnError;
     this.source = source;
   }
-  
+
   @Override
   public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
     return new ProblemReportingIterator(context, table, resource, continueOnError, source.deepCopy(env));
   }
-  
+
   @Override
   public Key getTopKey() {
     return source.getTopKey();
   }
-  
+
   @Override
   public Value getTopValue() {
     return source.getTopValue();
   }
-  
+
   @Override
   public boolean hasTop() {
     if (sawError) {
@@ -69,12 +69,12 @@ public class ProblemReportingIterator implements InterruptibleIterator {
     }
     return source.hasTop();
   }
-  
+
   @Override
   public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
     throw new UnsupportedOperationException();
   }
-  
+
   @Override
   public void next() throws IOException {
     try {
@@ -87,13 +87,13 @@ public class ProblemReportingIterator implements InterruptibleIterator {
       }
     }
   }
-  
+
   @Override
   public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
     if (continueOnError && sawError) {
       return;
     }
-    
+
     try {
       source.seek(range, columnFamilies, inclusive);
     } catch (IOException ioe) {
@@ -104,15 +104,15 @@ public class ProblemReportingIterator implements InterruptibleIterator {
       }
     }
   }
-  
+
   public boolean sawError() {
     return sawError;
   }
-  
+
   public String getResource() {
     return resource;
   }
-  
+
   @Override
   public void setInterruptFlag(AtomicBoolean flag) {
     ((InterruptibleIterator) source).setInterruptFlag(flag);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index c1da89a..440ee81 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -61,16 +61,16 @@ public class ProblemReports implements Iterable<ProblemReport> {
   private static final Logger log = LoggerFactory.getLogger(ProblemReports.class);
 
   private final LRUMap problemReports = new LRUMap(1000);
-  
+
   /*
    * use a thread pool so that reporting a problem never blocks
-   * 
+   *
    * make the thread pool use a bounded queue to avoid the case where problem reports are not being processed because the whole system is in a really bad state
    * (like HDFS is down) and everything is reporting lots of problems, but problem reports can not be processed
    */
   private ExecutorService reportExecutor = new ThreadPoolExecutor(0, 1, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(500), new NamingThreadFactory(
       "acu-problem-reporter"));
-  
+
   private final AccumuloServerContext context;
 
   public ProblemReports(AccumuloServerContext context) {
@@ -78,22 +78,22 @@ public class ProblemReports implements Iterable<ProblemReport> {
   }
 
   public void report(final ProblemReport pr) {
-    
+
     synchronized (problemReports) {
       if (problemReports.containsKey(pr)) {
         return;
       }
-      
+
       problemReports.put(pr, System.currentTimeMillis());
     }
-    
+
     Runnable r = new Runnable() {
-      
+
       @Override
       public void run() {
-        
+
         log.debug("Filing problem report " + pr.getTableName() + " " + pr.getProblemType() + " " + pr.getResource());
-        
+
         try {
           if (isMeta(pr.getTableName())) {
             // file report in zookeeper
@@ -106,33 +106,33 @@ public class ProblemReports implements Iterable<ProblemReport> {
           log.error("Failed to file problem report " + pr.getTableName() + " " + pr.getProblemType() + " " + pr.getResource(), e);
         }
       }
-      
+
     };
-    
+
     try {
       reportExecutor.execute(new LoggingRunnable(log, r));
     } catch (RejectedExecutionException ree) {
       log.error("Failed to report problem " + pr.getTableName() + " " + pr.getProblemType() + " " + pr.getResource() + "  " + ree.getMessage());
     }
-    
+
   }
-  
+
   public void printProblems() throws Exception {
     for (ProblemReport pr : this) {
       System.out.println(pr.getTableName() + " " + pr.getProblemType() + " " + pr.getResource() + " " + pr.getException());
     }
   }
-  
+
   public void deleteProblemReport(String table, ProblemType pType, String resource) {
     final ProblemReport pr = new ProblemReport(table, pType, resource, null);
-    
+
     Runnable r = new Runnable() {
-      
+
       @Override
       public void run() {
         try {
           if (isMeta(pr.getTableName())) {
-           // file report in zookeeper
+            // file report in zookeeper
             pr.removeFromZooKeeper();
           } else {
             // file report in metadata table
@@ -143,18 +143,18 @@ public class ProblemReports implements Iterable<ProblemReport> {
         }
       }
     };
-    
+
     try {
       reportExecutor.execute(new LoggingRunnable(log, r));
     } catch (RejectedExecutionException ree) {
       log.error("Failed to delete problem report " + pr.getTableName() + " " + pr.getProblemType() + " " + pr.getResource() + "  " + ree.getMessage());
     }
   }
-  
+
   private static ProblemReports instance;
-  
+
   public void deleteProblemReports(String table) throws Exception {
-    
+
     if (isMeta(table)) {
       Iterator<ProblemReport> pri = iterator(table);
       while (pri.hasNext()) {
@@ -162,38 +162,38 @@ public class ProblemReports implements Iterable<ProblemReport> {
       }
       return;
     }
-    
+
     Connector connector = context.getConnector();
     Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
     scanner.addScanIterator(new IteratorSetting(1, "keys-only", SortedKeyIterator.class));
-    
+
     scanner.setRange(new Range(new Text("~err_" + table)));
-    
+
     Mutation delMut = new Mutation(new Text("~err_" + table));
-    
+
     boolean hasProblems = false;
     for (Entry<Key,Value> entry : scanner) {
       hasProblems = true;
       delMut.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier());
     }
-    
+
     if (hasProblems)
       MetadataTableUtil.getMetadataTable(context).update(delMut);
   }
-  
+
   private static boolean isMeta(String tableId) {
     return tableId.equals(MetadataTable.ID) || tableId.equals(RootTable.ID);
   }
-  
+
   public Iterator<ProblemReport> iterator(final String table) {
     try {
-      
+
       return new Iterator<ProblemReport>() {
-        
+
         IZooReaderWriter zoo = ZooReaderWriter.getInstance();
         private int iter1Count = 0;
         private Iterator<String> iter1;
-        
+
         private Iterator<String> getIter1() {
           if (iter1 == null) {
             try {
@@ -208,29 +208,29 @@ public class ProblemReports implements Iterable<ProblemReport> {
               throw new RuntimeException(e);
             }
           }
-          
+
           return iter1;
         }
-        
+
         private Iterator<Entry<Key,Value>> iter2;
-        
+
         private Iterator<Entry<Key,Value>> getIter2() {
           if (iter2 == null) {
             try {
               if ((table == null || !isMeta(table)) && iter1Count == 0) {
                 Connector connector = context.getConnector();
                 Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
-                
+
                 scanner.setTimeout(3, TimeUnit.SECONDS);
-                
+
                 if (table == null) {
                   scanner.setRange(new Range(new Text("~err_"), false, new Text("~err`"), false));
                 } else {
                   scanner.setRange(new Range(new Text("~err_" + table)));
                 }
-                
+
                 iter2 = scanner.iterator();
-                
+
               } else {
                 Map<Key,Value> m = Collections.emptyMap();
                 iter2 = m.entrySet().iterator();
@@ -239,23 +239,23 @@ public class ProblemReports implements Iterable<ProblemReport> {
               throw new RuntimeException(e);
             }
           }
-          
+
           return iter2;
         }
-        
+
         @Override
         public boolean hasNext() {
           if (getIter1().hasNext()) {
             return true;
           }
-          
+
           if (getIter2().hasNext()) {
             return true;
           }
-          
+
           return false;
         }
-        
+
         @Override
         public ProblemReport next() {
           try {
@@ -263,66 +263,66 @@ public class ProblemReports implements Iterable<ProblemReport> {
               iter1Count++;
               return ProblemReport.decodeZooKeeperEntry(getIter1().next());
             }
-            
+
             if (getIter2().hasNext()) {
               return ProblemReport.decodeMetadataEntry(getIter2().next());
             }
           } catch (Exception e) {
             throw new RuntimeException(e);
           }
-          
+
           throw new NoSuchElementException();
         }
-        
+
         @Override
         public void remove() {
           throw new UnsupportedOperationException();
         }
-        
+
       };
-      
+
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
-  
+
   @Override
   public Iterator<ProblemReport> iterator() {
     return iterator(null);
   }
-  
+
   public static synchronized ProblemReports getInstance(AccumuloServerContext context) {
     if (instance == null) {
       instance = new ProblemReports(context);
     }
-    
+
     return instance;
   }
-  
+
   public static void main(String args[]) throws Exception {
     getInstance(new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance()))).printProblems();
   }
-  
+
   public Map<String,Map<ProblemType,Integer>> summarize() {
-    
+
     TreeMap<String,Map<ProblemType,Integer>> summary = new TreeMap<String,Map<ProblemType,Integer>>();
-    
+
     for (ProblemReport pr : this) {
       Map<ProblemType,Integer> tableProblems = summary.get(pr.getTableName());
       if (tableProblems == null) {
         tableProblems = new EnumMap<ProblemType,Integer>(ProblemType.class);
         summary.put(pr.getTableName(), tableProblems);
       }
-      
+
       Integer count = tableProblems.get(pr.getProblemType());
       if (count == null) {
         count = 0;
       }
-      
+
       tableProblems.put(pr.getProblemType(), count + 1);
     }
-    
+
     return summary;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java b/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
index baa8383..2494ee2 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
@@ -25,16 +25,15 @@ import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
 
 /**
- * 
+ *
  */
 public class DistributedWorkQueueWorkAssignerHelper {
 
-
   public static final String KEY_SEPARATOR = "|";
 
   /**
    * Serialize a filename and a {@link ReplicationTarget} into the expected key format for use with the {@link DistributedWorkQueue}
-   * 
+   *
    * @param filename
    *          Filename for data to be replicated
    * @param replTarget

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index edd2642..e1bbe3d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -98,8 +98,7 @@ public class ReplicationUtil {
     for (Entry<String,String> property : context.getConfiguration().getAllPropertiesWithPrefix(Property.REPLICATION_PEERS).entrySet()) {
       String key = property.getKey();
       // Filter out cruft that we don't want
-      if (!key.startsWith(Property.REPLICATION_PEER_USER.getKey())
-          && !key.startsWith(Property.REPLICATION_PEER_PASSWORD.getKey())) {
+      if (!key.startsWith(Property.REPLICATION_PEER_USER.getKey()) && !key.startsWith(Property.REPLICATION_PEER_PASSWORD.getKey())) {
         String peerName = property.getKey().substring(Property.REPLICATION_PEERS.getKey().length());
         ReplicaSystem replica;
         try {
@@ -135,12 +134,12 @@ public class ReplicationUtil {
       TableConfiguration tableConf = context.getServerConfigurationFactory().getTableConfiguration(localId);
       for (Entry<String,String> prop : tableConf.getAllPropertiesWithPrefix(Property.TABLE_REPLICATION_TARGET).entrySet()) {
         String peerName = prop.getKey().substring(Property.TABLE_REPLICATION_TARGET.getKey().length());
-          String remoteIdentifier = prop.getValue();
-          ReplicationTarget target = new ReplicationTarget(peerName, remoteIdentifier, localId);
+        String remoteIdentifier = prop.getValue();
+        ReplicationTarget target = new ReplicationTarget(peerName, remoteIdentifier, localId);
 
-          allConfiguredTargets.add(target);
-        }
+        allConfiguredTargets.add(target);
       }
+    }
 
     return allConfiguredTargets;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
index ecca99e..5317c4d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
@@ -35,7 +35,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
 
 /**
  * Defines the rules for combining multiple {@link Status} messages
- * 
+ *
  * Messages that are "closed", stay closed. "Begin" and "end" always choose the maximum of the two.
  */
 public class StatusCombiner extends TypedValueCombiner<Status> {
@@ -113,7 +113,7 @@ public class StatusCombiner extends TypedValueCombiner<Status> {
 
   /**
    * Update a {@link Builder} with another {@link Status}
-   * 
+   *
    * @param combined
    *          The Builder to combine into
    * @param status

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java b/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
index 1069835..da52354 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
@@ -19,7 +19,6 @@ package org.apache.accumulo.server.replication;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 
-
 /**
  * Interface to allow for multiple implementations that assign replication work
  */

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
index a97853d..9a0825d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
@@ -23,8 +23,7 @@ import org.apache.zookeeper.KeeperException;
 /**
  * We don't want to introduce an upgrade path to 1.7 only for some new nodes within ZooKeeper
  * <p>
- * We can take the penalty of embedding this logic into the server processes, but alleviate
- * users/developers from having to worry about the zookeeper state.
+ * We can take the penalty of embedding this logic into the server processes, but alleviate users/developers from having to worry about the zookeeper state.
  */
 public class ZooKeeperInitialization {
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/rpc/ClientInfoProcessorFactory.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/ClientInfoProcessorFactory.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/ClientInfoProcessorFactory.java
index 5f630c2..cbd719b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/ClientInfoProcessorFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/ClientInfoProcessorFactory.java
@@ -50,4 +50,4 @@ public class ClientInfoProcessorFactory extends TProcessorFactory {
     }
     return super.getProcessor(trans);
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java
index a488da9..b28ecb7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java
@@ -40,6 +40,7 @@ public class RpcWrapper {
   public static <T> T service(final T instance) {
     InvocationHandler handler = new RpcServerInvocationHandler<T>(instance) {
       private final Logger log = LoggerFactory.getLogger(instance.getClass());
+
       @Override
       public Object invoke(Object obj, Method method, Object[] args) throws Throwable {
         try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
index 3afe149..d035862 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
@@ -19,11 +19,6 @@
 
 package org.apache.accumulo.server.rpc;
 
-import org.apache.log4j.Logger;
-import org.apache.thrift.transport.TNonblockingServerTransport;
-import org.apache.thrift.transport.TNonblockingSocket;
-import org.apache.thrift.transport.TTransportException;
-
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.net.ServerSocket;
@@ -34,11 +29,16 @@ import java.nio.channels.Selector;
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 
+import org.apache.log4j.Logger;
+import org.apache.thrift.transport.TNonblockingServerTransport;
+import org.apache.thrift.transport.TNonblockingSocket;
+import org.apache.thrift.transport.TTransportException;
+
 /**
  * Wrapper around ServerSocketChannel.
  *
- * This class is copied from org.apache.thrift.transport.TNonblockingServerSocket version 0.9.
- * The only change (apart from the logging statements) is the addition of the {@link #getPort()} method to retrieve the port used by the ServerSocket.
+ * This class is copied from org.apache.thrift.transport.TNonblockingServerSocket version 0.9. The only change (apart from the logging statements) is the
+ * addition of the {@link #getPort()} method to retrieve the port used by the ServerSocket.
  */
 public class TNonblockingServerSocket extends TNonblockingServerTransport {
   private static final Logger log = Logger.getLogger(TNonblockingServerTransport.class.getName());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index a2afeac..cc7a7cd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
@@ -121,7 +121,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
   private void audit(TCredentials credentials, boolean permitted, String template, Object... args) {
     if (shouldAudit(credentials)) {
       String prefix = permitted ? "permitted" : "denied";
-      audit.info("operation: " + prefix + "; user: " + credentials.getPrincipal() + "; client: "  + TServerUtils.clientAddress.get() + "; " + String.format(template, args));
+      audit.info("operation: " + prefix + "; user: " + credentials.getPrincipal() + "; client: " + TServerUtils.clientAddress.get() + "; "
+          + String.format(template, args));
     }
   }
 
@@ -166,8 +167,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String CAN_SCAN_BATCH_AUDIT_TEMPLATE = "action: scan; targetTable: %s; authorizations: %s; range: %s; columns: %s; iterators: %s; iteratorOptions: %s;";
 
   @Override
-  public boolean canScan(TCredentials credentials, String tableId, String namespaceId, Map<TKeyExtent,List<TRange>> tbatch, List<TColumn> tcolumns, List<IterInfo> ssiList,
-      Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
+  public boolean canScan(TCredentials credentials, String tableId, String namespaceId, Map<TKeyExtent,List<TRange>> tbatch, List<TColumn> tcolumns,
+      List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
     if (shouldAudit(credentials, tableId)) {
       @SuppressWarnings({"unchecked", "rawtypes"})
       Map<KeyExtent,List<Range>> convertedBatch = Translator.translate(tbatch, new Translator.TKeyExtentTranslator(), new Translator.ListTranslator(
@@ -278,7 +279,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String CAN_CLONE_TABLE_AUDIT_TEMPLATE = "action: cloneTable; targetTable: %s; newTableName: %s";
 
   @Override
-  public boolean canCloneTable(TCredentials c, String tableId, String tableName, String destinationNamespaceId, String sourceNamespaceId) throws ThriftSecurityException {
+  public boolean canCloneTable(TCredentials c, String tableId, String tableName, String destinationNamespaceId, String sourceNamespaceId)
+      throws ThriftSecurityException {
     String oldTableName = getTableName(tableId);
     try {
       boolean result = super.canCloneTable(c, tableId, tableName, destinationNamespaceId, sourceNamespaceId);
@@ -293,9 +295,10 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String CAN_DELETE_RANGE_AUDIT_TEMPLATE = "action: deleteData; targetTable: %s; startRange: %s; endRange: %s;";
 
   @Override
-  public boolean canDeleteRange(TCredentials c, String tableId, String tableName, Text startRow, Text endRow, String namespaceId) throws ThriftSecurityException {
+  public boolean canDeleteRange(TCredentials c, String tableId, String tableName, Text startRow, Text endRow, String namespaceId)
+      throws ThriftSecurityException {
     try {
-      boolean result = super.canDeleteRange(c, tableId, tableName, startRow, endRow,namespaceId);
+      boolean result = super.canDeleteRange(c, tableId, tableName, startRow, endRow, namespaceId);
       audit(c, result, CAN_DELETE_RANGE_AUDIT_TEMPLATE, tableName, startRow.toString(), endRow.toString());
       return result;
     } catch (ThriftSecurityException ex) {
@@ -377,7 +380,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String GRANT_TABLE_PERMISSION_AUDIT_TEMPLATE = "action: grantTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
 
   @Override
-  public void grantTablePermission(TCredentials credentials, String user, String tableId, TablePermission permission, String namespaceId) throws ThriftSecurityException {
+  public void grantTablePermission(TCredentials credentials, String user, String tableId, TablePermission permission, String namespaceId)
+      throws ThriftSecurityException {
     String tableName = getTableName(tableId);
     try {
       super.grantTablePermission(credentials, user, tableId, permission, namespaceId);
@@ -405,7 +409,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String REVOKE_TABLE_PERMISSION_AUDIT_TEMPLATE = "action: revokeTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
 
   @Override
-  public void revokeTablePermission(TCredentials credentials, String user, String tableId, TablePermission permission, String namespaceId) throws ThriftSecurityException {
+  public void revokeTablePermission(TCredentials credentials, String user, String tableId, TablePermission permission, String namespaceId)
+      throws ThriftSecurityException {
     String tableName = getTableName(tableId);
     try {
       super.revokeTablePermission(credentials, user, tableId, permission, namespaceId);
@@ -437,7 +442,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
   }
 
   // The audit log is already logging the principal, so we don't have anything else to audit
-  public static final String AUTHENICATE_AUDIT_TEMPLATE =  "";
+  public static final String AUTHENICATE_AUDIT_TEMPLATE = "";
 
   @Override
   protected void authenticate(TCredentials credentials) throws ThriftSecurityException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index 5e81018..5fe57b7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -104,8 +104,8 @@ public class SecurityOperation {
   }
 
   protected static PermissionHandler getPermHandler(String instanceId, boolean initialize) {
-    PermissionHandler toRet = SiteConfiguration.getInstance().instantiateClassProperty(Property.INSTANCE_SECURITY_PERMISSION_HANDLER,
-        PermissionHandler.class, ZKPermHandler.getInstance());
+    PermissionHandler toRet = SiteConfiguration.getInstance().instantiateClassProperty(Property.INSTANCE_SECURITY_PERMISSION_HANDLER, PermissionHandler.class,
+        ZKPermHandler.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
@@ -241,7 +241,7 @@ public class SecurityOperation {
 
   /**
    * Checks if a user has a system permission
-   * 
+   *
    * @return true if a user exists and has permission; false otherwise
    */
   private boolean hasSystemPermissionWithNamespaceId(TCredentials credentials, SystemPermission permission, String namespaceId, boolean useCached)
@@ -261,7 +261,7 @@ public class SecurityOperation {
   /**
    * Checks if a user has a system permission<br/>
    * This cannot check if a system user has permission.
-   * 
+   *
    * @return true if a user exists and has permission; false otherwise
    */
   private boolean _hasSystemPermission(String user, SystemPermission permission, boolean useCached) throws ThriftSecurityException {
@@ -281,10 +281,11 @@ public class SecurityOperation {
 
   /**
    * Checks if a user has a table permission
-   * 
+   *
    * @return true if a user exists and has permission; false otherwise
    */
-  protected boolean hasTablePermission(TCredentials credentials, String tableId, String namespaceId, TablePermission permission, boolean useCached) throws ThriftSecurityException {
+  protected boolean hasTablePermission(TCredentials credentials, String tableId, String namespaceId, TablePermission permission, boolean useCached)
+      throws ThriftSecurityException {
     if (isSystemUser(credentials))
       return true;
     return _hasTablePermission(credentials.getPrincipal(), tableId, permission, useCached)
@@ -294,7 +295,7 @@ public class SecurityOperation {
   /**
    * Checks if a user has a table permission<br/>
    * This cannot check if a system user has permission.
-   * 
+   *
    * @return true if a user exists and has permission; false otherwise
    */
   protected boolean _hasTablePermission(String user, String table, TablePermission permission, boolean useCached) throws ThriftSecurityException {
@@ -317,7 +318,7 @@ public class SecurityOperation {
   /**
    * Checks if a user has a namespace permission<br/>
    * This cannot check if a system user has permission.
-   * 
+   *
    * @return true if a user exists and has permission; false otherwise
    */
   protected boolean _hasNamespacePermission(String user, String namespace, NamespacePermission permission, boolean useCached) throws ThriftSecurityException {
@@ -369,8 +370,8 @@ public class SecurityOperation {
     return canScan(credentials, tableId, namespaceId);
   }
 
-  public boolean canScan(TCredentials credentials, String table, String namespaceId, Map<TKeyExtent,List<TRange>> tbatch, List<TColumn> tcolumns, List<IterInfo> ssiList,
-      Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
+  public boolean canScan(TCredentials credentials, String table, String namespaceId, Map<TKeyExtent,List<TRange>> tbatch, List<TColumn> tcolumns,
+      List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
     return canScan(credentials, table, namespaceId);
   }
 
@@ -379,11 +380,13 @@ public class SecurityOperation {
     return hasTablePermission(credentials, tableId, namespaceId, TablePermission.WRITE, true);
   }
 
-  public boolean canConditionallyUpdate(TCredentials credentials, String tableID, String namespaceId, List<ByteBuffer> authorizations) throws ThriftSecurityException {
+  public boolean canConditionallyUpdate(TCredentials credentials, String tableID, String namespaceId, List<ByteBuffer> authorizations)
+      throws ThriftSecurityException {
 
     authenticate(credentials);
 
-    return hasTablePermission(credentials, tableID, namespaceId, TablePermission.WRITE, true) && hasTablePermission(credentials, tableID, namespaceId, TablePermission.READ, true);
+    return hasTablePermission(credentials, tableID, namespaceId, TablePermission.WRITE, true)
+        && hasTablePermission(credentials, tableID, namespaceId, TablePermission.READ, true);
   }
 
   public boolean canSplitTablet(TCredentials credentials, String tableId, String namespaceId) throws ThriftSecurityException {
@@ -403,7 +406,8 @@ public class SecurityOperation {
 
   public boolean canFlush(TCredentials c, String tableId, String namespaceId) throws ThriftSecurityException {
     authenticate(c);
-    return hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false);
+    return hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false);
   }
 
   public boolean canAlterTable(TCredentials c, String tableId, String namespaceId) throws ThriftSecurityException {
@@ -423,14 +427,17 @@ public class SecurityOperation {
         || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false);
   }
 
-  public boolean canCloneTable(TCredentials c, String tableId, String tableName, String destinationNamespaceId, String srcNamespaceId) throws ThriftSecurityException {
+  public boolean canCloneTable(TCredentials c, String tableId, String tableName, String destinationNamespaceId, String srcNamespaceId)
+      throws ThriftSecurityException {
     authenticate(c);
-    return hasSystemPermissionWithNamespaceId(c, SystemPermission.CREATE_TABLE, destinationNamespaceId, false) && hasTablePermission(c, tableId, srcNamespaceId, TablePermission.READ, false);
+    return hasSystemPermissionWithNamespaceId(c, SystemPermission.CREATE_TABLE, destinationNamespaceId, false)
+        && hasTablePermission(c, tableId, srcNamespaceId, TablePermission.READ, false);
   }
 
   public boolean canDeleteTable(TCredentials c, String tableId, String namespaceId) throws ThriftSecurityException {
     authenticate(c);
-    return hasSystemPermissionWithNamespaceId(c, SystemPermission.DROP_TABLE, namespaceId, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.DROP_TABLE, false);
+    return hasSystemPermissionWithNamespaceId(c, SystemPermission.DROP_TABLE, namespaceId, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.DROP_TABLE, false);
   }
 
   public boolean canOnlineOfflineTable(TCredentials c, String tableId, FateOperation op, String namespaceId) throws ThriftSecurityException {
@@ -447,9 +454,11 @@ public class SecurityOperation {
         || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false);
   }
 
-  public boolean canDeleteRange(TCredentials c, String tableId, String tableName, Text startRow, Text endRow, String namespaceId) throws ThriftSecurityException {
+  public boolean canDeleteRange(TCredentials c, String tableId, String tableName, Text startRow, Text endRow, String namespaceId)
+      throws ThriftSecurityException {
     authenticate(c);
-    return hasSystemPermissionWithNamespaceId(c, SystemPermission.SYSTEM, namespaceId, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false);
+    return hasSystemPermissionWithNamespaceId(c, SystemPermission.SYSTEM, namespaceId, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false);
   }
 
   public boolean canBulkImport(TCredentials c, String tableId, String tableName, String dir, String failDir, String namespaceId) throws ThriftSecurityException {
@@ -464,7 +473,8 @@ public class SecurityOperation {
   public boolean canCompact(TCredentials c, String tableId, String namespaceId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_TABLE, namespaceId, false)
-        || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false);
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.ALTER_TABLE, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.WRITE, false);
   }
 
   public boolean canChangeAuthorizations(TCredentials c, String user) throws ThriftSecurityException {
@@ -499,7 +509,8 @@ public class SecurityOperation {
 
   public boolean canGrantTable(TCredentials c, String user, String tableId, String namespaceId) throws ThriftSecurityException {
     authenticate(c);
-    return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_TABLE, namespaceId, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
+    return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_TABLE, namespaceId, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
   }
 
   public boolean canGrantNamespace(TCredentials c, String user, String namespace) throws ThriftSecurityException {
@@ -510,7 +521,7 @@ public class SecurityOperation {
     authenticate(c);
     // The one case where Table/SystemPermission -> NamespacePermission breaks down. The alternative is to make SystemPermission.ALTER_NAMESPACE provide
     // NamespacePermission.GRANT & ALTER_NAMESPACE, but then it would cause some permission checks to succeed with GRANT when they shouldn't
-    
+
     // This is a bit hackier then I (vines) wanted, but I think this one hackiness makes the overall SecurityOperations more succinct.
     return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_NAMESPACE, namespace, false)
         || hasNamespacePermission(c, c.principal, namespace, NamespacePermission.GRANT);
@@ -531,7 +542,8 @@ public class SecurityOperation {
 
   public boolean canRevokeTable(TCredentials c, String user, String tableId, String namespaceId) throws ThriftSecurityException {
     authenticate(c);
-    return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_TABLE, namespaceId, false) || hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
+    return hasSystemPermissionWithNamespaceId(c, SystemPermission.ALTER_TABLE, namespaceId, false)
+        || hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
   }
 
   public boolean canRevokeNamespace(TCredentials c, String user, String namespace) throws ThriftSecurityException {


Mime
View raw message