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 4D81710278 for ; Mon, 13 Jan 2014 15:17:14 +0000 (UTC) Received: (qmail 59774 invoked by uid 500); 13 Jan 2014 14:03:08 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 59404 invoked by uid 500); 13 Jan 2014 14:02:21 -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 59163 invoked by uid 99); 13 Jan 2014 14:01:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2014 14:01:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CDFC7919CF4; Mon, 13 Jan 2014 14:01:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ecn@apache.org To: commits@accumulo.apache.org Date: Mon, 13 Jan 2014 14:01:45 -0000 Message-Id: In-Reply-To: <2f4e45af635e435b9e2b1fb32bbb18c1@git.apache.org> References: <2f4e45af635e435b9e2b1fb32bbb18c1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0ab78c64 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0ab78c64 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0ab78c64 Branch: refs/heads/1.6.0-SNAPSHOT Commit: 0ab78c648d894815734efe612bd6ce4b2f4037e5 Parents: 3ab5c3e aa5c921 Author: Eric Newton Authored: Mon Jan 13 09:01:17 2014 -0500 Committer: Eric Newton Committed: Mon Jan 13 09:01:17 2014 -0500 ---------------------------------------------------------------------- .../core/util/shell/commands/CreateTableCommand.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ab78c64/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java ---------------------------------------------------------------------- diff --cc core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java index 96d8b13,c439909..1d6640a --- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java +++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java @@@ -73,17 -69,20 +73,20 @@@ public class CreateTableCommand extend } final SortedSet partitions = new TreeSet(); final boolean decode = cl.hasOption(base64Opt.getOpt()); - + if (cl.hasOption(createTableOptSplit.getOpt())) { final String f = cl.getOptionValue(createTableOptSplit.getOpt()); - + String line; Scanner file = new Scanner(new File(f)); - while (file.hasNextLine()) { - line = file.nextLine(); - if (!line.isEmpty()) { - partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line)); + try { + while (file.hasNextLine()) { + line = file.nextLine(); + if (!line.isEmpty()) + partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line)); } + } finally { + file.close(); } } else if (cl.hasOption(createTableOptCopySplits.getOpt())) { final String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());