accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1493916 [3/5] - in /accumulo/branches/ACCUMULO-118: ./ assemble/ assemble/src/main/assemblies/ conf/ conf/examples/1GB/native-standalone/ conf/examples/1GB/standalone/ conf/examples/2GB/native-standalone/ conf/examples/2GB/standalone/ conf...
Date Mon, 17 Jun 2013 20:12:07 GMT
Modified: accumulo/branches/ACCUMULO-118/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java (original)
+++ accumulo/branches/ACCUMULO-118/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java Mon Jun 17 20:12:04 2013
@@ -16,10 +16,8 @@
  */
 package org.apache.accumulo.examples.simple.client;
 
-import java.io.IOException;
 import java.util.Map.Entry;
 
-import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.cli.ClientOpts;
 import org.apache.accumulo.core.cli.ScannerOpts;
@@ -35,6 +33,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
@@ -166,7 +165,8 @@ public class RowOperations {
   
   /**
    * Deletes a row given a text object
-   * @param opts 
+   * 
+   * @param opts
    * 
    * @param row
    * @throws TableNotFoundException
@@ -209,18 +209,10 @@ public class RowOperations {
   
   /**
    * Gets a scanner over one row
-   * @param opts 
-   * 
-   * @param row
-   * @return
-   * @throws TableNotFoundException
-   * @throws AccumuloSecurityException
-   * @throws AccumuloException
-   * @throws IOException
    */
   private static Scanner getRow(ClientOpts opts, ScannerOpts scanOpts, Text row) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     // Create a scanner
-    Scanner scanner = connector.createScanner(table, Constants.NO_AUTHS);
+    Scanner scanner = connector.createScanner(table, Authorizations.EMPTY);
     scanner.setBatchSize(scanOpts.scanBatchSize);
     // Say start key is the one with key of row
     // and end key is the one that immediately follows the row

Propchange: accumulo/branches/ACCUMULO-118/fate/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 17 20:12:04 2013
@@ -1,5 +1,3 @@
-.settings
-.classpath
-.project
+.*
 target
 accumulo-fate.iml

Propchange: accumulo/branches/ACCUMULO-118/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Reverse-merged /accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1478775
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1484971-1484975,1484977-1484982,1484986-1485411,1485413-1485414,1485416-1485661,1485663-1492948
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1382578-1382612,1382614-1388119,1388121-1388628,1388630-1393867,1393869-1396064,1396066-1396571,1396573-1396615,1396617-1396757,1396759-1396771,1396773-1397047,1397049-1397112,1397114-1397116,1397118-1397175,1397177-1397188,1397190-1397382,1397384-1397699,1397701-1397920,1397922-1398285,1398287-1398307,1398309-1398358,1398360-1398392,1398394-1398398,1398400-1398437,1398439-1398800,1398802-1399210,1399212-1399716,1399718-1400975,1400977-1402570,1402572-1402681,1402683-1407300,1407302-1423031,1423033-1427863,1427865-1450270,1450272-1451699,1451701-1455609,1455611-1455638,1455640-1455979,1455981-1461547,1461549-1465686,1465688-1466198,1466200-1466258,1466260-1466626,1466628-1468530,1468532-1468957,1468959-1480032,1480034-1482988,1482990-1483953,1483955-1492947
  Merged /incubator/accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1201899-1201901
  Merged /accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1486112-1486135,1486203-1488406,1488408-1489580,1489976-1489981,1490337-1493757

Propchange: accumulo/branches/ACCUMULO-118/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Reverse-merged /accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1478775
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1484971-1484975,1484977-1484982,1484986-1485411,1485413-1485414,1485416-1485661,1485663-1492948
  Merged /accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1486112-1486135,1486203-1488406,1488408-1489580,1489976-1489981,1490337-1493757
  Merged /incubator/accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1201899-1201901
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1382578-1382612,1382614-1388119,1388121-1388628,1388630-1393867,1393869-1396064,1396066-1396571,1396573-1396615,1396617-1396757,1396759-1396771,1396773-1397047,1397049-1397112,1397114-1397116,1397118-1397175,1397177-1397188,1397190-1397382,1397384-1397699,1397701-1397920,1397922-1398285,1398287-1398307,1398309-1398358,1398360-1398392,1398394-1398398,1398400-1398437,1398439-1398800,1398802-1399210,1399212-1399716,1399718-1400975,1400977-1402570,1402572-1402681,1402683-1407300,1407302-1423031,1423033-1427863,1427865-1450270,1450272-1451699,1451701-1455609,1455611-1455638,1455640-1455979,1455981-1461547,1461549-1465686,1465688-1466198,1466200-1466258,1466260-1466626,1466628-1468530,1468532-1468957,1468959-1480032,1480034-1482988,1482990-1483953,1483955-1492947

Propchange: accumulo/branches/ACCUMULO-118/minicluster/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 17 20:12:04 2013
@@ -1,5 +1,3 @@
+.*
 target
-.project
-.settings
-.classpath
 accumulo-minicluster.iml

Modified: accumulo/branches/ACCUMULO-118/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/pom.xml?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/pom.xml (original)
+++ accumulo/branches/ACCUMULO-118/pom.xml Mon Jun 17 20:12:04 2013
@@ -82,6 +82,7 @@
     <module>proxy</module>
     <module>test</module>
     <module>minicluster</module>
+    <module>docs</module>
   </modules>
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/accumulo/trunk</connection>
@@ -94,7 +95,7 @@
   </issueManagement>
   <ciManagement>
     <system>Apache Jenkins</system>
-    <url>https://builds.apache.org/view/A-F/view/Accumulo/</url>
+    <url>https://builds.apache.org/view/A-D/view/Accumulo/</url>
   </ciManagement>
   <distributionManagement>
     <site>
@@ -191,7 +192,7 @@
       <dependency>
         <groupId>jline</groupId>
         <artifactId>jline</artifactId>
-        <version>2.10</version>
+        <version>2.11</version>
       </dependency>
       <dependency>
         <groupId>junit</groupId>
@@ -396,24 +397,10 @@
           <configuration>
             <filesets>
               <fileset>
-                <directory>lib</directory>
-                <includes>
-                  <include>*.jar</include>
-                </includes>
-              </fileset>
-              <fileset>
-                <directory>docs/apidocs</directory>
-              </fileset>
-              <fileset>
-                <directory>test</directory>
-                <includes>
-                  <include>**/*.so</include>
-                </includes>
-              </fileset>
-              <fileset>
                 <directory>./</directory>
                 <includes>
                   <include>**/*.pyc</include>
+                  <include>**/*.so</include>
                 </includes>
               </fileset>
             </filesets>
@@ -460,7 +447,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>
-            <arguments>-P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb</arguments>
+            <arguments>-P apache-release,thrift,native,assemble,docs,rpm,deb</arguments>
             <autoVersionSubmodules>true</autoVersionSubmodules>
             <goals>clean compile javadoc:aggregate deploy</goals>
             <preparationGoals>clean compile javadoc:aggregate verify</preparationGoals>
@@ -485,16 +472,7 @@
         <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
-          <configuration>
-            <excludes>
-              <exclude>docs/apidocs/package-list</exclude>
-              <exclude>conf/slaves</exclude>
-              <exclude>conf/masters</exclude>
-              <exclude>conf/gc</exclude>
-              <exclude>conf/tracers</exclude>
-              <exclude>conf/monitor</exclude>
-            </excludes>
-          </configuration>
+          <version>0.9</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
@@ -627,27 +605,6 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-dependencies</id>
-            <goals>
-              <goal>copy-dependencies</goal>
-            </goals>
-            <phase>prepare-package</phase>
-            <configuration>
-              <outputDirectory>../lib</outputDirectory>
-              <!-- just grab the non-provided runtime dependencies -->
-              <stripVersion>true</stripVersion>
-              <includeScope>runtime</includeScope>
-              <excludeTransitive>true</excludeTransitive>
-              <excludeClassifiers>sources,test-sources</excludeClassifiers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>
@@ -698,6 +655,18 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <phase>verify</phase>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
     <extensions>
       <extension>
@@ -871,27 +840,6 @@
       </properties>
     </profile>
     <profile>
-      <!-- Automatically check for licenses.
-           Activate with -P check-licenses -->
-      <id>check-licenses</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.rat</groupId>
-            <artifactId>apache-rat-plugin</artifactId>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>check</goal>
-                </goals>
-                <phase>verify</phase>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
       <!-- Generate cobertura reports with site.
            Activate with -P cobertura -->
       <id>cobertura</id>

Propchange: accumulo/branches/ACCUMULO-118/pom.xml
------------------------------------------------------------------------------
  Reverse-merged /accumulo/trunk/pom.xml:r1478775
  Merged /accumulo/branches/1.5/pom.xml:r1484971-1484975,1484977-1484982,1484986-1485411,1485413-1485414,1485416-1485661,1485663-1492948
  Merged /accumulo/trunk/pom.xml:r1486112-1486135,1486203-1488406,1488408-1489580,1489976-1489981,1490337-1493757

Propchange: accumulo/branches/ACCUMULO-118/proxy/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 17 20:12:04 2013
@@ -1,4 +1,3 @@
-.classpath
-.project
+.*
 target
-.settings
+accumulo-proxy.iml

Propchange: accumulo/branches/ACCUMULO-118/proxy/README
------------------------------------------------------------------------------
  Reverse-merged /accumulo/trunk/proxy/README:r1478775
  Merged /accumulo/branches/1.4/proxy/README:r1382578-1382612,1382614-1388119,1388121-1388628,1388630-1393867,1393869-1396064,1396066-1396571,1396573-1396615,1396617-1396757,1396759-1396771,1396773-1397047,1397049-1397112,1397114-1397116,1397118-1397175,1397177-1397188,1397190-1397382,1397384-1397699,1397701-1397920,1397922-1398285,1398287-1398307,1398309-1398358,1398360-1398392,1398394-1398398,1398400-1398437,1398439-1398513,1398515-1398800,1398802-1399210,1399212-1399716,1399718-1400975,1400977-1402570,1402572-1402681,1402683-1407300,1407302-1423031,1423033-1423628,1423630-1427863,1427865-1450270,1450272-1451699,1451701-1455609,1455611-1455638,1455640-1455979,1455981-1461547,1461549-1465686,1465688-1466198,1466200-1466258,1466260-1466626,1466628-1468530,1468532-1468957,1468959-1480032,1480034-1482988,1482990-1483953,1483955-1492947
  Merged /accumulo/trunk/proxy/README:r1486112-1486135,1486203-1488406,1488408-1489580,1489976-1489981,1490337-1493757
  Merged /incubator/accumulo/branches/1.4/proxy/README:r1201899-1201901
  Merged /accumulo/branches/1.5/proxy/README:r1484971-1484975,1484977-1484982,1484986-1485411,1485413-1485414,1485416-1485661,1485663-1492948

Propchange: accumulo/branches/ACCUMULO-118/server/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun 17 20:12:04 2013
@@ -1,5 +1,3 @@
+.*
 target
-.project
-.settings
-.classpath
 accumulo-server.iml

Propchange: accumulo/branches/ACCUMULO-118/server/
------------------------------------------------------------------------------
  Reverse-merged /accumulo/trunk/server:r1478775
  Merged /incubator/accumulo/branches/1.4/server:r1201899-1201901
  Merged /accumulo/branches/1.4/server:r1382578-1382612,1382614-1388119,1388121-1388628,1388630-1393867,1393869-1396064,1396066-1396571,1396573-1396615,1396617-1396757,1396759-1396771,1396773-1397047,1397049-1397112,1397114-1397116,1397118-1397175,1397177-1397188,1397190-1397382,1397384-1397699,1397701-1397920,1397922-1398285,1398287-1398307,1398309-1398358,1398360-1398392,1398394-1398398,1398400-1398437,1398439-1398513,1398515-1398800,1398802-1399210,1399212-1399716,1399718-1400975,1400977-1402570,1402572-1402681,1402683-1407300,1407302-1423031,1423033-1423628,1423630-1427863,1427865-1438668,1438670-1450270,1450272-1451699,1451701-1455609,1455611-1455638,1455640-1455979,1455981-1461547,1461549-1465686,1465688-1466198,1466200-1466258,1466260-1466626,1466628-1468530,1468532-1468957,1468959-1480032,1480034-1482988,1482990-1483953,1483955-1492947
  Merged /accumulo/branches/1.5/server:r1484971-1484975,1484977-1484982,1484986-1485411,1485413-1485414,1485416-1485661,1485663-1492948
  Merged /accumulo/trunk/server:r1486112-1486135,1486203-1488406,1488408-1489580,1489976-1489981,1490337-1493757

Propchange: accumulo/branches/ACCUMULO-118/server/src/main/c++/nativeMap/
            ('svn:ignore' removed)

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/Accumulo.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/Accumulo.java Mon Jun 17 20:12:04 2013
@@ -105,18 +105,16 @@ public class Accumulo {
     }
     // Turn off messages about not being able to reach the remote logger... we protect against that.
     LogLog.setQuietMode(true);
-
-      // Configure logging
+    
+    // Configure logging
     DOMConfigurator.configureAndWatch(logConfig, 5000);
-
+    
     // Read the auditing config
     String auditConfig = String.format("%s/conf/auditLog.xml", System.getenv("ACCUMULO_HOME"), application);
-
-     DOMConfigurator.configureAndWatch(auditConfig, 5000);
-
-
-
-      log.info(application + " starting");
+    
+    DOMConfigurator.configureAndWatch(auditConfig, 5000);
+    
+    log.info(application + " starting");
     log.info("Instance " + config.getInstance().getInstanceID());
     int dataVersion = Accumulo.getAccumuloPersistentVersion(fs);
     log.info("Data Version " + dataVersion);
@@ -132,11 +130,8 @@ public class Accumulo {
       sortedProps.put(entry.getKey(), entry.getValue());
     
     for (Entry<String,String> entry : sortedProps.entrySet()) {
-      if (entry.getKey().toLowerCase().contains("password") || entry.getKey().toLowerCase().contains("secret")
-          || entry.getKey().startsWith(Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey()))
-        log.info(entry.getKey() + " = <hidden>");
-      else
-        log.info(entry.getKey() + " = " + entry.getValue());
+      String key = entry.getKey();
+      log.info(key + " = " + (Property.isSensitive(key) ? "<hidden>" : entry.getValue()));
     }
     
     monitorSwappiness();

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java Mon Jun 17 20:12:04 2013
@@ -197,19 +197,15 @@ public class ClientServiceHandler implem
     return security.listUsers(credentials);
   }
   
-  static private Map<String,String> conf(TCredentials credentials, AccumuloConfiguration conf) throws TException {
+  private static Map<String,String> conf(TCredentials credentials, AccumuloConfiguration conf) throws TException {
     security.authenticateUser(credentials, credentials);
     conf.invalidateCache();
     
     Map<String,String> result = new HashMap<String,String>();
     for (Entry<String,String> entry : conf) {
-      if (entry.getKey().equals(Property.INSTANCE_SECRET.getKey()))
-        continue;
-      if (entry.getKey().toLowerCase().contains("password"))
-        continue;
-      if (entry.getKey().startsWith(Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey()))
-        continue;
-      result.put(entry.getKey(), entry.getValue());
+      String key = entry.getKey();
+      if (!Property.isSensitive(key))
+        result.put(key, entry.getValue());
     }
     return result;
   }
@@ -293,7 +289,7 @@ public class ClientServiceHandler implem
     security.authenticateUser(credentials, credentials);
     
     String tableId = checkTableId(tableName, null);
-
+    
     ClassLoader loader = getClass().getClassLoader();
     Class shouldMatch;
     try {

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java Mon Jun 17 20:12:04 2013
@@ -53,10 +53,6 @@ public class TableConfiguration extends 
     this.observers = Collections.synchronizedSet(new HashSet<ConfigurationObserver>());
   }
   
-  /**
-   * @deprecated not for client use
-   */
-  @Deprecated
   private static ZooCache getTablePropCache() {
     Instance inst = HdfsZooInstance.getInstance();
     if (tablePropCache == null)
@@ -104,6 +100,7 @@ public class TableConfiguration extends 
       co.propertiesChanged();
   }
   
+  @Override
   public String get(Property property) {
     String key = property.getKey();
     String value = get(key);

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/FileSystemImpl.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/FileSystemImpl.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/FileSystemImpl.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/FileSystemImpl.java Mon Jun 17 20:12:04 2013
@@ -436,8 +436,11 @@ public class FileSystemImpl implements o
         fullPath = path + "/" + fileName;
       FileSystem ns = getFileSystemByPath(fullPath);
       Path exists = new Path(fullPath);
-      if (ns.exists(exists))
+      if (ns.exists(exists)) {
+        Path result = ns.makeQualified(exists);
+        log.debug("Found " + exists + " on " + path + " as " + result);
         return ns.makeQualified(exists);
+      }
     }
     throw new IOException("Could not find file " + fileName + " in " + Arrays.asList(paths));
   }

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java Mon Jun 17 20:12:04 2013
@@ -61,6 +61,7 @@ import org.apache.accumulo.core.gc.thrif
 import org.apache.accumulo.core.gc.thrift.GCStatus;
 import org.apache.accumulo.core.gc.thrift.GcCycleStats;
 import org.apache.accumulo.core.master.state.tables.TableState;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.CredentialHelper;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.security.thrift.TCredentials;
