accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milleruntime <...@git.apache.org>
Subject [GitHub] accumulo pull request #159: ACCUMULO-1280: many changes for closing iterator...
Date Thu, 13 Oct 2016 17:55:33 GMT
Github user milleruntime commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/159#discussion_r83274406
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java ---
    @@ -249,4 +268,9 @@ final public boolean hasTop() {
       public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String>
options, IteratorEnvironment env) throws IOException {
         throw new UnsupportedOperationException();
       }
    +
    +  @Override
    +  public void close() throws Exception {
    +    sources.forEach(s -> s.closeSafely());
    +  }
    --- End diff --
    
    I agree.  My original thinking was to define closeSafely in the interface for coveinent
use with Java 1.8.  But you are right, having multiple sources is a special case so it shouldn't
be in the interface.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message