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:46 UTC

[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

Posted by ct...@apache.org.
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));