@@ -101,23 +102,23 @@ public class SimpleGarbageCollector impl
   private static final Text EMPTY_TEXT = new Text();
   
   static class Opts extends Help {
-    @Parameter(names={"-v", "--verbose"}, description="extra information will get printed to stdout also")
+    @Parameter(names = {"-v", "--verbose"}, description = "extra information will get printed to stdout also")
     boolean verbose = false;
-    @Parameter(names={"-s", "--safemode"}, description="safe mode will not delete files")
+    @Parameter(names = {"-s", "--safemode"}, description = "safe mode will not delete files")
     boolean safeMode = false;
-    @Parameter(names={"-o", "--offline"}, description=
-      "offline mode will run once and check data files directly; this is dangerous if accumulo is running or not shut down properly")
+    @Parameter(names = {"-o", "--offline"},
+        description = "offline mode will run once and check data files directly; this is dangerous if accumulo is running or not shut down properly")
     boolean offline = false;
-    @Parameter(names={"-a", "--address"}, description="specify our local address")
+    @Parameter(names = {"-a", "--address"}, description = "specify our local address")
     String address = null;
   }
-
+  
   // how much of the JVM's available memory should it use gathering candidates
   private static final float CANDIDATE_MEMORY_PERCENTAGE = 0.75f;
   private boolean candidateMemExceeded;
   
   private static final Logger log = Logger.getLogger(SimpleGarbageCollector.class);
-    
+  
   private TCredentials credentials;
   private long gcStartDelay;
   private boolean checkForBulkProcessingFiles;
@@ -177,7 +178,7 @@ public class SimpleGarbageCollector impl
   public void useAddress(String address) {
     this.address = address;
   }
-
+  
   public void init(FileSystem fs, Instance instance, TCredentials credentials, boolean noTrash) throws IOException {
     this.fs = fs;
     this.credentials = credentials;
@@ -382,6 +383,7 @@ public class SimpleGarbageCollector impl
     String path = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZGC_LOCK;
     
     LockWatcher lockWatcher = new LockWatcher() {
+      @Override
       public void lostLock(LockLossReason reason) {
         Halt.halt("GC lock in zookeeper lost (reason = " + reason + "), exiting!");
       }
@@ -447,7 +449,7 @@ public class SimpleGarbageCollector impl
       }
       return candidates;
     }
-
+    
     checkForBulkProcessingFiles = false;
     Range range = Constants.METADATA_DELETES_FOR_METADATA_KEYSPACE;
     candidates.addAll(getBatch(Constants.METADATA_DELETE_FLAG_FOR_METADATA_PREFIX, range));
@@ -458,9 +460,9 @@ public class SimpleGarbageCollector impl
     candidates.addAll(getBatch(Constants.METADATA_DELETE_FLAG_PREFIX, range));
     return candidates;
   }
-
+  
   private Collection<String> getBatch(String prefix, Range range) throws Exception {
-    // want to ensure GC makes progress... if the 1st N deletes are stable and we keep processing them, 
+    // want to ensure GC makes progress... if the 1st N deletes are stable and we keep processing them,
     // then will never inspect deletes after N
     if (continueKey != null) {
       if (!range.contains(continueKey)) {
@@ -471,7 +473,8 @@ public class SimpleGarbageCollector impl
       continueKey = null;
     }
     
-    Scanner scanner = instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials)).createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials)).createScanner(
+        Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     scanner.setRange(range);
     List<String> result = new ArrayList<String>();
     // find candidates for deletion; chop off the prefix
@@ -512,7 +515,8 @@ public class SimpleGarbageCollector impl
 //      }
     } else {
       try {
-        scanner = new IsolatedScanner(instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials)).createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
+        scanner = new IsolatedScanner(instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials)).createScanner(
+            Constants.METADATA_TABLE_NAME, Authorizations.EMPTY));
       } catch (AccumuloSecurityException ex) {
         throw new AccumuloException(ex);
       } catch (TableNotFoundException ex) {
@@ -556,7 +560,7 @@ public class SimpleGarbageCollector impl
     scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
     scanner.fetchColumnFamily(Constants.METADATA_SCANFILE_COLUMN_FAMILY);
     Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
-    
+    log.debug("Candidates: " + candidates);
     TabletIterator tabletIterator = new TabletIterator(scanner, Constants.METADATA_KEYSPACE, false, true);
     
     while (tabletIterator.hasNext()) {
@@ -567,16 +571,19 @@ public class SimpleGarbageCollector impl
             || entry.getKey().getColumnFamily().equals(Constants.METADATA_SCANFILE_COLUMN_FAMILY)) {
           
           String cf = entry.getKey().getColumnQualifier().toString();
-          String delete;
-          if (cf.startsWith("../")) {
-            delete = cf.substring(2);
-          } else {
-            String table = new String(KeyExtent.tableOfMetadataRow(entry.getKey().getRow()));
-            if (cf.startsWith("/"))
-              delete = "/" + table + cf;
-            else
-              delete = "/" + table + "/" + cf;
+          String delete = cf;
+          if (!cf.contains(":")) {
+            if (cf.startsWith("../")) {
+              delete = cf.substring(2);
+            } else {
+              String table = new String(KeyExtent.tableOfMetadataRow(entry.getKey().getRow()));
+              if (cf.startsWith("/"))
+                delete = "/" + table + cf;
+              else
+                delete = "/" + table + "/" + cf;
+            }
           }
+          log.debug("entry: " + delete);
           // WARNING: This line is EXTREMELY IMPORTANT.
           // You MUST REMOVE candidates that are still in use
           if (candidates.remove(delete))
@@ -595,8 +602,9 @@ public class SimpleGarbageCollector impl
       }
     }
   }
-
+  
   final static String METADATA_TABLE_DIR = "/" + Constants.METADATA_TABLE_ID;
+  
   private static void putMarkerDeleteMutation(final String delete, final BatchWriter writer, final BatchWriter rootWriter) throws MutationsRejectedException {
     if (delete.startsWith(METADATA_TABLE_DIR)) {
       Mutation m = new Mutation(new Text(Constants.METADATA_DELETE_FLAG_FOR_METADATA_PREFIX + delete));
@@ -608,7 +616,7 @@ public class SimpleGarbageCollector impl
       writer.addMutation(m);
     }
   }
-
+  
   /**
    * This method attempts to do its best to remove files from the filesystem that have been confirmed for deletion.
    */
@@ -624,7 +632,7 @@ public class SimpleGarbageCollector impl
         writer = c.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
         rootWriter = c.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
       } catch (Exception e) {
-        log.error("Unable to create writer to remove file from the !METADATA table", e);
+        log.error("Unable to create writer to remove file from the " + Constants.METADATA_TABLE_NAME + " table", e);
       }
     }
     // when deleting a dir and all files in that dir, only need to delete the dir
@@ -666,8 +674,9 @@ public class SimpleGarbageCollector impl
           
           try {
             Path fullPath;
+
             if (delete.contains(":"))
-              fullPath = new Path(delete.split("/", 3)[2]);
+              fullPath = new Path(delete);
             else
               fullPath = fs.getFullPath(ServerConstants.getTablesDirs(), delete);
             log.debug("Deleting " + fullPath);
@@ -695,8 +704,8 @@ public class SimpleGarbageCollector impl
               }
               String parts[] = delete.split("/");
               if (parts.length > 2) {
-                String tableId = parts[1];
-                String tabletDir = parts[2];
+                String tableId = parts[parts.length - 3];
+                String tabletDir = parts[parts.length - 2];
                 TableManager.getInstance().updateTableStateCache(tableId);
                 TableState tableState = TableManager.getInstance().getTableState(tableId);
                 if (tableState != null && tableState != TableState.DELETING) {
@@ -719,7 +728,7 @@ public class SimpleGarbageCollector impl
           }
           
         }
-
+        
       };
       
       deleteThreadPool.execute(deleteTask);

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/Master.java Mon Jun 17 20:12:04 2013
@@ -78,6 +78,7 @@ import org.apache.accumulo.core.master.t
 import org.apache.accumulo.core.master.thrift.TabletLoadState;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.master.thrift.TabletSplit;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
@@ -277,7 +278,7 @@ public class Master implements LiveTServ
         
         zoo.recursiveDelete(ZooUtil.getRoot(instance) + "/loggers", NodeMissingPolicy.SKIP);
         zoo.recursiveDelete(ZooUtil.getRoot(instance) + "/dead/loggers", NodeMissingPolicy.SKIP);
-
+        
         zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZRECOVERY, new byte[] {'0'}, NodeExistsPolicy.SKIP);
         
         for (String id : Tables.getIdToNameMap(instance).keySet()) {
@@ -541,7 +542,7 @@ public class Master implements LiveTServ
         
         try {
           Connector conn = getConnector();
-          Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
+          Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY));
           Constants.METADATA_FLUSH_COLUMN.fetch(scanner);
           Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
           scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
@@ -605,9 +606,9 @@ public class Master implements LiveTServ
             throw new ThriftTableOperationException(tableId, null, TableOperation.FLUSH, TableOperationExceptionType.NOTFOUND, null);
           
         } catch (AccumuloException e) {
-          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, e);
+          log.debug("Failed to scan " + Constants.METADATA_TABLE_NAME + " table to wait for flush " + tableId, e);
         } catch (TabletDeletedException tde) {
-          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, tde);
+          log.debug("Failed to scan " + Constants.METADATA_TABLE_NAME + " table to wait for flush " + tableId, tde);
         } catch (AccumuloSecurityException e) {
           log.warn(e.getMessage(), e);
           throw new ThriftSecurityException();
@@ -666,7 +667,7 @@ public class Master implements LiveTServ
           throw new Exception("Invalid table property.");
         }
       } catch (KeeperException.NoNodeException e) {
-        // race condition... table no longer exists?  This call will throw an exception if the table was deleted:
+        // race condition... table no longer exists? This call will throw an exception if the table was deleted:
         checkTableId(tableName, op);
         log.info("Error altering table property", e);
         throw new ThriftTableOperationException(tableId, tableName, op, TableOperationExceptionType.OTHER, "Problem altering table property");
@@ -1565,7 +1566,7 @@ public class Master implements LiveTServ
         log.debug("Making file deletion entries for " + range);
         Range deleteRange = new Range(KeyExtent.getMetadataEntry(range.getTableId(), start), false, KeyExtent.getMetadataEntry(range.getTableId(),
             range.getEndRow()), true);
-        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
         scanner.setRange(deleteRange);
         Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
         Constants.METADATA_TIME_COLUMN.fetch(scanner);
@@ -1644,7 +1645,7 @@ public class Master implements LiveTServ
         Connector conn = getConnector();
         // Make file entries in highest tablet
         bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
-        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
         scanner.setRange(scanRange);
         Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
         Constants.METADATA_TIME_COLUMN.fetch(scanner);
@@ -1671,7 +1672,7 @@ public class Master implements LiveTServ
         
         // read the logical time from the last tablet in the merge range, it is not included in
         // the loop above
-        scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+        scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
         Range last = new Range(stopRow);
         if (range.isMeta())
           last = last.clip(Constants.METADATA_ROOT_TABLET_KEYSPACE);
@@ -1732,7 +1733,7 @@ public class Master implements LiveTServ
       // group all deletes into tablet into one mutation, this makes tablets
       // either disappear entirely or not all.. this is important for the case
       // where the process terminates in the loop below...
-      scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+      scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
       log.debug("Deleting range " + scanRange);
       scanner.setRange(scanRange);
       RowIterator rowIter = new RowIterator(scanner);
@@ -1758,7 +1759,7 @@ public class Master implements LiveTServ
     private KeyExtent getHighTablet(KeyExtent range) throws AccumuloException {
       try {
         Connector conn = getConnector();
-        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+        Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
         Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
         KeyExtent start = new KeyExtent(range.getTableId(), range.getEndRow(), null);
         scanner.setRange(new Range(start.getMetadataEntry(), null));
@@ -1843,7 +1844,7 @@ public class Master implements LiveTServ
     // remove any migrating tablets that no longer exist.
     private void cleanupMutations() throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
       Connector connector = getConnector();
-      Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+      Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
       Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
       Set<KeyExtent> found = new HashSet<KeyExtent>();
       for (Entry<Key,Value> entry : scanner) {
@@ -2098,11 +2099,8 @@ public class Master implements LiveTServ
     });
     
     TCredentials systemAuths = SecurityConstants.getSystemCredentials();
-    final TabletStateStore stores[] = {
-        new ZooTabletStateStore(new ZooStore(zroot)), 
-        new RootTabletStateStore(instance, systemAuths, this),
-        new MetaDataStateStore(instance, systemAuths, this)
-    };
+    final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, this),
+        new MetaDataStateStore(instance, systemAuths, this)};
     watchers.add(new TabletGroupWatcher(stores[2], null));
     watchers.add(new TabletGroupWatcher(stores[1], watchers.get(0)));
     watchers.add(new TabletGroupWatcher(stores[0], watchers.get(1)));
