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 2020/08/14 01:05:47 UTC

[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 <ct...@apache.org>
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<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
        Map<String,String> iteratorOptions, Range range, SortedMap<Key,Value> input) {
-     this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false);
 -    this(iteratorClass, iteratorOptions, range, input, Collections.<ByteSequence>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<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
+       Map<String,String> iteratorOptions, Range range, SortedMap<Key,Value> input,
+       IteratorEnvironment iterEnv) {
 -    this(iteratorClass, iteratorOptions, range, input, Collections.<ByteSequence>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<Key,Value> 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<Key,Value> copy1 = skvi.deepCopy(new SimpleIteratorEnvironment());
-       SortedKeyValueIterator<Key,Value> copy2 = copy1.deepCopy(new SimpleIteratorEnvironment());
+       SortedKeyValueIterator<Key,Value> copy1 = skvi.deepCopy(iteratorEnvironment);
+       SortedKeyValueIterator<Key,Value> copy2 = copy1.deepCopy(iteratorEnvironment);
  
        Range seekRange = testInput.getRange();
        Collection<ByteSequence> 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<Key,Value> source = IteratorTestUtil.createSource(testInput);
  
      try {
-       skvi.init(source, testInput.getIteratorOptions(), new SimpleIteratorEnvironment());
+       skvi.init(source, testInput.getIteratorOptions(), testInput.getIteratorEnvironment());
  
        YieldCallback<Key> yield = new YieldCallback<>();
 -      if (skvi instanceof YieldingKeyValueIterator) {
 -        ((YieldingKeyValueIterator<Key,Value>) skvi).enableYielding(yield);
 -      }
 +      skvi.enableYielding(yield);
  
        skvi.seek(testInput.getRange(), testInput.getFamilies(), testInput.isInclusive());
        return new IteratorTestOutput(consume(testInput, skvi, yield));