Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-431

RAMInputStream and RAMOutputStream without further buffering

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/store
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      36623
    • Lucene Fields:
      Patch Available

      Description

      From java-dev, Doug's reply of 12 Sep 2005
      on Delaying buffer allocation in BufferedIndexInput:

      Paul Elschot wrote:
      ...
      > I noticed that RAMIndexInput extends BufferedIndexInput.
      > It has all data in buffers already, so why is there another
      > layer of buffering?

      No good reason: it's historical.

      To avoid this either: (a) the BufferedIndexInput API would need to be
      modified to permit subclasses to supply the buffer; or (b)
      RAMInputStream could subclass IndexInput directly, using its own
      buffers. The latter would probably be simpler.

      End of quote.

      I made version (b) of RAMInputStream.
      Using this RAMInputStream, TestTermVectorsReader failed as the only
      failing test.

        Attachments

        1. ASF.LICENSE.NOT.GRANTED--RAMInputStream.java
          2 kB
          Paul Elschot
        2. lucene-431.patch
          10 kB
          Michael Busch
        3. lucene-431.zip
          4 kB
          Michael Busch

          Activity

            People

            • Assignee:
              michaelbusch Michael Busch
              Reporter:
              paul.elschot@xs4all.nl Paul Elschot
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: