accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1450395 - in /accumulo/branches/ACCUMULO-259-polishing: ./ assemble/ core/ core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/mapr...
Date Tue, 26 Feb 2013 20:33:34 GMT
Author: ctubbsii
Date: Tue Feb 26 20:33:32 2013
New Revision: 1450395

URL: http://svn.apache.org/r1450395
Log:
ACCUMULO-259 merge 1.5 branch updates to polishing branch

Modified:
    accumulo/branches/ACCUMULO-259-polishing/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/assemble/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/core/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/data/Key.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
    accumulo/branches/ACCUMULO-259-polishing/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
    accumulo/branches/ACCUMULO-259-polishing/examples/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
    accumulo/branches/ACCUMULO-259-polishing/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
  (props changed)
    accumulo/branches/ACCUMULO-259-polishing/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
  (props changed)
    accumulo/branches/ACCUMULO-259-polishing/server/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/Master.java
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
    accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
    accumulo/branches/ACCUMULO-259-polishing/src/   (props changed)
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/TestIngest.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
    accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java

Propchange: accumulo/branches/ACCUMULO-259-polishing/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1450271
  Merged /accumulo/branches/1.5:r1449464-1450387
  Merged /accumulo/branches/1.4:r1450271

Propchange: accumulo/branches/ACCUMULO-259-polishing/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/assemble:r1450271
  Merged /accumulo/branches/1.4/assemble:r1450271
  Merged /accumulo/branches/1.5/assemble:r1449464-1450368

Propchange: accumulo/branches/ACCUMULO-259-polishing/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1449464-1450368
  Merged /accumulo/branches/1.4/core:r1450271
  Merged /accumulo/branches/1.4/src/core:r1450271

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
Tue Feb 26 20:33:32 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.core.client;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -67,8 +68,17 @@ public class MutationsRejectedException 
   
   /**
    * @return the internal list of authorization failures
+   * @deprecated since 1.5, see {@link #getAuthorizationFailuresMap()}
    */