@@ -2167,7 +2165,7 @@ public class Master implements LiveTServ
       if (acquiredLock || failedToAcquireLock) {
         Halt.halt("Zoolock in unexpected state AL " + acquiredLock + " " + failedToAcquireLock, -1);
       }
-
+      
       acquiredLock = true;
       notifyAll();
     }
@@ -2179,7 +2177,7 @@ public class Master implements LiveTServ
       if (acquiredLock) {
         Halt.halt("Zoolock in unexpected state FAL " + acquiredLock + " " + failedToAcquireLock, -1);
       }
-
+      
       failedToAcquireLock = true;
       notifyAll();
     }
@@ -2192,10 +2190,10 @@ public class Master implements LiveTServ
       }
     }
   }
-
+  
   private void getMasterLock(final String zMasterLoc) throws KeeperException, InterruptedException {
     log.info("trying to get master lock");
-
+    
     final String masterClientAddress = org.apache.accumulo.core.util.AddressUtil.toString(new InetSocketAddress(hostname, getSystemConfiguration().getPort(
         Property.MASTER_CLIENTPORT)));
     
@@ -2204,7 +2202,7 @@ public class Master implements LiveTServ
       MasterLockWatcher masterLockWatcher = new MasterLockWatcher();
       masterLock = new ZooLock(zMasterLoc);
       masterLock.lockAsync(masterLockWatcher, masterClientAddress.getBytes());
-
+      
       masterLockWatcher.waitForChange();
       
       if (masterLockWatcher.acquiredLock) {
@@ -2214,12 +2212,12 @@ public class Master implements LiveTServ
       if (!masterLockWatcher.failedToAcquireLock) {
         throw new IllegalStateException("master lock in unknown state");
       }
-
+      
       masterLock.tryToCancelAsyncLockOrUnlock();
-
+      
       UtilWaitThread.sleep(TIME_TO_WAIT_BETWEEN_LOCK_CHECKS);
     }
-
+    
     setMasterState(MasterState.HAVE_LOCK);
   }
   
@@ -2287,7 +2285,7 @@ public class Master implements LiveTServ
     }
     nextEvent.event("There are now %d tablet servers", current.size());
   }
-
+  
   private static void cleanListByHostAndPort(Collection<TServerInstance> badServers, Set<TServerInstance> deleted, Set<TServerInstance> added) {
     Iterator<TServerInstance> badIter = badServers.iterator();
     while (badIter.hasNext()) {
@@ -2306,7 +2304,6 @@ public class Master implements LiveTServ
       }
     }
   }
