Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC90890E6 for ; Tue, 6 Mar 2012 19:18:36 +0000 (UTC) Received: (qmail 21102 invoked by uid 500); 6 Mar 2012 19:18:36 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 21074 invoked by uid 500); 6 Mar 2012 19:18:36 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 21067 invoked by uid 99); 6 Mar 2012 19:18:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 19:18:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_STOCK2 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; Tue, 06 Mar 2012 19:18:29 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A22172388847; Tue, 6 Mar 2012 19:18:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1297657 - in /incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core: client/ client/mapreduce/ iterators/user/ util/shell/commands/ Date: Tue, 06 Mar 2012 19:18:07 -0000 To: accumulo-commits@incubator.apache.org From: billie@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120306191807.A22172388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: billie Date: Tue Mar 6 19:18:06 2012 New Revision: 1297657 URL: http://svn.apache.org/viewvc?rev=1297657&view=rev Log: ACCUMULO-411 wrote some javadocs Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectCommand.java incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectrowCommand.java Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java Tue Mar 6 19:18:06 2012 @@ -26,7 +26,14 @@ import org.apache.accumulo.core.data.Ran */ public interface BatchDeleter extends ScannerBase { - + /** + * Deletes the ranges specified by {@link #setRanges}. + * + * @throws MutationsRejectedException + * this can be thrown when deletion mutations fail + * @throws TableNotFoundException + * when the table does not exist + */ public void delete() throws MutationsRejectedException, TableNotFoundException; /** @@ -37,5 +44,8 @@ public interface BatchDeleter extends Sc */ void setRanges(Collection ranges); + /** + * Releases any resources. + */ void close(); } Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java Tue Mar 6 19:18:06 2012 @@ -48,7 +48,7 @@ public class IteratorSetting { private Map properties; /** - * Get layer at which this iterator applies. See {@link #setPriority(int) for how the priority is used.} + * Get layer at which this iterator applies. See {@link #setPriority(int)} for how the priority is used. * * @return the priority of this Iterator */ @@ -138,7 +138,7 @@ public class IteratorSetting { * Constructs an iterator setting configured for the scan scope with no parameters. (Parameters can be added later.) * * @param priority - * the priority for the iterator @see {@link #setPriority(int)} + * the priority for the iterator (see {@link #setPriority(int)}) * @param name * the distinguishing name for the iterator * @param iteratorClass @@ -152,7 +152,7 @@ public class IteratorSetting { * Constructs an iterator setting configured for the specified scopes with the specified parameters. * * @param priority - * the priority for the iterator @see {@link #setPriority(int)} + * the priority for the iterator (see {@link #setPriority(int)}) * @param name * the distinguishing name for the iterator * @param iteratorClass @@ -173,7 +173,7 @@ public class IteratorSetting { * parameters. * * @param priority - * the priority for the iterator @see {@link #setPriority(int)} + * the priority for the iterator (see {@link #setPriority(int)}) * @param iteratorClass * the class for the iterator */ @@ -182,19 +182,18 @@ public class IteratorSetting { } /** - + * * Constructs an iterator setting using the given class's SimpleName for the iterator name and configured for the specified scopes with the specified * parameters. * * @param priority - * the priority for the iterator @see {@link #setPriority(int)} + * the priority for the iterator (see {@link #setPriority(int)}) * @param iteratorClass * the class for the iterator * @param properties * any properties for the iterator */ - public IteratorSetting(int priority, Class> iteratorClass, - Map properties) { + public IteratorSetting(int priority, Class> iteratorClass, Map properties) { this(priority, iteratorClass.getSimpleName(), iteratorClass.getName(), properties); } @@ -202,7 +201,7 @@ public class IteratorSetting { * Constructs an iterator setting configured for the scan scope with no parameters. * * @param priority - * the priority for the iterator @see {@link #setPriority(int)} + * the priority for the iterator (see {@link #setPriority(int)}) * @param name * the distinguishing name for the iterator * @param iteratorClass @@ -313,6 +312,6 @@ public class IteratorSetting { public Text getColumnQualifier() { return getSecond(); } - + } } Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java Tue Mar 6 19:18:06 2012 @@ -26,7 +26,11 @@ import org.apache.accumulo.core.util.Pee import org.apache.hadoop.io.Text; /** - * Group Key/Value pairs into Iterators over rows. + * Group Key/Value pairs into Iterators over rows. Suggested usage: + * + *
+ * RowIterator rowIterator = new RowIterator(connector.createScanner(tableName, authorizations));
+ * 
*/ public class RowIterator implements Iterator>> { Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java Tue Mar 6 19:18:06 2012 @@ -232,6 +232,13 @@ public class ZooKeeperInstance implement this.conf = conf; } + /** + * Given a zooCache and instanceId, look up the instance name. + * + * @param zooCache + * @param instanceId + * @return the instance name + */ public static String lookupInstanceName(ZooCache zooCache, UUID instanceId) { ArgumentChecker.notNull(zooCache, instanceId); for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) { Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java Tue Mar 6 19:18:06 2012 @@ -140,12 +140,6 @@ public abstract class InputFormatBase ranges) { ArgumentChecker.notNull(ranges); ArrayList rangeStrings = new ArrayList(ranges.size()); @@ -268,16 +296,26 @@ public abstract class InputFormatBase> columnFamilyColumnQualifierPairs) { @@ -353,7 +380,10 @@ public abstract class InputFormatBase getRanges(Configuration conf) throws IOException { ArrayList ranges = new ArrayList(); for (String rangeString : conf.getStringCollection(RANGES)) { @@ -626,13 +731,10 @@ public abstract class InputFormatBase> getFetchedColumns(Configuration conf) { Set> columns = new HashSet>(); for (String col : conf.getStringCollection(COLUMNS)) { @@ -686,6 +796,14 @@ public abstract class InputFormatBase getIterators(Configuration conf) { String iterators = conf.get(ITERATORS); @@ -780,7 +926,6 @@ public abstract class InputFormatBase getIteratorOptions(Configuration conf) { String iteratorOptions = conf.get(ITERATORS_OPTIONS); @@ -812,7 +964,9 @@ public abstract class InputFormatBase iterators = getIterators(conf); List options = getIteratorOptions(conf); @@ -869,7 +1027,6 @@ public abstract class InputFormatBase getSplits(JobContext job) throws IOException { log.setLevel(getLogLevel(job.getConfiguration())); Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java Tue Mar 6 19:18:06 2012 @@ -382,11 +382,10 @@ public class IntersectingIterator implem private static final String notFlagOptionName = "notFlag"; /** - * to be made protected - * * @param columns * @return encoded columns - * @deprecated since 1.4 {@link #setColumnFamilies(IteratorSetting, Text[] columns)} + * @deprecated since 1.4. To be made protected. Do not interact with flags string directly, just use + * {@link #setColumnFamilies(IteratorSetting, Text[], boolean[])}. */ public static String encodeColumns(Text[] columns) { StringBuilder sb = new StringBuilder(); @@ -398,11 +397,10 @@ public class IntersectingIterator implem } /** - * to be made protected - * * @param flags * @return encoded flags - * @deprecated since 1.4 {@link #setColumnFamilies(IteratorSetting, Text[] columns, boolean[] flags)} + * @deprecated since 1.4. To be made protected. Do not interact with flags string directly, just use + * {@link #setColumnFamilies(IteratorSetting, Text[], boolean[])}. */ public static String encodeBooleans(boolean[] flags) { byte[] bytes = new byte[flags.length]; @@ -429,7 +427,8 @@ public class IntersectingIterator implem * * @param flags * @return decoded flags - * @deprecated since 1.4 + * @deprecated since 1.4. To be made protected. Do not interact with flags string directly, just use + * {@link #setColumnFamilies(IteratorSetting, Text[], boolean[])}. */ public static boolean[] decodeBooleans(String flags) { // return null of there were no flags Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectCommand.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectCommand.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectCommand.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectCommand.java Tue Mar 6 19:18:06 2012 @@ -34,8 +34,9 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.hadoop.io.Text; -@Deprecated -// deprecated since 1.4 +/** + * @deprecated since 1.4, use {@code scan -r -c [:]} instead. + */ public class SelectCommand extends Command { private Option selectOptAuths, timestampOpt, disablePaginationOpt, tableOpt; @@ -44,8 +45,8 @@ public class SelectCommand extends Comma IOException { String tableName; - shellState.log.warn("select is deprecated, use 'scan -r -c [:]'"); - + Shell.log.warn("select is deprecated, use scan -r -c [:]'"); + if (cl.hasOption(tableOpt.getOpt())) { tableName = cl.getOptionValue(tableOpt.getOpt()); if (!shellState.getConnector().tableOperations().exists(tableName)) @@ -102,4 +103,4 @@ public class SelectCommand extends Comma public int numArgs() { return 3; } -} \ No newline at end of file +} Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectrowCommand.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectrowCommand.java?rev=1297657&r1=1297656&r2=1297657&view=diff ============================================================================== --- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectrowCommand.java (original) +++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SelectrowCommand.java Tue Mar 6 19:18:06 2012 @@ -32,8 +32,9 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.hadoop.io.Text; -@Deprecated -// deprecated since 1.4 +/** + * @deprecated since 1.4, use {@code scan -r } instead. + */ public class SelectrowCommand extends Command { private Option selectrowOptAuths, timestampOpt, disablePaginationOpt, tableOpt; @@ -43,8 +44,8 @@ public class SelectrowCommand extends Co String tableName; - shellState.log.warn("selectrow is deprecated, use 'scan -r '"); - + Shell.log.warn("selectrow is deprecated, use 'scan -r '"); + if (cl.hasOption(tableOpt.getOpt())) { tableName = cl.getOptionValue(tableOpt.getOpt()); if (!shellState.getConnector().tableOperations().exists(tableName)) @@ -103,4 +104,4 @@ public class SelectrowCommand extends Co public int numArgs() { return 1; } -} \ No newline at end of file +}