Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-685

IStriterator does not support close() protocol for IFilter/IFilterTest

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: BIGDATA_RELEASE_1_2_1
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
      None

      Description

      The IStriterator protocol does not support a close() method for IFilters. IFilter#close() should be declared and that method should be invoked by an ICloseableIterator. (The changes should probably touch both IFilter and IFilterTest)

      The only effected class of which I am currently aware is the NativeDistinctFilter.DistinctFilterImpl inner class. That class now implements a close() method so it will be automatically hooked once this ticket is addressed.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        Striterator implements ICloseableIterator. There are unit tests for this (TestCloseable).

        IStriterator should extend ICloseableiterator.

        The FilterBase class needs to test the wrapped iterators to see if they implement ICloseable(Iterator) and then invoke close() on them if they do.

        Filters that have internal state should discard it when they are close()d.

        close() needs to be safe even if an iterator has already been closed. closed iterators can not visit any more elements.

        The iterator pattern is NOT thread safe, so mutations for close() may be assumed to be in the same thread as the methods calling hasNext() and next().

        Show
        bryanthompson bryanthompson added a comment - Striterator implements ICloseableIterator. There are unit tests for this (TestCloseable). IStriterator should extend ICloseableiterator. The FilterBase class needs to test the wrapped iterators to see if they implement ICloseable(Iterator) and then invoke close() on them if they do. Filters that have internal state should discard it when they are close()d. close() needs to be safe even if an iterator has already been closed. closed iterators can not visit any more elements. The iterator pattern is NOT thread safe, so mutations for close() may be assumed to be in the same thread as the methods calling hasNext() and next().

          People

          • Assignee:
            martyncutcher martyncutcher
            Reporter:
            bryanthompson bryanthompson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: