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 CFD1BB1EF for ; Tue, 10 Jan 2012 22:05:15 +0000 (UTC) Received: (qmail 4607 invoked by uid 500); 10 Jan 2012 22:05:15 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 4580 invoked by uid 500); 10 Jan 2012 22:05:15 -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 4573 invoked by uid 99); 10 Jan 2012 22:05:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 22:05:15 +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; Tue, 10 Jan 2012 22:05:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BDB2423888CD; Tue, 10 Jan 2012 22:04:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1229758 - /incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java Date: Tue, 10 Jan 2012 22:04:51 -0000 To: accumulo-commits@incubator.apache.org From: kturner@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120110220451.BDB2423888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kturner Date: Tue Jan 10 22:04:51 2012 New Revision: 1229758 URL: http://svn.apache.org/viewvc?rev=1229758&view=rev Log: ACCUMULO-301 made intersecting iterator fail on client side when specifying less than two terms Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java 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=1229758&r1=1229757&r2=1229758&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 Jan 10 22:04:51 2012 @@ -541,6 +541,8 @@ public class IntersectingIterator implem * @param columns */ public static void setColumnFamilies(IteratorSetting cfg, Text[] columns) { + if (columns.length < 2) + throw new IllegalArgumentException("Must supply at least two terms to intersect"); cfg.addOption(IntersectingIterator.columnFamiliesOptionName, IntersectingIterator.encodeColumns(columns)); } @@ -552,6 +554,8 @@ public class IntersectingIterator implem * @param notFlags */ public static void setColumnFamilies(IteratorSetting cfg, Text[] columns, boolean[] notFlags) { + if (columns.length < 2) + throw new IllegalArgumentException("Must supply at least two terms to intersect"); if (columns.length != notFlags.length) throw new IllegalArgumentException("columns and notFlags arrays must be the same length"); setColumnFamilies(cfg, columns);