-
   
   @Override
   public void stateChanged(String tableId, TableState state) {

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java Mon Jun 17 20:12:04 2013
@@ -25,6 +25,7 @@ import java.util.Random;
 import java.util.Set;
 import java.util.SortedMap;
 
+import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TableInfo;
@@ -42,9 +43,6 @@ import org.apache.thrift.TException;
 public class ChaoticLoadBalancer extends TabletBalancer {
   Random r = new Random();
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.master.balancer.TabletBalancer#getAssignments(java.util.SortedMap, java.util.Map, java.util.Map)
-   */
   @Override
   public void getAssignments(SortedMap<TServerInstance,TabletServerStatus> current, Map<KeyExtent,TServerInstance> unassigned,
       Map<KeyExtent,TServerInstance> assignments) {
@@ -62,9 +60,8 @@ public class ChaoticLoadBalancer extends
         toAssign.put(e.getKey(), avg - numTablets);
       }
     }
-
-    for (KeyExtent ke : unassigned.keySet())
-    {
+    
+    for (KeyExtent ke : unassigned.keySet()) {
       int index = r.nextInt(tServerArray.size());
       TServerInstance dest = tServerArray.get(index);
       assignments.put(ke, dest);
@@ -85,10 +82,10 @@ public class ChaoticLoadBalancer extends
   public long balance(SortedMap<TServerInstance,TabletServerStatus> current, Set<KeyExtent> migrations, List<TabletMigration> migrationsOut) {
     Map<TServerInstance,Long> numTablets = new HashMap<TServerInstance,Long>();
     List<TServerInstance> underCapacityTServer = new ArrayList<TServerInstance>();
-
+    
     if (!migrations.isEmpty())
       return 100;
-
+    
     boolean moveMetadata = r.nextInt(4) == 0;
     long totalTablets = 0;
     for (Entry<TServerInstance,TabletServerStatus> e : current.entrySet()) {
@@ -104,11 +101,9 @@ public class ChaoticLoadBalancer extends
     // *1.2 to handle fuzziness, and prevent locking for 'perfect' balancing scenarios
     long avg = (long) Math.ceil(((double) totalTablets) / current.size() * 1.2);
     
-    for (Entry<TServerInstance, TabletServerStatus> e : current.entrySet())
-    {
-      for (String table : e.getValue().getTableMap().keySet())
-      {
-        if (!moveMetadata && "!METADATA".equals(table))
+    for (Entry<TServerInstance,TabletServerStatus> e : current.entrySet()) {
+      for (String table : e.getValue().getTableMap().keySet()) {
+        if (!moveMetadata && Constants.METADATA_TABLE_NAME.equals(table))
           continue;
         try {
           for (TabletStats ts : getOnlineTabletsForTable(e.getKey(), table)) {
@@ -140,13 +135,7 @@ public class ChaoticLoadBalancer extends
     return 100;
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.master.balancer.TabletBalancer#init(org.apache.accumulo.server.conf.ServerConfiguration)
-   */
   @Override
-  public void init(ServerConfiguration conf) {
-  }
+  public void init(ServerConfiguration conf) {}
   
 }

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java Mon Jun 17 20:12:04 2013
@@ -21,8 +21,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -31,7 +29,10 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.server.cli.ClientOpts;
+import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.Text;
@@ -62,7 +63,7 @@ public class MergeStats {
   public MergeInfo getMergeInfo() {
     return info;
   }
-
+  
   public void update(KeyExtent ke, TabletState state, boolean chopped, boolean hasWALs) {
     if (ke.isRootTablet())
       return;
@@ -170,7 +171,7 @@ public class MergeStats {
   
   private boolean verifyMergeConsistency(Connector connector, CurrentState master) throws TableNotFoundException, IOException {
     MergeStats verify = new MergeStats(info);
-    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     MetaDataTableScanner.configureScanner(scanner, master);
     KeyExtent extent = info.getRange();
     Text start = extent.getPrevEndRow();
@@ -186,7 +187,7 @@ public class MergeStats {
     }
     scanner.setRange(range);
     KeyExtent prevExtent = null;
-
+    
     log.debug("Scanning range " + range);
     for (Entry<Key,Value> entry : scanner) {
       TabletLocationState tls;
@@ -200,12 +201,12 @@ public class MergeStats {
       if (!tls.extent.getTableId().equals(tableId)) {
         break;
       }
-
+      
       if (!tls.walogs.isEmpty() && verify.getMergeInfo().needsToBeChopped(tls.extent)) {
         log.debug("failing consistency: needs to be chopped" + tls.extent);
         return false;
       }
-
+      
       if (prevExtent == null) {
         // this is the first tablet observed, it must be offline and its prev row must be less than the start of the merge range
         if (tls.extent.getPrevEndRow() != null && tls.extent.getPrevEndRow().compareTo(start) > 0) {
@@ -219,21 +220,20 @@ public class MergeStats {
         }
         
       } else if (!tls.extent.isPreviousExtent(prevExtent)) {
-        log.debug("hole in !METADATA");
+        log.debug("hole in " + Constants.METADATA_TABLE_NAME);
         return false;
       }
       
       prevExtent = tls.extent;
-
+      
       verify.update(tls.extent, tls.getState(master.onlineTabletServers()), tls.chopped, !tls.walogs.isEmpty());
       // stop when we've seen the tablet just beyond our range
       if (tls.extent.getPrevEndRow() != null && extent.getEndRow() != null && tls.extent.getPrevEndRow().compareTo(extent.getEndRow()) > 0) {
         break;
       }
     }
-    log.debug("chopped " + chopped + " v.chopped " + verify.chopped + 
-        " unassigned " + unassigned + " v.unassigned " + verify.unassigned +
-        " verify.total " + verify.total);
+    log.debug("chopped " + chopped + " v.chopped " + verify.chopped + " unassigned " + unassigned + " v.unassigned " + verify.unassigned + " verify.total "
+        + verify.total);
     return chopped == verify.chopped && unassigned == verify.unassigned && unassigned == verify.total;
   }
   

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java Mon Jun 17 20:12:04 2013
@@ -37,6 +37,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.WholeRowIterator;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.CredentialHelper;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
@@ -53,7 +54,7 @@ public class MetaDataTableScanner implem
     // scan over metadata table, looking for tablets in the wrong state based on the live servers and online tables
     try {
       Connector connector = instance.getConnector(auths.getPrincipal(), CredentialHelper.extractToken(auths));
-      mdScanner = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 8);
+      mdScanner = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY, 8);
       configureScanner(mdScanner, state);
       mdScanner.setRanges(Collections.singletonList(range));
       iter = mdScanner.iterator();
@@ -62,7 +63,7 @@ public class MetaDataTableScanner implem
       throw new RuntimeException(ex);
     }
   }
-
+  
   static public void configureScanner(ScannerBase scanner, CurrentState state) {
     Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
     scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
@@ -90,6 +91,7 @@ public class MetaDataTableScanner implem
     }
   }
   
+  @Override
   public void finalize() {
     close();
   }
@@ -114,7 +116,7 @@ public class MetaDataTableScanner implem
       log.error(ex, ex);
       mdScanner.close();
       return null;
-    } 
+    }
   }
   
   public static TabletLocationState createTabletLocationState(Key k, Value v) throws IOException, BadLocationStateException {
@@ -174,7 +176,7 @@ public class MetaDataTableScanner implem
       throw new RuntimeException(ex);
     } catch (BadLocationStateException ex) {
       throw new RuntimeException(ex);
-    } 
+    }
   }
   
   @Override

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java Mon Jun 17 20:12:04 2013
@@ -54,6 +54,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.file.FileOperations;
 import org.apache.accumulo.core.master.state.tables.TableState;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.SimpleThreadPool;
 import org.apache.accumulo.core.util.UtilWaitThread;
@@ -81,7 +82,6 @@ import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 
-
 /*
  * Bulk import makes requests of tablet servers, and those requests can take a
  * long time. Our communications to the tablet server may fail, so we won't know
@@ -104,7 +104,7 @@ import org.apache.thrift.TException;
 
 public class BulkImport extends MasterRepo {
   public static final String FAILURES_TXT = "failures.txt";
-
+  
   private static final long serialVersionUID = 1L;
   
   private static final Logger log = Logger.getLogger(BulkImport.class);
@@ -147,7 +147,7 @@ public class BulkImport extends MasterRe
     
     // check that the error directory exists and is empty
     FileSystem fs = master.getFileSystem();
-
+    
     Path errorPath = new Path(errorDir);
     FileStatus errorStatus = null;
     try {
@@ -349,7 +349,7 @@ class CompleteBulkImport extends MasterR
 class CopyFailed extends MasterRepo {
   
   private static final long serialVersionUID = 1L;
-
+  
   private String tableId;
   private String source;
   private String bulk;
@@ -382,10 +382,10 @@ class CopyFailed extends MasterRepo {
   
   @Override
   public Repo<Master> call(long tid, Master master) throws Exception {
-	//This needs to execute after the arbiter is stopped  
-	  
+    // This needs to execute after the arbiter is stopped
+    
     FileSystem fs = master.getFileSystem();
-	  
+    
     if (!fs.exists(new Path(error, BulkImport.FAILURES_TXT)))
       return new CleanUpBulkImport(tableId, source, bulk, error);
     
@@ -409,10 +409,10 @@ class CopyFailed extends MasterRepo {
      * I thought I could move files that have no file references in the table. However its possible a clone references a file. Therefore only move files that
      * have no loaded markers.
      */
-
+    
     // determine which failed files were loaded
     Connector conn = master.getConnector();
-    Scanner mscanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
+    Scanner mscanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY));
     mscanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
     mscanner.fetchColumnFamily(Constants.METADATA_BULKFILE_COLUMN_FAMILY);
     
@@ -454,7 +454,7 @@ class CopyFailed extends MasterRepo {
       
       bifCopyQueue.waitUntilDone(workIds);
     }
-
+    
     fs.deleteRecursively(new Path(error, BulkImport.FAILURES_TXT));
     return new CleanUpBulkImport(tableId, source, bulk, error);
   }
@@ -467,7 +467,7 @@ class LoadFiles extends MasterRepo {
   
   private static ExecutorService threadPool = null;
   static {
-
+    
   }
   private static final Logger log = Logger.getLogger(BulkImport.class);
   
@@ -500,7 +500,7 @@ class LoadFiles extends MasterRepo {
       threadPool = new TraceExecutorService(pool);
     }
   }
-
+  
   @Override
   public Repo<Master> call(final long tid, final Master master) throws Exception {
     initializeThreadPool(master);
@@ -511,7 +511,7 @@ class LoadFiles extends MasterRepo {
       files.add(entry);
     }
     log.debug("tid " + tid + " importing " + files.size() + " files");
-
+    
     Path writable = new Path(this.errorDir, ".iswritable");
     if (!fs.createNewFile(writable)) {
       // Maybe this is a re-try... clear the flag and try again
@@ -591,7 +591,7 @@ class LoadFiles extends MasterRepo {
     } finally {
       out.close();
     }
-
+    
     // return the next step, which will perform cleanup
     return new CompleteBulkImport(tableId, source, bulk, errorDir);
   }
@@ -615,5 +615,5 @@ class LoadFiles extends MasterRepo {
     result.append("]");
     return result.toString();
   }
-
+  
 }

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java Mon Jun 17 20:12:04 2013
@@ -41,6 +41,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.master.state.tables.TableState;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
@@ -87,10 +88,10 @@ class CompactionDriver extends MasterRep
       // compaction was canceled
       throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.OTHER, "Compaction canceled");
     }
-
+    
     MapCounter<TServerInstance> serversToFlush = new MapCounter<TServerInstance>();
     Connector conn = master.getConnector();
-    Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
+    Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY));
     
     Range range = new KeyExtent(new Text(tableId), null, startRow == null ? null : new Text(startRow)).toMetadataRange();
     
