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 E258710E94 for ; Thu, 30 Jan 2014 21:57:30 +0000 (UTC) Received: (qmail 42938 invoked by uid 500); 30 Jan 2014 21:57:20 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 42763 invoked by uid 500); 30 Jan 2014 21:57:17 -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 42720 invoked by uid 99); 30 Jan 2014 21:57:16 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 21:57:16 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 62395916756; Thu, 30 Jan 2014 21:57:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vines@apache.org To: commits@accumulo.apache.org Date: Thu, 30 Jan 2014 21:57:18 -0000 Message-Id: <52ddd7bb5db64797983533ee71d22382@git.apache.org> In-Reply-To: <045b7b697719427e8598c3cbcb327190@git.apache.org> References: <045b7b697719427e8598c3cbcb327190@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/9] git commit: Revert "ACCUMULO-2086 Use the tableID instead of the tableName where necessary." Revert "ACCUMULO-2086 Use the tableID instead of the tableName where necessary." This reverts commit e8c9aae904380f22e55a31e3a7422ecd4597b0b0. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ca6c82bb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ca6c82bb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ca6c82bb Branch: refs/heads/1.6.0-SNAPSHOT Commit: ca6c82bbd02f18aaa9281aa12d8033e1475c441c Parents: 12aa01e Author: John Vines Authored: Thu Jan 30 11:29:28 2014 -0500 Committer: John Vines Committed: Thu Jan 30 11:29:28 2014 -0500 ---------------------------------------------------------------------- .../test/randomwalk/security/TableOp.java | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/ca6c82bb/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java index 0215365..a636355 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java @@ -64,18 +64,12 @@ public class TableOp extends Test { tp = TablePermission.valueOf(action); } - final boolean tableExists = WalkingSecurity.get(state).getTableExists(); - final String tableName = WalkingSecurity.get(state).getTableName(); - final String tableId = conn.tableOperations().tableIdMap().get(tableName); - - if (null == tableId) { - log.error("Could not determine tableID from name " + tableName); - return; - } + boolean tableExists = WalkingSecurity.get(state).getTableExists(); + String tableName = WalkingSecurity.get(state).getTableName(); switch (tp) { case READ: { - boolean canRead = WalkingSecurity.get(state).canScan(WalkingSecurity.get(state).getTabCredentials(), tableId); + boolean canRead = WalkingSecurity.get(state).canScan(WalkingSecurity.get(state).getTabCredentials(), tableName); Authorizations auths = WalkingSecurity.get(state).getUserAuthorizations(WalkingSecurity.get(state).getTabCredentials()); boolean ambiguousZone = WalkingSecurity.get(state).inAmbiguousZone(conn.whoami(), tp); boolean ambiguousAuths = WalkingSecurity.get(state).ambiguousAuthorizations(conn.whoami()); @@ -146,7 +140,7 @@ public class TableOp extends Test { break; } case WRITE: - boolean canWrite = WalkingSecurity.get(state).canWrite(WalkingSecurity.get(state).getTabCredentials(), tableId); + boolean canWrite = WalkingSecurity.get(state).canWrite(WalkingSecurity.get(state).getTabCredentials(), tableName); boolean ambiguousZone = WalkingSecurity.get(state).inAmbiguousZone(conn.whoami(), tp); String key = WalkingSecurity.get(state).getLastKey() + "1"; @@ -220,7 +214,7 @@ public class TableOp extends Test { return; } catch (AccumuloSecurityException ae) { if (ae.getSecurityErrorCode().equals(SecurityErrorCode.PERMISSION_DENIED)) { - if (WalkingSecurity.get(state).canBulkImport(WalkingSecurity.get(state).getTabCredentials(), tableId)) + if (WalkingSecurity.get(state).canBulkImport(WalkingSecurity.get(state).getTabCredentials(), tableName)) throw new AccumuloException("Bulk Import failed when it should have worked: " + tableName); return; } else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) { @@ -234,12 +228,12 @@ public class TableOp extends Test { fs.delete(dir, true); fs.delete(fail, true); - if (!WalkingSecurity.get(state).canBulkImport(WalkingSecurity.get(state).getTabCredentials(), tableId)) + if (!WalkingSecurity.get(state).canBulkImport(WalkingSecurity.get(state).getTabCredentials(), tableName)) throw new AccumuloException("Bulk Import succeeded when it should have failed: " + dir + " table " + tableName); break; case ALTER_TABLE: AlterTable.renameTable(conn, state, tableName, tableName + "plus", - WalkingSecurity.get(state).canAlterTable(WalkingSecurity.get(state).getTabCredentials(), tableId), tableExists); + WalkingSecurity.get(state).canAlterTable(WalkingSecurity.get(state).getTabCredentials(), tableName), tableExists); break; case GRANT: