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 9EF91EB88 for ; Mon, 25 Feb 2013 15:20:39 +0000 (UTC) Received: (qmail 84390 invoked by uid 500); 25 Feb 2013 15:20:39 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 84260 invoked by uid 500); 25 Feb 2013 15:20:36 -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 84235 invoked by uid 99); 25 Feb 2013 15:20:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 15:20:35 +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; Mon, 25 Feb 2013 15:20:33 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C8B3F23888E7; Mon, 25 Feb 2013 15:20:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1449745 - in /accumulo/trunk: ./ assemble/ core/ core/src/main/java/org/apache/accumulo/core/data/ core/src/test/java/org/apache/accumulo/core/data/ examples/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accum... Date: Mon, 25 Feb 2013 15:20:14 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130225152014.C8B3F23888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ecn Date: Mon Feb 25 15:20:13 2013 New Revision: 1449745 URL: http://svn.apache.org/r1449745 Log: ACCUMULO-1053 ACCUMULO-498 merge to trunk 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/data/Key.java accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java accumulo/trunk/examples/ (props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (props changed) accumulo/trunk/server/ (props changed) accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java accumulo/trunk/src/ (props changed) Propchange: accumulo/trunk/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5:r1448816-1449743 Propchange: accumulo/trunk/assemble/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/assemble:r1448816-1449743 Propchange: accumulo/trunk/core/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/core:r1448816-1449743 Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java?rev=1449745&r1=1449744&r2=1449745&view=diff ============================================================================== --- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java (original) +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java Mon Feb 25 15:20:13 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/trunk/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java?rev=1449745&r1=1449744&r2=1449745&view=diff ============================================================================== --- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java (original) +++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java Mon Feb 25 15:20:13 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/trunk/examples/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/examples:r1448816-1449743 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:r1448816-1449743 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:r1448816-1449743 Propchange: accumulo/trunk/server/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/server:r1448816-1449743 Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1449745&r1=1449744&r2=1449745&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java Mon Feb 25 15:20:13 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/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java?rev=1449745&r1=1449744&r2=1449745&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java Mon Feb 25 15:20:13 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/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java?rev=1449745&r1=1449744&r2=1449745&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java Mon Feb 25 15:20:13 2013 @@ -116,7 +116,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/trunk/src/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.5/src:r1448816-1449743