[accumulo] branch main updated (a165264 -> e7cc0d3)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git. from a165264 Merge branch '1.9' into main add c581c43 Support IteratorEnvironment in test harness (#1681) new e7cc0d3 Merge branch '1.10' into main The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../accumulo/iteratortest/IteratorTestInput.java | 41 -- .../iteratortest/testcases/DeepCopyTestCase.java | 5 ++- .../testcases/IsolatedDeepCopiesTestCase.java | 18 +- .../testcases/MultipleHasTopCalls.java | 3 +- .../iteratortest/testcases/ReSeekTestCase.java | 5 ++- .../iteratortest/testcases/YieldingTestCase.java | 3 +- .../test/iterator/SummingCombinerTest.java | 10 +- 7 files changed, 62 insertions(+), 23 deletions(-)
[accumulo] 01/01: Merge branch '1.10' into main
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git commit e7cc0d35717b099a38542a111bbd5be839302676 Merge: a165264 c581c43 Author: Christopher Tubbs AuthorDate: Thu Aug 13 21:05:30 2020 -0400 Merge branch '1.10' into main .../accumulo/iteratortest/IteratorTestInput.java | 41 -- .../iteratortest/testcases/DeepCopyTestCase.java | 5 ++- .../testcases/IsolatedDeepCopiesTestCase.java | 18 +- .../testcases/MultipleHasTopCalls.java | 3 +- .../iteratortest/testcases/ReSeekTestCase.java | 5 ++- .../iteratortest/testcases/YieldingTestCase.java | 3 +- .../test/iterator/SummingCombinerTest.java | 10 +- 7 files changed, 62 insertions(+), 23 deletions(-) diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java index 05c42aa,32f0a87..5630f64 --- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java +++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java @@@ -61,7 -62,31 +64,31 @@@ public class IteratorTestInput */ public IteratorTestInput(Class> iteratorClass, Map iteratorOptions, Range range, SortedMap input) { - this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false); -this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, ++this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, + new SimpleIteratorEnvironment()); + } + + /** +* Construct an instance of the test input. +* +* @param iteratorClass +* The class for the iterator to test. +* @param iteratorOptions +* Options, if any, to provide to the iterator ({@link IteratorSetting}'s Map of +* properties). +* @param range +* The Range of data to query ({@link Scanner#setRange(Range)}). By default no column +* families filter is specified. +* @param input +* A sorted collection of Key-Value pairs acting as the table. +* @param iterEnv +* A provided {@link IteratorEnvironment}. +*/ + public IteratorTestInput(Class> iteratorClass, + Map iteratorOptions, Range range, SortedMap input, + IteratorEnvironment iterEnv) { -this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, ++this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, + requireNonNull(iterEnv)); } /** diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java index 98fea67,1cf199f..ba86ff8 --- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java +++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java @@@ -52,10 -49,11 +52,11 @@@ public class IsolatedDeepCopiesTestCas final SortedKeyValueIterator source = IteratorTestUtil.createSource(testInput); try { - skvi.init(source, testInput.getIteratorOptions(), new SimpleIteratorEnvironment()); - IteratorEnvironment iteratorEnvironment = testInput.getIteratorEnvironment(); ++ var iteratorEnvironment = testInput.getIteratorEnvironment(); + skvi.init(source, testInput.getIteratorOptions(), iteratorEnvironment); - SortedKeyValueIterator copy1 = skvi.deepCopy(new SimpleIteratorEnvironment()); - SortedKeyValueIterator copy2 = copy1.deepCopy(new SimpleIteratorEnvironment()); + SortedKeyValueIterator copy1 = skvi.deepCopy(iteratorEnvironment); + SortedKeyValueIterator copy2 = copy1.deepCopy(iteratorEnvironment); Range seekRange = testInput.getRange(); Collection seekColumnFamilies = testInput.getFamilies(); diff --cc iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/YieldingTestCase.java index d2f2ef7,392770d..ea20b32 --- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/YieldingTestCase.java +++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/YieldingTestCase.java @@@ -46,10 -44,12 +45,10 @@@ public class YieldingTestCase extends O final SortedKeyValueIterator source = IteratorTestUtil.createSource(testInput); try { - skvi.init(source, testInput.getIteratorOptions(), new SimpleIteratorEnvironment()); + skvi.init(source, testInput.getIteratorOptions(), testInput.getIteratorEnvironment()); YieldCallback yield = new YieldCallback<>(); - if (skvi instanceof YieldingKeyValueIterator) { -((YieldingKeyValueIterator) skvi).enableYielding(yield); - } +
[accumulo] branch 1.10 updated: Support IteratorEnvironment in test harness (#1681)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 1.10 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.10 by this push: new c581c43 Support IteratorEnvironment in test harness (#1681) c581c43 is described below commit c581c43c6baaac758ed0f2c5cd8cab60be12f60e Author: Christopher Tubbs AuthorDate: Thu Aug 13 20:57:35 2020 -0400 Support IteratorEnvironment in test harness (#1681) * Adds the ability to provide a custom IteratorEnvironment to the iterator-test-harness * This fixes a test failure in SummingCombinerTest caused by recent changes to Combiner in #1680 --- .../accumulo/iteratortest/IteratorTestInput.java | 41 -- .../iteratortest/testcases/DeepCopyTestCase.java | 5 ++- .../testcases/IsolatedDeepCopiesTestCase.java | 18 +- .../testcases/MultipleHasTopCalls.java | 3 +- .../iteratortest/testcases/ReSeekTestCase.java | 5 ++- .../iteratortest/testcases/YieldingTestCase.java | 3 +- .../test/iterator/SummingCombinerTest.java | 10 +- 7 files changed, 62 insertions(+), 23 deletions(-) diff --git a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java index 617cb46..32f0a87 100644 --- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java +++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java @@ -29,7 +29,9 @@ import org.apache.accumulo.core.data.ByteSequence; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.iterators.IteratorEnvironment; import org.apache.accumulo.core.iterators.SortedKeyValueIterator; +import org.apache.accumulo.iteratortest.environments.SimpleIteratorEnvironment; /** * The necessary user-input to invoke a test on a {@link SortedKeyValueIterator}. @@ -42,9 +44,10 @@ public class IteratorTestInput { private final Collection families; private final boolean inclusive; private final SortedMap input; + private final IteratorEnvironment iteratorEnvironment; /** - * Construct an instance of the test input. + * Construct an instance of the test input, using {@link SimpleIteratorEnvironment}. * * @param iteratorClass * The class for the iterator to test. @@ -59,7 +62,31 @@ public class IteratorTestInput { */ public IteratorTestInput(Class> iteratorClass, Map iteratorOptions, Range range, SortedMap input) { -this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false); +this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, +new SimpleIteratorEnvironment()); + } + + /** + * Construct an instance of the test input. + * + * @param iteratorClass + * The class for the iterator to test. + * @param iteratorOptions + * Options, if any, to provide to the iterator ({@link IteratorSetting}'s Map of + * properties). + * @param range + * The Range of data to query ({@link Scanner#setRange(Range)}). By default no column + * families filter is specified. + * @param input + * A sorted collection of Key-Value pairs acting as the table. + * @param iterEnv + * A provided {@link IteratorEnvironment}. + */ + public IteratorTestInput(Class> iteratorClass, + Map iteratorOptions, Range range, SortedMap input, + IteratorEnvironment iterEnv) { +this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false, +requireNonNull(iterEnv)); } /** @@ -78,10 +105,13 @@ public class IteratorTestInput { * Column families passed to {@link SortedKeyValueIterator#seek}. * @param inclusive * Whether the families are inclusive or exclusive. + * @param iterEnv + * An optional provided {@link IteratorEnvironment}. {@link SimpleIteratorEnvironment} + * will be used if null. */ public IteratorTestInput(Class> iteratorClass, Map iteratorOptions, Range range, SortedMap input, - Collection families, boolean inclusive) { + Collection families, boolean inclusive, IteratorEnvironment iterEnv) { // Already immutable this.iteratorClass = requireNonNull(iteratorClass); // Make it immutable to the test @@ -92,6 +122,7 @@ public class IteratorTestInput { this.input = Collections.unmodifiableSortedMap((requireNonNull(input))); this.families = Collections.unmodifiableCollection(requireNonNull(families)); this.inclusive = inclusive; +this.iteratorEnvironment = iterEnv == null ? new
[accumulo] branch 1.10 created (now e3a14cd)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch 1.10 in repository https://gitbox.apache.org/repos/asf/accumulo.git. at e3a14cd Modify Combiner init method to honor all options. Fixes #1678 (#1680) No new revisions were added by this update.
[accumulo] branch main updated (5815bf6 -> a165264)
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git. from 5815bf6 Make CI build on more branches (#1671) add e3a14cd Modify Combiner init method to honor all options. Fixes #1678 (#1680) new a165264 Merge branch '1.9' into main The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/accumulo/core/iterators/Combiner.java | 16 1 file changed, 8 insertions(+), 8 deletions(-)
[accumulo] 01/01: Merge branch '1.9' into main
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git commit a165264e714e01329af41954b00d0217e982dfce Merge: 5815bf6 e3a14cd Author: Mike Miller AuthorDate: Thu Aug 13 08:12:31 2020 -0400 Merge branch '1.9' into main .../org/apache/accumulo/core/iterators/Combiner.java | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --cc core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java index 6581195,7e24f88..c943a8e --- a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java +++ b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java @@@ -277,18 -278,18 +277,18 @@@ public abstract class Combiner extends combineAllColumns = false; if (options.containsKey(ALL_OPTION)) { combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION)); - if (combineAllColumns) - return; } - if (!options.containsKey(COLUMNS_OPTION)) - throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); + if (!combineAllColumns) { + if (!options.containsKey(COLUMNS_OPTION)) + throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); - String encodedColumns = options.get(COLUMNS_OPTION); - if (encodedColumns.isEmpty()) - throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); + String encodedColumns = options.get(COLUMNS_OPTION); - if (encodedColumns.length() == 0) ++ if (encodedColumns.isEmpty()) + throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); - combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); + combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); + } isMajorCompaction = env.getIteratorScope() == IteratorScope.majc;
[accumulo] branch 1.9 updated: Modify Combiner init method to honor all options. Fixes #1678 (#1680)
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a commit to branch 1.9 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.9 by this push: new e3a14cd Modify Combiner init method to honor all options. Fixes #1678 (#1680) e3a14cd is described below commit e3a14cd083848917b1f3f739eb79e6ea65a3e704 Author: Mike Miller AuthorDate: Thu Aug 13 08:06:47 2020 -0400 Modify Combiner init method to honor all options. Fixes #1678 (#1680) --- .../org/apache/accumulo/core/iterators/Combiner.java | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java index 9a94216..7e24f88 100644 --- a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java +++ b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java @@ -278,18 +278,18 @@ public abstract class Combiner extends WrappingIterator implements OptionDescrib combineAllColumns = false; if (options.containsKey(ALL_OPTION)) { combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION)); - if (combineAllColumns) -return; } -if (!options.containsKey(COLUMNS_OPTION)) - throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); +if (!combineAllColumns) { + if (!options.containsKey(COLUMNS_OPTION)) +throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option"); -String encodedColumns = options.get(COLUMNS_OPTION); -if (encodedColumns.length() == 0) - throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); + String encodedColumns = options.get(COLUMNS_OPTION); + if (encodedColumns.length() == 0) +throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty"); -combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); + combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); +} isMajorCompaction = env.getIteratorScope() == IteratorScope.majc;