accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1459536 - in /accumulo/trunk: ./ assemble/ core/ core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/mock/ core/src/main/java/org/apache/accumulo/core/client/security/tokens/ core/src/main...
Date Thu, 21 Mar 2013 21:29:18 GMT
Author: kturner
Date: Thu Mar 21 21:29:17 2013
New Revision: 1459536

URL: http://svn.apache.org/r1459536
Log:
ACCUMULO-755 ran findbugs

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModuleUtils.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
    accumulo/trunk/examples/   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   (contents, props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java   (props changed)
    accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/thrift/metrics/ThriftMetrics.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
    accumulo/trunk/src/   (props changed)
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/CreateRandomRFile.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterTest.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/NativeMapTest.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/Node.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Merge.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Split.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchScan.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchWrite.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BulkImport.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Compact.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/DeleteRange.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Merge.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1459525

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/assemble:r1459525

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1459525

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java Thu Mar 21 21:29:17 2013
@@ -123,7 +123,7 @@ public class BatchWriterConfig implement
       throw new IllegalArgumentException("Negative timeout not allowed " + timeout);
     
     if (timeout == 0)
-      timeout = Long.MAX_VALUE;
+      this.timeout = Long.MAX_VALUE;
     else
       // make small, positive values that truncate to 0 when converted use the minimum millis instead
       this.timeout = Math.max(1, timeUnit.toMillis(timeout));

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java Thu Mar 21 21:29:17 2013
@@ -281,7 +281,7 @@ public class MockTableOperations extends
   @Override
   public void online(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
     if (!exists(tableName))
-      new TableNotFoundException(tableName, tableName, "");
+      throw new TableNotFoundException(tableName, tableName, "");
   }
   
   @Override

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java Thu Mar 21 21:29:17 2013
@@ -111,6 +111,12 @@ public class PasswordToken implements Au
   
   @Override
   public PasswordToken clone() {
-    return new PasswordToken(password);
+    try {
+      PasswordToken clone = (PasswordToken) super.clone();
+      clone.password = Arrays.copyOf(password, password.length);
+      return clone;
+    } catch (CloneNotSupportedException e) {
+      throw new RuntimeException(e);
+    }
   }
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java Thu Mar 21 21:29:17 2013
@@ -143,7 +143,7 @@ abstract public class TransformingIterat
     
     for (String opt : options.keySet()) {
       try {
-        if (options.equals(AUTH_OPT)) {
+        if (opt.equals(AUTH_OPT)) {
           new Authorizations(options.get(opt).getBytes());
         } else if (opt.equals(MAX_BUFFER_SIZE_OPT)) {
           AccumuloConfiguration.getMemoryInBytes(options.get(opt));
@@ -223,7 +223,7 @@ abstract public class TransformingIterat
   
   @Override
   public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
-    seekRange = (range != null) ? new Range(range) : null;
+    seekRange = new Range(range);
     seekColumnFamilies = columnFamilies;
     seekColumnFamiliesInclusive = inclusive;
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModuleUtils.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModuleUtils.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModuleUtils.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModuleUtils.java Thu Mar 21 21:29:17 2013
@@ -61,7 +61,7 @@ public class DefaultCryptoModuleUtils {
         log.error(String.format("Accumulo configuration file contained a cipher suite \"%s\" that was not recognized by any providers", cipherSuite));
         throw new RuntimeException(e);
       } catch (NoSuchPaddingException e) {
-        log.error(String.format("Accumulo configuration file contained a cipher, \"%s\" with a padding that was not recognized by any providers"));
+        log.error(String.format("Accumulo configuration file contained a cipher, \"%s\" with a padding that was not recognized by any providers", cipherSuite));
         throw new RuntimeException(e);
       }
     }

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java (original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java Thu Mar 21 21:29:17 2013
@@ -457,8 +457,8 @@ public class OldMutation implements Writ
   
   @Override
   public boolean equals(Object o) {
-    if (o instanceof Mutation)
-      return equals((Mutation) o);
+    if (o instanceof OldMutation)
+      return equals((OldMutation) o);
     return false;
   }
   
@@ -467,7 +467,7 @@ public class OldMutation implements Writ
     return toThrift().hashCode();
   }
   
-  public boolean equals(Mutation m) {
+  public boolean equals(OldMutation m) {
     serialize();
     if (!Arrays.equals(row, m.getRow()))
       return false;

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java (original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java Thu Mar 21 21:29:17 2013
@@ -411,6 +411,13 @@ public class TransformingIteratorTest {
       Assert.assertFalse(true);
     } catch (IllegalArgumentException e) {}
 
+    opts.clear();
+    opts.put(TransformingIterator.AUTH_OPT, Authorizations.HEADER + "~~~~");
+    try {
+      ti.validateOptions(opts);
+      Assert.assertFalse(true);
+    } catch (IllegalArgumentException e) {}
+
   }
   
   private Key createDeleteKey(String row, String colFam, String colQual, String colVis, long timestamp) {

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/examples:r1459525

Modified: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (original)
+++ accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java Thu Mar 21 21:29:17 2013
@@ -103,7 +103,7 @@ public class ZooStore<T> implements TSto
     while (true) {
       try {
         // looking at the code for SecureRandom, it appears to be thread safe
-        long tid = Math.abs(idgenerator.nextLong());
+        long tid = idgenerator.nextLong() & 0x7fffffffffffffffl;
         zk.putPersistentData(getTXPath(tid), TStatus.NEW.name().getBytes(), NodeExistsPolicy.FAIL);
         return tid;
       } catch (NodeExistsException nee) {

Propchange: accumulo/trunk/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:r1459525

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1459525

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java Thu Mar 21 21:29:17 2013
@@ -117,7 +117,7 @@ public class TestProxyTableOperations {
     
     tpc.proxy().mergeTablets(userpass, testtable, ByteBuffer.wrap("b".getBytes()), ByteBuffer.wrap("d".getBytes()));
     
-    splits.remove("c");
+    splits.remove(ByteBuffer.wrap("c".getBytes()));
     
     List<ByteBuffer> tableSplits = tpc.proxy().listSplits(userpass, testtable, 10);
     

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1459525

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java Thu Mar 21 21:29:17 2013
@@ -57,7 +57,7 @@ public class DedupedLogEvent {
   @Override
   public boolean equals(Object obj) {
     if (obj instanceof DedupedLogEvent)
-      return this.event.equals(event);
+      return this.event.equals(((DedupedLogEvent) obj).event);
     return false;
   }
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java Thu Mar 21 21:29:17 2013
@@ -85,7 +85,8 @@ public class DefaultServlet extends Basi
           out.write(("could not get resource " + path + "").getBytes());
         }
       } finally {
-        data.close();
+        if (data != null)
+          data.close();
       }
     } catch (Throwable t) {
       log.error(t, t);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java Thu Mar 21 21:29:17 2013
@@ -25,7 +25,6 @@ import java.util.Set;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.accumulo.trace.thrift.RemoteSpan;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Range;
@@ -35,6 +34,7 @@ import org.apache.accumulo.core.trace.Sp
 import org.apache.accumulo.core.trace.TraceDump;
 import org.apache.accumulo.core.trace.TraceFormatter;
 import org.apache.accumulo.server.monitor.servlets.BasicServlet;
+import org.apache.accumulo.trace.thrift.RemoteSpan;
 import org.apache.hadoop.io.Text;
 
 
@@ -90,7 +90,7 @@ public class ShowTrace extends Basic {
     sb.append("</script>\n");
     sb.append("<div>");
     sb.append("<table><caption>");
-    sb.append(String.format("<span class='table-caption'>Trace started at<br>%s</span></caption>", id, dateString(start)));
+    sb.append(String.format("<span class='table-caption'>Trace %s started at<br>%s</span></caption>", id, dateString(start)));
     sb.append("<tr><th>Time</th><th>Start</th><th>Service@Location</th><th>Name</th><th>Addl Data</th></tr>");
     
     final long finalStart = start;
@@ -109,12 +109,14 @@ public class ShowTrace extends Basic {
         sb.append("</tr>\n");
         sb.append("<tr id='" + Long.toHexString(node.spanId) + "' style='display:none'>");
         sb.append("<td colspan='5'>\n");
-        sb.append("  <table class='indent,noborder'>\n");
-        for (Entry<String,String> entry : node.data.entrySet()) {
-          sb.append("  <tr><td>" + BasicServlet.sanitize(entry.getKey()) + "</td>");
-          sb.append("<td>" + BasicServlet.sanitize(entry.getValue()) + "</td></tr>\n");
+        if (hasData) {
+          sb.append("  <table class='indent,noborder'>\n");
+          for (Entry<String,String> entry : node.data.entrySet()) {
+            sb.append("  <tr><td>" + BasicServlet.sanitize(entry.getKey()) + "</td>");
+            sb.append("<td>" + BasicServlet.sanitize(entry.getValue()) + "</td></tr>\n");
+          }
+          sb.append("  </table>");
         }
-        sb.append("  </table>");
         sb.append("</td>\n");
         sb.append("</tr>\n");
       }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java Thu Mar 21 21:29:17 2013
@@ -49,9 +49,9 @@ import org.apache.log4j.Logger;
 public class SecurityOperation {
   private static final Logger log = Logger.getLogger(SecurityOperationsImpl.class);
   
-  protected static Authorizor authorizor;
-  protected static Authenticator authenticator;
-  protected static PermissionHandler permHandle;
+  protected Authorizor authorizor;
+  protected Authenticator authenticator;
+  protected PermissionHandler permHandle;
   private static String rootUserName = null;
   private final ZooCache zooCache;
   private final String ZKUserPath;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java Thu Mar 21 21:29:17 2013
@@ -3407,8 +3407,10 @@ public class Tablet {
       
       Span curr = Trace.currentTrace();
       curr.data("extent", "" + getExtent());
-      curr.data("read", "" + majCStats.getEntriesRead());
-      curr.data("written", "" + majCStats.getEntriesWritten());
+      if (majCStats != null) {
+        curr.data("read", "" + majCStats.getEntriesRead());
+        curr.data("written", "" + majCStats.getEntriesWritten());
+      }
       span.stop();
     }
     

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/thrift/metrics/ThriftMetrics.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/thrift/metrics/ThriftMetrics.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/thrift/metrics/ThriftMetrics.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/thrift/metrics/ThriftMetrics.java Thu Mar 21 21:29:17 2013
@@ -26,7 +26,7 @@ public class ThriftMetrics extends Abstr
   
   private static final String METRICS_PREFIX = "thrift";
   
-  private static ObjectName OBJECT_NAME = null;
+  private ObjectName OBJECT_NAME = null;
   
   public ThriftMetrics(String serverName, String threadName) {
     super();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java Thu Mar 21 21:29:17 2013
@@ -22,7 +22,6 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
@@ -31,6 +30,7 @@ import org.apache.accumulo.fate.zookeepe
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.ServerConstants;
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -120,7 +120,7 @@ public class ChangeSecret {
           new_.putPersistentData(newPath, data, NodeExistsPolicy.FAIL);
         } else {
           // upgrade
-          if (acls.contains(Ids.OPEN_ACL_UNSAFE)) {
+          if (acls.containsAll(Ids.OPEN_ACL_UNSAFE)) {
             // make user nodes private, they contain the user's password
             String parts[] = path.split("/");
             if (parts[parts.length - 2].equals("users")) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java Thu Mar 21 21:29:17 2013
@@ -19,12 +19,12 @@ package org.apache.accumulo.server.util;
 import java.util.Iterator;
 import java.util.Random;
 
-import org.apache.accumulo.server.cli.ClientOnDefaultTable;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.server.cli.ClientOnDefaultTable;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
@@ -52,7 +52,7 @@ public class RandomWriter {
     }
     
     public Mutation next() {
-      Text row_value = new Text(Long.toString((Math.abs(r.nextLong()) / 177) % 100000000000l));
+      Text row_value = new Text(Long.toString(((r.nextLong() & 0x7fffffffffffffffl) / 177) % 100000000000l));
       Mutation m = new Mutation(row_value);
       for (int column = 0; column < num_columns_per_row; column++) {
         Text column_fam = new Text("col_fam");

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/src:r1459525

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/CreateRandomRFile.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/CreateRandomRFile.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/CreateRandomRFile.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/CreateRandomRFile.java Thu Mar 21 21:29:17 2013
@@ -60,7 +60,7 @@ public class CreateRandomRFile {
     Random r = new Random();
     
     for (int i = 0; i < rands.length; i++) {
-      rands[i] = Math.abs(r.nextLong()) % 10000000000l;
+      rands[i] = (r.nextLong() & 0x7fffffffffffffffl) % 10000000000l;
     }
     
     Arrays.sort(rands);

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java Thu Mar 21 21:29:17 2013
@@ -21,7 +21,6 @@ import java.util.Map.Entry;
 import java.util.Random;
 import java.util.TreeSet;
 
-import org.apache.accumulo.server.cli.ClientOnRequiredTable;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.cli.ScannerOpts;
 import org.apache.accumulo.core.client.BatchWriter;
@@ -32,6 +31,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.util.TextUtil;
+import org.apache.accumulo.server.cli.ClientOnRequiredTable;
 import org.apache.hadoop.io.Text;
 
 import com.beust.jcommander.Parameter;
@@ -162,7 +162,7 @@ public class TestBinaryRows {
         long t1 = System.currentTimeMillis();
         
         for (int i = 0; i < numLookups; i++) {
-          long row = (Math.abs(r.nextLong()) % opts.num) + opts.start;
+          long row = ((r.nextLong() & 0x7fffffffffffffffl) % opts.num) + opts.start;
           
           Scanner s = connector.createScanner(opts.tableName, opts.auths);
           s.setBatchSize(scanOpts.scanBatchSize);

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java Thu Mar 21 21:29:17 2013
@@ -27,8 +27,6 @@ import java.util.UUID;
 import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
-import org.apache.accumulo.trace.instrument.CountSampler;
-import org.apache.accumulo.trace.instrument.Trace;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.cli.ClientOnDefaultTable;
@@ -40,6 +38,8 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.util.FastFormat;
+import org.apache.accumulo.trace.instrument.CountSampler;
+import org.apache.accumulo.trace.instrument.Trace;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -268,7 +268,7 @@ public class ContinuousIngest {
   }
   
   public static final long genLong(long min, long max, Random r) {
-    return (Math.abs(r.nextLong()) % (max - min)) + min;
+    return ((r.nextLong() & 0x7fffffffffffffffl) % (max - min)) + min;
   }
   
   static final byte[] genRow(long min, long max, Random r) {

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java Thu Mar 21 21:29:17 2013
@@ -167,7 +167,7 @@ public class ContinuousVerify extends Co
     Connector conn = null;
     if (opts.scanOffline) {
       Random random = new Random();
-      clone = opts.getTableName() + "_" + String.format("%016x", Math.abs(random.nextLong()));
+      clone = opts.getTableName() + "_" + String.format("%016x", (random.nextLong() & 0x7fffffffffffffffl));
       conn = opts.getConnector();
       conn.tableOperations().clone(opts.getTableName(), clone, true, new HashMap<String,String>(), new HashSet<String>());
       conn.tableOperations().offline(clone);

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterTest.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterTest.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterTest.java Thu Mar 21 21:29:17 2013
@@ -146,7 +146,7 @@ public class BloomFilterTest extends Fun
     Text row = new Text("row"), cq = new Text("cq"), cf = new Text("cf");
     
     for (int i = 0; i < num; ++i) {
-      Long k = (Math.abs(r.nextLong()) % (end - start)) + start;
+      Long k = ((r.nextLong() & 0x7fffffffffffffffl) % (end - start)) + start;
       key.set(String.format("k_%010d", k));
       Range range = null;
       Key acuKey;

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/NativeMapTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/NativeMapTest.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/NativeMapTest.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/NativeMapTest.java Thu Mar 21 21:29:17 2013
@@ -22,10 +22,10 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
+import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Random;
 import java.util.TreeMap;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -499,7 +499,7 @@ public class NativeMapTest {
     
     for (int i = 0; i < 100000; i++) {
       
-      Key k = new Key(rlrf(r, 97), rlrf(r, 13), rlrf(r, 31), rlrf(r, 11), Math.abs(r.nextLong()), false, false);
+      Key k = new Key(rlrf(r, 97), rlrf(r, 13), rlrf(r, 31), rlrf(r, 11), (r.nextLong() & 0x7fffffffffffffffl), false, false);
       Value v = new Value(rlrf(r, 511));
       
       testData.add(new Pair<Key,Value>(k, v));

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java Thu Mar 21 21:29:17 2013
@@ -136,8 +136,8 @@ public class ZombieTServer {
       log.debug("Obtained tablet server lock " + zlock.getLockPath());
     }
     // modify !METADATA
-    while (!tch.halted) {
-      synchronized (tch) {
+    synchronized (tch) {
+      while (!tch.halted) {
         tch.wait();
       }
     }

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java Thu Mar 21 21:29:17 2013
@@ -63,7 +63,7 @@ public class MetadataBatchScanTest {
     Random r = new Random(42);
     
     while (splits.size() < 99999) {
-      splits.add(Math.abs(r.nextLong()) % 1000000000000l);
+      splits.add((r.nextLong() & 0x7fffffffffffffffl) % 1000000000000l);
     }
     
     Text tid = new Text("8");

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/Node.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/Node.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/Node.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/Node.java Thu Mar 21 21:29:17 2013
@@ -39,6 +39,8 @@ public abstract class Node {
   
   @Override
   public boolean equals(Object o) {
+    if (o == null)
+      return false;
     return toString().equals(o.toString());
   }
   

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Merge.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Merge.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Merge.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Merge.java Thu Mar 21 21:29:17 2013
@@ -37,7 +37,7 @@ public class Merge extends BulkTest {
   }
   
   public static Text getRandomRow(Random rand) {
-    return new Text(String.format(BulkPlusOne.FMT, Math.abs(rand.nextLong()) % BulkPlusOne.LOTS));
+    return new Text(String.format(BulkPlusOne.FMT, (rand.nextLong() & 0x7fffffffffffffffl) % BulkPlusOne.LOTS));
   }
   
   public static Text[] getRandomTabletRange(State state) {

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Split.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Split.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Split.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Split.java Thu Mar 21 21:29:17 2013
@@ -31,7 +31,7 @@ public class Split extends BulkTest {
     Random rand = (Random) state.get("rand");
     int count = rand.nextInt(20);
     for (int i = 0; i < count; i++)
-      splits.add(new Text(String.format(BulkPlusOne.FMT, Math.abs(rand.nextLong()) % BulkPlusOne.LOTS)));
+      splits.add(new Text(String.format(BulkPlusOne.FMT, (rand.nextLong() & 0x7fffffffffffffffl) % BulkPlusOne.LOTS)));
     log.info("splitting " + splits);
     state.getConnector().tableOperations().addSplits(Setup.getTableName(), splits);
   }

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java Thu Mar 21 21:29:17 2013
@@ -44,7 +44,7 @@ public class AddSplits extends Test {
     TreeSet<Text> splits = new TreeSet<Text>();
     
     for (int i = 0; i < rand.nextInt(10) + 1; i++)
-      splits.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
+      splits.add(new Text(String.format("%016x", (rand.nextLong() & 0x7fffffffffffffffl))));
     
     try {
       conn.tableOperations().addSplits(tableName, splits);

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchScan.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchScan.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchScan.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchScan.java Thu Mar 21 21:29:17 2013
@@ -53,7 +53,7 @@ public class BatchScan extends Test {
       BatchScanner bs = conn.createBatchScanner(tableName, Constants.NO_AUTHS, 3);
       List<Range> ranges = new ArrayList<Range>();
       for (int i = 0; i < rand.nextInt(2000) + 1; i++)
-        ranges.add(new Range(String.format("%016x", Math.abs(rand.nextLong()))));
+        ranges.add(new Range(String.format("%016x", (rand.nextLong() & 0x7fffffffffffffffl))));
       
       bs.setRanges(ranges);
       

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchWrite.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchWrite.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchWrite.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BatchWrite.java Thu Mar 21 21:29:17 2013
@@ -50,8 +50,8 @@ public class BatchWrite extends Test {
       try {
         int numRows = rand.nextInt(100000);
         for (int i = 0; i < numRows; i++) {
-          Mutation m = new Mutation(String.format("%016x", Math.abs(rand.nextLong())));
-          long val = Math.abs(rand.nextLong());
+          Mutation m = new Mutation(String.format("%016x", (rand.nextLong() & 0x7fffffffffffffffl)));
+          long val = (rand.nextLong() & 0x7fffffffffffffffl);
           for (int j = 0; j < 10; j++) {
             m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes()));
           }

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BulkImport.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BulkImport.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BulkImport.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/BulkImport.java Thu Mar 21 21:29:17 2013
@@ -102,7 +102,7 @@ public class BulkImport extends Test {
     Configuration conf = CachedConfiguration.getInstance();
     FileSystem fs = FileSystem.get(conf);
     
-    String bulkDir = "/tmp/concurrent_bulk/b_" + String.format("%016x", Math.abs(rand.nextLong()));
+    String bulkDir = "/tmp/concurrent_bulk/b_" + String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl);
     
     fs.mkdirs(new Path(bulkDir));
     fs.mkdirs(new Path(bulkDir + "_f"));
@@ -113,12 +113,12 @@ public class BulkImport extends Test {
         TreeSet<Long> rows = new TreeSet<Long>();
         int numRows = rand.nextInt(100000);
         for (int i = 0; i < numRows; i++) {
-          rows.add(Math.abs(rand.nextLong()));
+          rows.add(rand.nextLong() & 0x7fffffffffffffffl);
         }
         
         for (Long row : rows) {
           Mutation m = new Mutation(String.format("%016x", row));
-          long val = Math.abs(rand.nextLong());
+          long val = rand.nextLong() & 0x7fffffffffffffffl;
           for (int j = 0; j < 10; j++) {
             m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes()));
           }

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Compact.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Compact.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Compact.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Compact.java Thu Mar 21 21:29:17 2013
@@ -44,8 +44,8 @@ public class Compact extends Test {
     // TODO need to sometimes do null start and end ranges
     
     TreeSet<Text> range = new TreeSet<Text>();
-    range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
-    range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
+    range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
+    range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
     
     try {
       boolean wait = rand.nextBoolean();

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/DeleteRange.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/DeleteRange.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/DeleteRange.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/DeleteRange.java Thu Mar 21 21:29:17 2013
@@ -44,8 +44,8 @@ public class DeleteRange extends Test {
     
     List<Text> range = new ArrayList<Text>();
     do {
-      range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
-      range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
+      range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
+      range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
     } while (range.get(0).equals(range.get(1)));
     Collections.sort(range);
     if (rand.nextInt(20) == 0)

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Merge.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Merge.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Merge.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Merge.java Thu Mar 21 21:29:17 2013
@@ -44,8 +44,8 @@ public class Merge extends Test {
     // TODO need to sometimes do null start and end ranges
     
     TreeSet<Text> range = new TreeSet<Text>();
-    range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
-    range.add(new Text(String.format("%016x", Math.abs(rand.nextLong()))));
+    range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
+    range.add(new Text(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)));
     
     try {
       conn.tableOperations().merge(tableName, range.first(), range.last());

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java?rev=1459536&r1=1459535&r2=1459536&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java Thu Mar 21 21:29:17 2013
@@ -24,7 +24,6 @@ import org.apache.accumulo.core.client.A
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.security.CredentialHelper;
-import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
@@ -115,8 +114,7 @@ public class AlterTablePerm extends Test
       } catch (AccumuloSecurityException ae) {
         switch (ae.getErrorCode()) {
           case GRANT_INVALID:
-            if (tabPerm.equals(SystemPermission.GRANT))
-              return;
+            throw new AccumuloException("Got a grant invalid on non-System.GRANT option", ae);
           case PERMISSION_DENIED:
             if (canGive)
               throw new AccumuloException(conn.whoami() + " failed to revoke permission to " + target + " when it should have worked", ae);
@@ -144,8 +142,6 @@ public class AlterTablePerm extends Test
       } catch (AccumuloSecurityException ae) {
         switch (ae.getErrorCode()) {
           case GRANT_INVALID:
-            if (tabPerm.equals(SystemPermission.GRANT))
-              return;
             throw new AccumuloException("Got a grant invalid on non-System.GRANT option", ae);
           case PERMISSION_DENIED:
             if (canGive)



Mime
View raw message