@@ -189,7 +190,6 @@ class CompactionDriver extends MasterRep
   
 }
 
-
 public class CompactRange extends MasterRepo {
   
   private static final long serialVersionUID = 1L;
@@ -214,7 +214,7 @@ public class CompactRange extends Master
       endRow = null;
       iterators = Collections.emptyList();
     }
-
+    
     @Override
     public void write(DataOutput out) throws IOException {
       out.writeBoolean(startRow != null);
@@ -275,7 +275,7 @@ public class CompactRange extends Master
       return iterators;
     }
   }
-
+  
   public CompactRange(String tableId, byte[] startRow, byte[] endRow, List<IteratorSetting> iterators) throws ThriftTableOperationException {
     this.tableId = tableId;
     this.startRow = startRow.length == 0 ? null : startRow;
@@ -286,7 +286,7 @@ public class CompactRange extends Master
     } else {
       iterators = null;
     }
-
+    
     if (this.startRow != null && this.endRow != null && new Text(startRow).compareTo(new Text(endRow)) >= 0)
       throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.BAD_RANGE,
           "start row must be less than end row");
@@ -317,13 +317,13 @@ public class CompactRange extends Master
           for (int i = 1; i < tokens.length; i++) {
             if (tokens[i].startsWith(txidString))
               continue; // skip self
-
+              
             throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.OTHER,
                 "Another compaction with iterators is running");
           }
-
+          
           StringBuilder encodedIterators = new StringBuilder();
-
+          
           if (iterators != null) {
             Hex hex = new Hex();
             encodedIterators.append(",");
@@ -354,7 +354,7 @@ public class CompactRange extends Master
         String cvs = new String(currentValue);
         String[] tokens = cvs.split(",");
         long flushID = Long.parseLong(new String(tokens[0]));
-
+        
         String txidString = String.format("%016x", txid);
         
         StringBuilder encodedIterators = new StringBuilder();
@@ -368,9 +368,9 @@ public class CompactRange extends Master
         return ("" + flushID + encodedIterators).getBytes();
       }
     });
-
+    
   }
