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/master Commit: 0ab78c648d894815734efe612bd6ce4b2f4037e5 Parents: 3ab5c3e aa5c921 Author: Eric Newton <[email protected]> Authored: Mon Jan 13 09:01:17 2014 -0500 Committer: Eric Newton <[email protected]> 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<Text> partitions = new TreeSet<Text>(); 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());