-  public Map<KeyExtent,Set<SecurityErrorCode>> getAuthorizationFailures() {
+  List<KeyExtent> getAuthorizationFailures() {
+    return new ArrayList<KeyExtent>(af.keySet());
+  }
+  
+  /**
+   * 
+   * @return the internal mapping of keyextent mappings to SecurityErrorCode
+   */
+  public Map<KeyExtent,Set<SecurityErrorCode>> getAuthorizationFailuresMap()
{
     return af;
   }
   

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
Tue Feb 26 20:33:32 2013
@@ -135,7 +135,7 @@ class OfflineIterator implements Iterato
     this.readers = new ArrayList<SortedKeyValueIterator<Key,Value>>();
     
     try {
-      conn = instance.getConnector(credentials.getPrincipal(), credentials.getToken());
+      conn = instance.getConnector(credentials);
       nextTablet();
       
       while (iter != null && !iter.hasTop())

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
Tue Feb 26 20:33:32 2013
@@ -484,9 +484,9 @@ public class AccumuloOutputFormat implem
       try {
         mtbw.close();
       } catch (MutationsRejectedException e) {
-        if (e.getAuthorizationFailures().size() >= 0) {
+        if (e.getAuthorizationFailuresMap().size() >= 0) {
           HashMap<String,Set<SecurityErrorCode>> tables = new HashMap<String,Set<SecurityErrorCode>>();
-          for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailures().entrySet())
{
+          for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailuresMap().entrySet())
{
             Set<SecurityErrorCode> secCodes = tables.get(ke.getKey().getTableId().toString());
             if (secCodes == null) {
               secCodes = new HashSet<SecurityErrorCode>();

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
Tue Feb 26 20:33:32 2013
@@ -488,9 +488,9 @@ public class AccumuloOutputFormat extend
       try {
         mtbw.close();
       } catch (MutationsRejectedException e) {
-        if (e.getAuthorizationFailures().size() >= 0) {
+        if (e.getAuthorizationFailuresMap().size() >= 0) {
           HashMap<String,Set<SecurityErrorCode>> tables = new HashMap<String,Set<SecurityErrorCode>>();
-          for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailures().entrySet())
{
+          for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailuresMap().entrySet())
{
             Set<SecurityErrorCode> secCodes = tables.get(ke.getKey().getTableId().toString());
             if (secCodes == null) {
               secCodes = new HashSet<SecurityErrorCode>();

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/data/Key.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/data/Key.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/data/Key.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/data/Key.java
Tue Feb 26 20:33:32 2013
@@ -478,6 +478,17 @@ public class Key implements WritableComp
   }
   
   /**
+   * This method creates a new ColumnVisibility representing the column visibility for this
key
+   * 
+   * WARNING: using this method may inhibit performance since a new ColumnVisibility object
is created on every call.
+   * 
+   * @return A new object representing the column visibility field
+   */
+  public final ColumnVisibility getColumnVisibilityParsed() {
+    return new ColumnVisibility(colVisibility);
+  }
+  
+  /**
    * Sets this key's row, column family, column qualifier, column visibility, timestamp,
and delete marker to be the same as another key's.
    */
   public void set(Key k) {

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/main/java/org/apache/accumulo/core/util/shell/commands/InsertCommand.java
Tue Feb 26 20:33:32 2013
@@ -85,10 +85,10 @@ public class InsertCommand extends Comma
       bw.close();
     } catch (MutationsRejectedException e) {
       final ArrayList<String> lines = new ArrayList<String>();
-      if (e.getAuthorizationFailures().isEmpty() == false) {
+      if (e.getAuthorizationFailuresMap().isEmpty() == false) {
         lines.add("	Authorization Failures:");
       }
-      for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : e.getAuthorizationFailures().entrySet())
{
+      for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : e.getAuthorizationFailuresMap().entrySet())
{
         lines.add("		" + entry);
       }
       if (e.getConstraintViolationSummaries().isEmpty() == false) {

Modified: accumulo/branches/ACCUMULO-259-polishing/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
Tue Feb 26 20:33:32 2013
@@ -18,6 +18,7 @@ package org.apache.accumulo.core.data;
 
 import junit.framework.TestCase;
 
+import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
 public class KeyTest extends TestCase {
@@ -97,4 +98,13 @@ public class KeyTest extends TestCase {
     Key k = new Key("r", "f", "q", "v");
     assertEquals(k.followingKey(PartialKey.ROW_COLFAM_COLQUAL_COLVIS).toString(), "r f:q
[v%00;] " + Long.MAX_VALUE + " false");
   }
+  
+  public void testVisibilityGetters() {
+    Key k = new Key("r", "f", "q", "v1|(v2&v3)");
+    
+    Text expression = k.getColumnVisibility();
+    ColumnVisibility parsed = k.getColumnVisibilityParsed();
+    
+    assertEquals(expression, new Text(parsed.getExpression()));
+  }
 }

Propchange: accumulo/branches/ACCUMULO-259-polishing/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/examples:r1450271
  Merged /accumulo/branches/1.5/examples:r1449464-1450368

Modified: accumulo/branches/ACCUMULO-259-polishing/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
Tue Feb 26 20:33:32 2013
@@ -148,9 +148,9 @@ public class RandomBatchWriter {
     try {
       bw.close();
     } catch (MutationsRejectedException e) {
-      if (e.getAuthorizationFailures().size() > 0) {
+      if (e.getAuthorizationFailuresMap().size() > 0) {
         HashMap<String,Set<SecurityErrorCode>> tables = new HashMap<String,Set<SecurityErrorCode>>();
-        for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailures().entrySet())
{
+        for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizationFailuresMap().entrySet())
{
           Set<SecurityErrorCode> secCodes = tables.get(ke.getKey().getTableId().toString());
           if (secCodes == null) {
             secCodes = new HashSet<SecurityErrorCode>();

Propchange: accumulo/branches/ACCUMULO-259-polishing/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1449464-1450368
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1450271
  Merged /accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1450271

Propchange: accumulo/branches/ACCUMULO-259-polishing/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1450271
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1449464-1450368
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1450271

Propchange: accumulo/branches/ACCUMULO-259-polishing/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/server:r1450271
  Merged /accumulo/branches/1.5/server:r1449464-1450368
  Merged /accumulo/branches/1.4/src/server:r1450271

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Tue Feb 26 20:33:32 2013
@@ -288,7 +288,7 @@ public class LiveTServerSet implements W
   @Override
   public void process(WatchedEvent event) {
 
-    // its imporant that these event are propogated by ZooCache, because this ensures when
reading zoocache that is has already processed the event and cleared
+    // its important that these event are propagated by ZooCache, because this ensures when
reading zoocache that is has already processed the event and cleared
     // relevant nodes before code below reads from zoocache
 
     if (event.getPath() != null) {

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/Master.java
Tue Feb 26 20:33:32 2013
@@ -2242,6 +2242,19 @@ public class Master implements LiveTServ
     }
     serversToShutdown.removeAll(deleted);
     badServers.keySet().removeAll(deleted);
+    // clear out any bad server with the same host/port as a new server
+    synchronized (badServers) {
+      Iterator<Entry<TServerInstance,AtomicInteger>> badIter = badServers.entrySet().iterator();
+      while (badIter.hasNext()) {
+        Entry<TServerInstance,AtomicInteger> bad = badIter.next();
+        for (TServerInstance add : added) {
+          if (bad.getKey().hostPort().equals(add.hostPort())) {
+            badIter.remove();
+            break;
+          }
+        }
+      }
+    }
     
     synchronized (migrations) {
       Iterator<Entry<KeyExtent,TServerInstance>> iter = migrations.entrySet().iterator();

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
Tue Feb 26 20:33:32 2013
@@ -71,31 +71,26 @@ public class RecoverLease extends Master
     if (fs instanceof TraceFileSystem)
       fs = ((TraceFileSystem) fs).getImplementation();
     
-    try {
-      if (fs instanceof DistributedFileSystem) {
-        DistributedFileSystem dfs = (DistributedFileSystem) fs;
+    if (fs instanceof DistributedFileSystem) {
+      DistributedFileSystem dfs = (DistributedFileSystem) fs;
+      try {
         if (!dfs.recoverLease(source)) {
           log.info("Waiting for file to be closed " + source.toString());
           return 1000;
         }
         log.info("Recovered lease on " + source.toString());
         return 0;
-      } else if (fs instanceof LocalFileSystem) {
-        // ignore
-      } else {
-        throw new IllegalStateException("Don't know how to recover a lease for "  + fs.getClass().getName());

+      } catch (IOException ex) {
+        log.error("Error recovery lease on " + source.toString(), ex);
       }
-    } catch (IOException ex) {
-      log.error("error recovering lease ", ex);
-    }
-    try {
-      fs.append(source).close();
-      log.info("Recovered lease on " + source.toString() + " using append");
-      return 0;
-    } catch (IOException ex) {
-      log.error("error recovering lease using append", ex);
-      return 1000;
+    } else if (fs instanceof LocalFileSystem) {
+      // ignore
+    } else {
+      throw new IllegalStateException("Don't know how to recover a lease for "  + fs.getClass().getName());

     }
+    fs.append(source).close();
+    log.info("Recovered lease on " + source.toString() + " using append");
+    return 0;
   }
   
   @Override

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
Tue Feb 26 20:33:32 2013
@@ -395,7 +395,7 @@ class CopyFailed extends MasterRepo {
     
     for (Entry<Key,Value> entry : mscanner) {
       if (Long.parseLong(entry.getValue().toString()) == tid) {
-        String loadedFile = entry.getKey().getColumnQualifierData().toString();
+        String loadedFile = entry.getKey().getColumnQualifier().toString();
         String absPath = failures.remove(loadedFile);
         if (absPath != null) {
           loadedFailures.put(loadedFile, absPath);

Modified: accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
Tue Feb 26 20:33:32 2013
@@ -115,7 +115,7 @@ public class LogSorter {
         
         if (!cryptoOpts.containsKey(Property.CRYPTO_MODULE_CLASS.getKey())) {
           
-          log.debug("Not a V2 log file, so re-opening it and passing it on");
+          log.debug("Log file " + name + " not encrypted");
           
           synchronized (this) {
             this.input = tmpInput;

Propchange: accumulo/branches/ACCUMULO-259-polishing/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1450271
  Merged /accumulo/branches/1.4/src/src:r1450271
  Merged /accumulo/branches/1.5/src:r1449464-1450368

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/QueryMetadataTable.java
Tue Feb 26 20:33:32 2013
@@ -58,7 +58,7 @@ public class QueryMetadataTable {
       try {
         KeyExtent extent = new KeyExtent(row, (Text) null);
         
-        Connector connector = HdfsZooInstance.getInstance().getConnector(credentials.getPrincipal(),
credentials.getToken());
+        Connector connector = HdfsZooInstance.getInstance().getConnector(credentials);
         Scanner mdScanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
         Text row = extent.getMetadataEntry();
         

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/TestIngest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/TestIngest.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/TestIngest.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/TestIngest.java
Tue Feb 26 20:33:32 2013
@@ -303,8 +303,8 @@ public class TestIngest {
         try {
           bw.close();
         } catch (MutationsRejectedException e) {
-          if (e.getAuthorizationFailures().size() > 0) {
-            for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : e.getAuthorizationFailures().entrySet())
{
+          if (e.getAuthorizationFailuresMap().size() > 0) {
+            for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : e.getAuthorizationFailuresMap().entrySet())
{
               System.err.println("ERROR : Not authorized to write to : " + entry.getKey()
+ " due to " + entry.getValue());
             }
           }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/functional/PermissionsTest.java
Tue Feb 26 20:33:32 2013
@@ -389,7 +389,7 @@ public class PermissionsTest {
             try {
               writer.close();
             } catch (MutationsRejectedException e1) {
-              if (e1.getAuthorizationFailures().size() > 0)
+              if (e1.getAuthorizationFailuresMap().size() > 0)
                 throw new AccumuloSecurityException(test_user_conn.whoami(), SecurityErrorCode.PERMISSION_DENIED,
e1);
             }
             throw new IllegalStateException("Should NOT be able to write to a table");

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/State.java
Tue Feb 26 20:33:32 2013
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.client.Z
 import org.apache.accumulo.core.security.CredentialHelper;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.security.tokens.PasswordToken;
-import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.log4j.Logger;
 
 public class State {
@@ -96,10 +95,7 @@ public class State {
   
   public Connector getConnector() throws AccumuloException, AccumuloSecurityException {
     if (connector == null) {
-      String instance = props.getProperty("INSTANCE");
-      String zookeepers = props.getProperty("ZOOKEEPERS");
-      TCredentials credentials = getCredentials();
-      connector = new ZooKeeperInstance(instance, zookeepers).getConnector(credentials.getPrincipal(),
credentials.getToken());
+      connector = getInstance().getConnector(getCredentials().getPrincipal(), getCredentials().getToken());
     }
     return connector;
   }
@@ -107,12 +103,14 @@ public class State {
   public TCredentials getCredentials() {
     String username = props.getProperty("USERNAME");
     String password = props.getProperty("PASSWORD");
-    return CredentialHelper.createSquelchError(username, new PasswordToken(password), this.getInstance().getInstanceID());
+    return CredentialHelper.createSquelchError(username, new PasswordToken(password), getInstance().getInstanceID());
   }
   
   public Instance getInstance() {
     if (instance == null) {
-      instance = HdfsZooInstance.getInstance();
+      String instance = props.getProperty("INSTANCE");
+      String zookeepers = props.getProperty("ZOOKEEPERS");
+      this.instance = new ZooKeeperInstance(instance, zookeepers);
     }
     return instance;
   }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
Tue Feb 26 20:33:32 2013
@@ -28,7 +28,7 @@ public class Commit extends Test {
     state.getMultiTableBatchWriter().flush();
     
     log.debug("Committed " + state.getLong("numWrites") + " writes.  Total writes: " + state.getLong("totalWrites"));
-    state.set("numWrites", new Integer(0));
+    state.set("numWrites", new Long(0));
   }
   
 }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
Tue Feb 26 20:33:32 2013
@@ -84,8 +84,8 @@ public class ImageFixture extends Fixtur
       log.debug("Configured locality groups for " + imageTableName + " groups = " + groups);
     }
     
-    state.set("numWrites", new Integer(0));
-    state.set("totalWrites", new Integer(0));
+    state.set("numWrites", new Long(0));
+    state.set("totalWrites", new Long(0));
     state.set("verified", new Integer(0));
     state.set("lastIndexRow", new Text(""));
   }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
Tue Feb 26 20:33:32 2013
@@ -33,7 +33,7 @@ public class Commit extends Test {
     log.debug("Committed " + numWrites + " writes.  Total writes: " + totalWrites);
     
     state.set("totalWrites", totalWrites);
-    state.set("numWrites", new Integer(0));
+    state.set("numWrites", new Long(0));
   }
   
 }

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
Tue Feb 26 20:33:32 2013
@@ -33,8 +33,8 @@ public class MultiTableFixture extends F
     
     state.set("tableNamePrefix", String.format("multi_%s_%s_%d", hostname, state.getPid(),
System.currentTimeMillis()));
     state.set("nextId", new Integer(0));
-    state.set("numWrites", new Integer(0));
-    state.set("totalWrites", new Integer(0));
+    state.set("numWrites", new Long(0));
+    state.set("totalWrites", new Long(0));
     state.set("tableList", new ArrayList<String>());
   }
   

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
Tue Feb 26 20:33:32 2013
@@ -69,7 +69,7 @@ public class AlterTablePerm extends Test
     } else {
       source = state.getCredentials();
     }
-    Connector conn = state.getInstance().getConnector(source.getPrincipal(), source.getToken());
+    Connector conn = state.getInstance().getConnector(source);
     
     canGive = WalkingSecurity.get(state).canGrantTable(source, target, WalkingSecurity.get(state).getTableName());
 

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
Tue Feb 26 20:33:32 2013
@@ -38,7 +38,7 @@ public class Authenticate extends Test {
     String targetProp = props.getProperty("target");
     boolean success = Boolean.parseBoolean(props.getProperty("valid"));
     
-    Connector conn = state.getInstance().getConnector(auth.getPrincipal(), auth.getToken());
+    Connector conn = state.getInstance().getConnector(auth);
     
     String target;
     

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
Tue Feb 26 20:33:32 2013
@@ -40,7 +40,7 @@ public class ChangePass extends Test {
     } else {
       auth = WalkingSecurity.get(state).getTabCredentials();
     }
-    Connector conn = state.getInstance().getConnector(auth.getPrincipal(), auth.getToken());
+    Connector conn = state.getInstance().getConnector(auth);
     
     boolean hasPerm;
     boolean targetExists;

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
Tue Feb 26 20:33:32 2013
@@ -43,7 +43,7 @@ public class DropTable extends Test {
     } else {
       auth = WalkingSecurity.get(state).getSysCredentials();
     }
-    Connector conn = state.getInstance().getConnector(auth.getPrincipal(), auth.getToken());
+    Connector conn = state.getInstance().getConnector(auth);
     
     String tableName = WalkingSecurity.get(state).getTableName();
     

Modified: accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java?rev=1450395&r1=1450394&r2=1450395&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
(original)
+++ accumulo/branches/ACCUMULO-259-polishing/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
Tue Feb 26 20:33:32 2013
@@ -279,11 +279,19 @@ public class WalkingSecurity extends Sec
   }
   
   public byte[] getUserPassword(String user) {
-    return (byte[]) state.get(user + userPass);
+    Object obj = state.get(getSysUserName() + userPass);
+    if (obj instanceof PasswordToken) {
+      return ((PasswordToken) obj).getPassword();
+    }
+    return null;
   }
   
   public byte[] getSysPassword() {
-    return (byte[]) state.get(getSysUserName() + userPass);
+    Object obj = state.get(getSysUserName() + userPass);
+    if (obj instanceof PasswordToken) {
+      return ((PasswordToken) obj).getPassword();
+    }
+    return null;
   }
   
   public byte[] getTabPassword() {
@@ -368,11 +376,13 @@ public class WalkingSecurity extends Sec
   
   @Override
   public AuthenticationToken login(Properties properties) throws AccumuloSecurityException
{
-    return authenticator.login(properties);
+    if (properties.containsKey("password"))
+      return new PasswordToken(properties.getProperty("password"));
+    throw new AccumuloSecurityException(properties.getProperty("user"), SecurityErrorCode.INSUFFICIENT_PROPERTIES);
   }
   
   @Override
   public boolean validTokenClass(String tokenClass) {
-    return authenticator.validTokenClass(tokenClass);
+    return tokenClass.equals(PasswordToken.class.getCanonicalName());
   }
 }



Mime
View raw message