Accumulo
  1. Accumulo
  2. ACCUMULO-795

MockTable doesn't obey useVersions parameter

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.1, 1.5.0
    • Fix Version/s: 1.4.2, 1.5.0
    • Component/s: test
    • Labels:

      Description

      The constructor for MockTable will call IteratorUtil.generateInitialTableProperties(), and thus set a versioning iterator on itself regardless of whether the useVersion parameter is set to true or false.

      I believe MockTable's constructor should call IteratorUtil.generateInitialTableProperties() only if useVersions is true, otherwise, it should populate settings with a new TreeMap

      1. ACCUMULO-795.patch
        3 kB
        Drew Farris
      2. ACCUMULO-795.patch
        5 kB
        Drew Farris
      3. ACCUMULO-795.patch
        4 kB
        Drew Farris
      4. ACCUMULO-795.patch
        9 kB
        Drew Farris
      5. ACCUMULO-795.patch
        9 kB
        Drew Farris

        Activity

        Drew Farris created issue -
        Drew Farris made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12548421 ]
        Hide
        Keith Turner added a comment -

        I think the test should that creates a table w/o the versioning iterator should also insert some data that would normally be suppressed by the versioning iterator. Do this before attaching the iterator.

        Show
        Keith Turner added a comment - I think the test should that creates a table w/o the versioning iterator should also insert some data that would normally be suppressed by the versioning iterator. Do this before attaching the iterator.
        Hide
        Drew Farris added a comment -

        Updated unit test to validate absence/presence of VersioningIterator via insert and assert methods.

        Show
        Drew Farris added a comment - Updated unit test to validate absence/presence of VersioningIterator via insert and assert methods.
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12548672 ]
        Hide
        Drew Farris added a comment -

        Shuffled things around a bit – IteratorUtil.generateInitialTableProperties() now takes a boolean argument limitVersion what will cause the Versioning Iterator to be added to the table if true.

        This way, if we add additional default table properties, such as a Constraint that limits key size, we can add them here, and not worry about code calling generateInitialTableProperties or not.

        The general contract would be that generateInitialTableProperties is always called when a new table is created regardless of whether it is mock or real.

        Show
        Drew Farris added a comment - Shuffled things around a bit – IteratorUtil.generateInitialTableProperties() now takes a boolean argument limitVersion what will cause the Versioning Iterator to be added to the table if true. This way, if we add additional default table properties, such as a Constraint that limits key size, we can add them here, and not worry about code calling generateInitialTableProperties or not. The general contract would be that generateInitialTableProperties is always called when a new table is created regardless of whether it is mock or real.
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12548676 ]
        Hide
        Drew Farris added a comment -

        Uhh, with this unit tests in the patch this time.

        Show
        Drew Farris added a comment - Uhh, with this unit tests in the patch this time.
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12549024 ]
        Hide
        Drew Farris added a comment -

        Updated for latest revisions to 1.4.x

        Show
        Drew Farris added a comment - Updated for latest revisions to 1.4.x
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12549031 ]
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12549031 ]
        Hide
        Drew Farris added a comment -

        One more time...

        Show
        Drew Farris added a comment - One more time...
        Drew Farris made changes -
        Attachment ACCUMULO-795.patch [ 12549033 ]
        Drew Farris made changes -
        Labels hackathon
        Keith Turner made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee John Vines [ vines ] Drew Farris [ drew.farris ]
        Fix Version/s 1.5.0 [ 12318645 ]
        Fix Version/s 1.4.2 [ 12321843 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1m 10s 1 Drew Farris 09/Oct/12 17:05
        Patch Available Patch Available Resolved Resolved
        4d 3h 40m 1 Keith Turner 13/Oct/12 20:45

          People

          • Assignee:
            Drew Farris
            Reporter:
            Drew Farris
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development