-
+  
   @Override
   public void undo(long tid, Master environment) throws Exception {
     try {

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java Mon Jun 17 20:12:04 2013
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.data.Ran
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.GrepIterator;
 import org.apache.accumulo.core.master.state.tables.TableState;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.fs.FileSystem;
@@ -87,7 +88,7 @@ class CleanUp extends MasterRepo {
     
     boolean done = true;
     Range tableRange = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
-    Scanner scanner = master.getConnector().createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = master.getConnector().createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     MetaDataTableScanner.configureScanner(scanner, master);
     scanner.setRange(tableRange);
     
@@ -108,7 +109,7 @@ class CleanUp extends MasterRepo {
         break;
       }
     }
-
+    
     if (!done)
       return 50;
     
@@ -125,7 +126,7 @@ class CleanUp extends MasterRepo {
     try {
       // look for other tables that references this tables files
       Connector conn = master.getConnector();
-      BatchScanner bs = conn.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 8);
+      BatchScanner bs = conn.createBatchScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY, 8);
       try {
         bs.setRanges(Collections.singleton(Constants.NON_ROOT_METADATA_KEYSPACE));
         bs.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
@@ -144,7 +145,7 @@ class CleanUp extends MasterRepo {
       
     } catch (Exception e) {
       refCount = -1;
-      log.error("Failed to scan !METADATA looking for references to deleted table " + tableId, e);
+      log.error("Failed to scan " + Constants.METADATA_TABLE_NAME + " looking for references to deleted table " + tableId, e);
     }
     
     // remove metadata table entries

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java Mon Jun 17 20:12:04 2013
@@ -45,6 +45,7 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.master.state.tables.TableState;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
@@ -93,7 +94,7 @@ class WriteExportFiles extends MasterRep
     
     checkOffline(conn);
     
-    Scanner metaScanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner metaScanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     metaScanner.setRange(new KeyExtent(new Text(tableInfo.tableID), null, null).toMetadataRange());
     
     // scan for locations
@@ -207,7 +208,7 @@ class WriteExportFiles extends MasterRep
     
     Map<String,String> uniqueFiles = new HashMap<String,String>();
     
-    Scanner metaScanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner metaScanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     metaScanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
     Constants.METADATA_PREV_ROW_COLUMN.fetch(metaScanner);
     Constants.METADATA_TIME_COLUMN.fetch(metaScanner);

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java Mon Jun 17 20:12:04 2013
@@ -29,6 +29,7 @@ import org.apache.accumulo.core.client.i
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.server.fs.FileRef;
@@ -61,7 +62,7 @@ class MakeDeleteEntries extends MasterRe
   public Repo<Master> call(long tid, Master master) throws Exception {
     log.info("creating delete entries for merged metadata tablets");
     Connector conn = master.getConnector();
-    Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     scanner.setRange(Constants.METADATA_ROOT_TABLET_KEYSPACE);
     scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
     BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/master/tableOps/TraceRepo.java Mon Jun 17 20:12:04 2013
@@ -16,12 +16,11 @@
  */
 package org.apache.accumulo.server.master.tableOps;
 
+import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.trace.instrument.Span;
 import org.apache.accumulo.trace.instrument.Trace;
 import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.trace.thrift.TInfo;
-import org.apache.accumulo.fate.Repo;
-
 
 /**
  * 
@@ -29,7 +28,7 @@ import org.apache.accumulo.fate.Repo;
 public class TraceRepo<T> implements Repo<T> {
   
   private static final long serialVersionUID = 1L;
-
+  
   TInfo tinfo;
   Repo<T> repo;
   
@@ -38,11 +37,6 @@ public class TraceRepo<T> implements Rep
     tinfo = Tracer.traceInfo();
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.fate.Repo#isReady(long, java.lang.Object)
-   */
   @Override
   public long isReady(long tid, T environment) throws Exception {
     Span span = Trace.trace(tinfo, repo.getDescription());
@@ -53,11 +47,6 @@ public class TraceRepo<T> implements Rep
     }
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.fate.Repo#call(long, java.lang.Object)
-   */
   @Override
   public Repo<T> call(long tid, T environment) throws Exception {
     Span span = Trace.trace(tinfo, repo.getDescription());
@@ -71,11 +60,6 @@ public class TraceRepo<T> implements Rep
     }
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.fate.Repo#undo(long, java.lang.Object)
-   */
   @Override
   public void undo(long tid, T environment) throws Exception {
     Span span = Trace.trace(tinfo, repo.getDescription());
@@ -86,24 +70,14 @@ public class TraceRepo<T> implements Rep
     }
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.fate.Repo#getDescription()
-   */
   @Override
   public String getDescription() {
     return repo.getDescription();
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.accumulo.server.fate.Repo#getReturn()
-   */
   @Override
   public String getReturn() {
     return repo.getReturn();
   }
-
+  
 }

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java Mon Jun 17 20:12:04 2013
@@ -39,6 +39,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.iterators.SortedKeyIterator;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.LoggingRunnable;
 import org.apache.accumulo.core.util.NamingThreadFactory;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
@@ -153,7 +154,7 @@ public class ProblemReports implements I
     }
     
     Connector connector = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemPrincipal(), SecurityConstants.getSystemToken());
-    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
     scanner.addScanIterator(new IteratorSetting(1, "keys-only", SortedKeyIterator.class));
     
     if (table == null) {
@@ -208,7 +209,7 @@ public class ProblemReports implements I
             try {
               if ((table == null || !table.equals(Constants.METADATA_TABLE_ID)) && iter1Count == 0) {
                 Connector connector = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemPrincipal(), SecurityConstants.getSystemToken());
-                Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
+                Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
                 
                 scanner.setTimeout(3, TimeUnit.SECONDS);
                 

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java Mon Jun 17 20:12:04 2013
@@ -105,6 +105,7 @@ public class SecurityOperation {
    * 
    * @deprecated not for client use
    */
+  @Deprecated
   public SecurityOperation(String instanceId) {
     ZKUserPath = Constants.ZROOT + "/" + instanceId + "/users";
     zooCache = new ZooCache();
@@ -209,7 +210,7 @@ public class SecurityOperation {
     
     // system user doesn't need record-level authorizations for the tables it reads (for now)
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
-      return Constants.NO_AUTHS;
+      return Authorizations.EMPTY;
     
     try {
       return authorizor.getCachedUserAuthorizations(user);
@@ -293,11 +294,13 @@ public class SecurityOperation {
     return hasTablePermission(credentials.getPrincipal(), table, TablePermission.READ, true);
   }
   
-  public boolean canScan(TCredentials credentials, String table, TRange range, List<TColumn> columns, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
+  public boolean canScan(TCredentials credentials, String table, TRange range, List<TColumn> columns, List<IterInfo> ssiList,
+      Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations) throws ThriftSecurityException {
     return canScan(credentials, table);
   }
   
-  public boolean canScan(TCredentials credentials, String table, 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, 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);
   }
   

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/InsecurePermHandler.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/InsecurePermHandler.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/InsecurePermHandler.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/InsecurePermHandler.java Mon Jun 17 20:12:04 2013
@@ -27,120 +27,77 @@ import org.apache.accumulo.core.security
  */
 public class InsecurePermHandler implements PermissionHandler {
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#initialize(java.lang.String)
-   */
   @Override
   public void initialize(String instanceId, boolean initialize) {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#validSecurityHandlers(org.apache.accumulo.server.security.handler.Authenticator, org.apache.accumulo.server.security.handler.Authorizor)
-   */
   @Override
   public boolean validSecurityHandlers(Authenticator authent, Authorizor author) {
     return true;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#initializeSecurity(java.lang.String)
-   */
   @Override
   public void initializeSecurity(TCredentials token, String rootuser) throws AccumuloSecurityException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#hasSystemPermission(java.lang.String, org.apache.accumulo.core.security.SystemPermission)
-   */
   @Override
   public boolean hasSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException {
     return true;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#hasCachedSystemPermission(java.lang.String, org.apache.accumulo.core.security.SystemPermission)
-   */
   @Override
   public boolean hasCachedSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException {
     return true;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#hasTablePermission(java.lang.String, java.lang.String, org.apache.accumulo.core.security.TablePermission)
-   */
   @Override
   public boolean hasTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException {
     return true;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#hasCachedTablePermission(java.lang.String, java.lang.String, org.apache.accumulo.core.security.TablePermission)
-   */
   @Override
   public boolean hasCachedTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException {
     return true;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#grantSystemPermission(java.lang.String, org.apache.accumulo.core.security.SystemPermission)
-   */
   @Override
   public void grantSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#revokeSystemPermission(java.lang.String, org.apache.accumulo.core.security.SystemPermission)
-   */
   @Override
   public void revokeSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#grantTablePermission(java.lang.String, java.lang.String, org.apache.accumulo.core.security.TablePermission)
-   */
   @Override
   public void grantTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#revokeTablePermission(java.lang.String, java.lang.String, org.apache.accumulo.core.security.TablePermission)
-   */
   @Override
   public void revokeTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#cleanTablePermissions(java.lang.String)
-   */
   @Override
   public void cleanTablePermissions(String table) throws AccumuloSecurityException, TableNotFoundException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#initUser(java.lang.String)
-   */
   @Override
   public void initUser(String user) throws AccumuloSecurityException {
     return;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.security.handler.PermissionHandler#dropUser(java.lang.String)
-   */
   @Override
   public void cleanUser(String user) throws AccumuloSecurityException {
     return;
   }
-
+  
   @Override
-  public void initTable(String table) throws AccumuloSecurityException {
-  }
+  public void initTable(String table) throws AccumuloSecurityException {}
   
 }

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java?rev=1493916&r1=1493915&r2=1493916&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java (original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java Mon Jun 17 20:12:04 2013
@@ -64,7 +64,7 @@ public class ZKAuthorizor implements Aut
     byte[] authsBytes = zooCache.get(ZKUserPath + "/" + user + ZKUserAuths);
     if (authsBytes != null)
       return ZKSecurityTool.convertAuthorizations(authsBytes);
-    return Constants.NO_AUTHS;
+    return Authorizations.EMPTY;
   }
   
   @Override
@@ -90,7 +90,7 @@ public class ZKAuthorizor implements Aut
         zoo.putPersistentData(ZKUserPath, rootuser.getBytes(), NodeExistsPolicy.FAIL);
       
       initUser(rootuser);
-      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Constants.NO_AUTHS), NodeExistsPolicy.FAIL);
+      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL);
     } catch (KeeperException e) {
       log.error(e, e);
       throw new RuntimeException(e);



Mime
View raw message