Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6AFD617FE9 for ; Thu, 19 Nov 2015 18:56:59 +0000 (UTC) Received: (qmail 11312 invoked by uid 500); 19 Nov 2015 18:56:59 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 11271 invoked by uid 500); 19 Nov 2015 18:56:59 -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 11260 invoked by uid 99); 19 Nov 2015 18:56:59 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 18:56:59 +0000 Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com [209.85.160.177]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id F3E691A00D5 for ; Thu, 19 Nov 2015 18:56:58 +0000 (UTC) Received: by ykfs79 with SMTP id s79so122246214ykf.1 for ; Thu, 19 Nov 2015 10:56:57 -0800 (PST) X-Received: by 10.13.252.196 with SMTP id m187mr8350698ywf.136.1447959417858; Thu, 19 Nov 2015 10:56:57 -0800 (PST) MIME-Version: 1.0 References: <1447786817388-15586.post@n5.nabble.com> <1447795370371-15587.post@n5.nabble.com> <564BA1B1.3060904@gmail.com> <1447946111053-15598.post@n5.nabble.com> <1447954980608-15600.post@n5.nabble.com> In-Reply-To: <1447954980608-15600.post@n5.nabble.com> From: Christopher Date: Thu, 19 Nov 2015 18:56:48 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: hasNext throws weird exception To: dev@accumulo.apache.org Content-Type: multipart/alternative; boundary=94eb2c064ab4c034880524e952b1 --94eb2c064ab4c034880524e952b1 Content-Type: text/plain; charset=UTF-8 When you call the iterator method on a scanner, Accumulo instantiates a bunch of internal data structures that are specific to that iterator/query. Scanner is basically a configuration object which has iterator as a factory method. The iterator is really what does the query work. Calling iterator multiple times creates multiple, independent queries. On Thu, Nov 19, 2015, 12:44 z11373 wrote: > Thanks Christopher! What are those separate iterations? The scanner object > was not shared (besides it's only single thread), and also my test app is > the only client app running at that time. > I am just curious, however, the code you suggested is a good practice, and > I'll keep in mind. > > Thanks, > Z > > > > -- > View this message in context: > http://apache-accumulo.1065345.n5.nabble.com/hasNext-throws-weird-exception-tp15586p15600.html > Sent from the Developers mailing list archive at Nabble.com. > --94eb2c064ab4c034880524e952b1--