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
        9 kB
        Drew Farris
      2. ACCUMULO-795.patch
        9 kB
        Drew Farris
      3. ACCUMULO-795.patch
        4 kB
        Drew Farris
      4. ACCUMULO-795.patch
        5 kB
        Drew Farris
      5. ACCUMULO-795.patch
        3 kB
        Drew Farris

        Activity

        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.
        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.
        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.
        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
        Hide
        Drew Farris added a comment -

        One more time...

        Show
        Drew Farris added a comment - One more time...

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development