You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2015/04/30 19:43:42 UTC
[06/25] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6
Conflicts:
core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
server/src/main/java/org/apache/accumulo/server/master/Master.java
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b636ff2c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b636ff2c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b636ff2c
Branch: refs/heads/master
Commit: b636ff2cc614f8112207d369acd38a83770397e3
Parents: 67c8b2b e395bc8
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Apr 30 12:10:44 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Apr 30 12:10:44 2015 -0400
----------------------------------------------------------------------
.../core/iterators/AggregatingIterator.java | 18 ++++++++++--------
.../aggregation/conf/AggregatorConfiguration.java | 3 +--
.../iterators/aggregation/conf/AggregatorSet.java | 7 +++----
.../util/shell/commands/AddSplitsCommand.java | 17 ++++++++++++-----
.../core/iterators/AggregatingIteratorTest.java | 6 ++++--
.../conf/AggregatorConfigurationTest.java | 13 ++++++++-----
6 files changed, 38 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/b636ff2c/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
index fd5525b,13b2710..eb45fac
--- a/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
@@@ -168,10 -168,8 +169,11 @@@ public class AggregatingIterator implem
this.iterator = source;
try {
+ String context = null;
+ if (null != env)
+ context = env.getConfig().get(Property.TABLE_CLASSPATH);
- this.aggregators = new ColumnToClassMapping<Aggregator>(options, Aggregator.class, context);
+ this.aggregators = new ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator>(options,
- org.apache.accumulo.core.iterators.aggregation.Aggregator.class);
++ org.apache.accumulo.core.iterators.aggregation.Aggregator.class, context);
} catch (ClassNotFoundException e) {
log.error(e.toString());
throw new IllegalArgumentException(e);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/b636ff2c/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
index c874cc8,37798b0..d6545ac
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
@@@ -27,9 -25,9 +26,9 @@@ import org.apache.accumulo.core.iterato
* @deprecated since 1.4
*/
@Deprecated
- public class AggregatorSet extends ColumnToClassMapping<Aggregator> {
+ public class AggregatorSet extends ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator> {
- public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+ public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException {
- super(opts, Aggregator.class);
+ super(opts, org.apache.accumulo.core.iterators.aggregation.Aggregator.class);
}
public AggregatorSet() {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/b636ff2c/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
index efbbcbe,c88171a..18298dd
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
@@@ -45,14 -45,20 +45,21 @@@ public class AddSplitsCommand extends C
final String f = cl.getOptionValue(optSplitsFile.getOpt());
String line;
- java.util.Scanner file = new java.util.Scanner(new File(f), UTF_8.name());
- while (file.hasNextLine()) {
- line = file.nextLine();
- if (!line.isEmpty()) {
- splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new Text(line));
+ java.util.Scanner file = null;
+ try {
+ file = new java.util.Scanner(new File(f), UTF_8.name());
+ while (file.hasNextLine()) {
+ line = file.nextLine();
+ if (!line.isEmpty()) {
+ splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new Text(line));
+ }
+ }
+ } finally {
+ if (file != null) {
+ file.close();
}
}
+ file.close();
} else {
if (cl.getArgList().isEmpty()) {
throw new MissingArgumentException("No split points specified");