Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE03EE2C8 for ; Fri, 8 Feb 2013 16:43:26 +0000 (UTC) Received: (qmail 97486 invoked by uid 500); 8 Feb 2013 16:43:26 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 97461 invoked by uid 500); 8 Feb 2013 16:43:26 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 97452 invoked by uid 99); 8 Feb 2013 16:43:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 16:43:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 16:43:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E34A323888E7; Fri, 8 Feb 2013 16:43:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1444119 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/util/ core/src/test/java/org/apache/accumulo/core/util/shell/ server/src/main/java/org/apache/accumulo/server/master/tableOps/ server/src/main/java/org/apache/accumu... Date: Fri, 08 Feb 2013 16:43:05 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130208164305.E34A323888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ecn Date: Fri Feb 8 16:43:04 2013 New Revision: 1444119 URL: http://svn.apache.org/r1444119 Log: ACCUMULO-1054 refactor FastFormat from server to core Added: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java (contents, props changed) - copied, changed from r1442938, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FastFormat.java Removed: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FastFormat.java Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapConcurrencyTest.java accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapPerformanceTest.java accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestIngest.java accumulo/trunk/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java Copied: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java (from r1442938, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FastFormat.java) URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java?p2=accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java&p1=accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FastFormat.java&r1=1442938&r2=1444119&rev=1444119&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FastFormat.java (original) +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java Fri Feb 8 16:43:04 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.accumulo.server.util; +package org.apache.accumulo.core.util; public class FastFormat { // this 7 to 8 times faster than String.format("%s%06d",prefix, num) Propchange: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java (original) +++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java Fri Feb 8 16:43:04 2013 @@ -143,4 +143,25 @@ public class ShellTest { exec("scan", true, "\\x90 \\xA0:\\xB0 [] \\xC0", false); exec("deletetable test -f", true, "Table: [test] has been deleted"); } + + @Test + public void authsTest() throws Exception { + Shell.log.debug("Starting auths test --------------------------"); + exec("setauths x,y,z", false, "Missing required option"); + exec("setauths -s x,y,z -u notauser", false, "user does not exist"); + exec("setauths -s x,y,z", true); + exec("getauths -u notauser", false,"user does not exist"); + exec("getauths", true,"y,z,x"); + exec("addauths -u notauser", false,"Missing required option"); + exec("addauths -u notauser -s foo", false,"user does not exist"); + exec("addauths -s a", true); + exec("getauths", true, "y,z,a,x"); + exec("setauths -c", true); + } + + @Test + public void userTest() throws Exception { + Shell.log.debug("Starting user test --------------------------"); + //exec("createuser root", false, "user exists"); + } } Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java Fri Feb 8 16:43:04 2013 @@ -47,6 +47,7 @@ import org.apache.accumulo.core.file.Fil import org.apache.accumulo.core.master.state.tables.TableState; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.core.security.thrift.ThriftSecurityException; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.fate.Repo; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; import org.apache.accumulo.server.ServerConstants; @@ -57,7 +58,6 @@ import org.apache.accumulo.server.securi import org.apache.accumulo.server.security.SecurityConstants; import org.apache.accumulo.server.security.SecurityOperation; import org.apache.accumulo.server.tabletserver.UniqueNameAllocator; -import org.apache.accumulo.server.util.FastFormat; import org.apache.accumulo.server.util.MetadataTable; import org.apache.accumulo.server.util.TablePropUtil; import org.apache.hadoop.fs.FileStatus; Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java Fri Feb 8 16:43:04 2013 @@ -19,9 +19,9 @@ package org.apache.accumulo.server.table import java.util.Random; import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.core.zookeeper.ZooUtil; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.util.FastFormat; import org.apache.accumulo.server.zookeeper.ZooReaderWriter; /** Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Fri Feb 8 16:43:04 2013 @@ -66,6 +66,7 @@ import org.apache.accumulo.core.tabletse import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.core.util.ColumnFQ; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.core.util.Pair; import org.apache.accumulo.core.util.StringUtil; import org.apache.accumulo.core.util.UtilWaitThread; @@ -78,7 +79,6 @@ import org.apache.accumulo.server.client import org.apache.accumulo.server.conf.ServerConfiguration; import org.apache.accumulo.server.master.state.TServerInstance; import org.apache.accumulo.server.security.SecurityConstants; -import org.apache.accumulo.server.util.FastFormat; import org.apache.accumulo.server.trace.TraceFileSystem; import org.apache.accumulo.server.zookeeper.ZooLock; import org.apache.accumulo.server.zookeeper.ZooReaderWriter; Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapConcurrencyTest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapConcurrencyTest.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapConcurrencyTest.java (original) +++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapConcurrencyTest.java Fri Feb 8 16:43:04 2013 @@ -22,8 +22,8 @@ import java.util.Map.Entry; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.server.tabletserver.NativeMap; -import org.apache.accumulo.server.util.FastFormat; import org.apache.hadoop.io.Text; import com.beust.jcommander.JCommander; Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapPerformanceTest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapPerformanceTest.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapPerformanceTest.java (original) +++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/NativeMapPerformanceTest.java Fri Feb 8 16:43:04 2013 @@ -27,9 +27,9 @@ import java.util.concurrent.ConcurrentSk import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.server.tabletserver.NativeMap; -import org.apache.accumulo.server.util.FastFormat; import org.apache.hadoop.io.Text; public class NativeMapPerformanceTest { Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestIngest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestIngest.java?rev=1444119&r1=1444118&r2=1444119&view=diff ============================================================================== --- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestIngest.java (original) +++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/TestIngest.java Fri Feb 8 16:43:04 2013 @@ -43,10 +43,10 @@ import org.apache.accumulo.core.security import org.apache.accumulo.core.security.thrift.SecurityErrorCode; import org.apache.accumulo.core.trace.DistributedTrace; import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.core.util.FastFormat; import org.apache.accumulo.fate.zookeeper.ZooReader; import org.apache.accumulo.server.cli.ClientOnDefaultTable; import org.apache.accumulo.server.conf.ServerConfiguration; -import org.apache.accumulo.server.util.FastFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.io.Text; 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=1444119&r1=1444118&r2=1444119&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 Fri Feb 8 16:43:04 2013 @@ -39,7 +39,7 @@ import org.apache.accumulo.core.client.T import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.security.ColumnVisibility; -import org.apache.accumulo.server.util.FastFormat; +import org.apache.accumulo.core.util.FastFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;