Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 092E3200B9D for ; Thu, 13 Oct 2016 18:38:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 07EA3160AE4; Thu, 13 Oct 2016 16:38:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5185D160AD2 for ; Thu, 13 Oct 2016 18:38:39 +0200 (CEST) Received: (qmail 35868 invoked by uid 500); 13 Oct 2016 16:38:38 -0000 Mailing-List: contact dev-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 dev@accumulo.apache.org Received: (qmail 35853 invoked by uid 99); 13 Oct 2016 16:38:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 16:38:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7E9AE04AF; Thu, 13 Oct 2016 16:38:37 +0000 (UTC) From: ctubbsii To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #159: ACCUMULO-1280: many changes for closing iterator... Content-Type: text/plain Message-Id: <20161013163837.D7E9AE04AF@git1-us-west.apache.org> Date: Thu, 13 Oct 2016 16:38:37 +0000 (UTC) archived-at: Thu, 13 Oct 2016 16:38:40 -0000 Github user ctubbsii commented on a diff in the pull request: https://github.com/apache/accumulo/pull/159#discussion_r83258841 --- Diff: core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java --- @@ -257,26 +257,19 @@ public void setSource(final Scanner scanner) { tm.put(iterInfo.getPriority(), iterInfo); } - SortedKeyValueIterator skvi; - try { - skvi = IteratorUtil.loadIterators(smi, tm.values(), serverSideIteratorOptions, new ClientSideIteratorEnvironment(getSamplerConfiguration() != null, - getIteratorSamplerConfigurationInternal()), false, null); - } catch (IOException e) { - throw new RuntimeException(e); - } + try (SortedKeyValueIterator skvi = IteratorUtil.loadIterators(smi, tm.values(), serverSideIteratorOptions, new ClientSideIteratorEnvironment( + getSamplerConfiguration() != null, getIteratorSamplerConfigurationInternal()), false, null)) { - final Set colfs = new TreeSet<>(); - for (Column c : this.getFetchedColumns()) { - colfs.add(new ArrayByteSequence(c.getColumnFamily())); - } + final Set colfs = new TreeSet<>(); + for (Column c : this.getFetchedColumns()) { + colfs.add(new ArrayByteSequence(c.getColumnFamily())); + } - try { skvi.seek(range, colfs, true); - } catch (IOException e) { + return new IteratorAdapter(skvi); + } catch (Exception e) { --- End diff -- Quick fix is to just put a `} catch (RuntimeException e) { throw e; }` bit above the catch-all for `Exception`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---