Accumulo
  1. Accumulo
  2. ACCUMULO-1505

MockTable's addMutation does not check for empty mutation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.3
    • Fix Version/s: 1.4.4, 1.5.1, 1.6.0
    • Component/s: client
    • Labels:
      None

      Description

      When calling addMutation or addMutations on a MockBatchWriter, the updates stored in the mutation are iterated over then committed in the MockTable class.

      When this occurs in the TabletServerBatchWriter (eventually called from the BatchWriterImpl), however, the mutation size is first checked and if the mutation size is 0, an IllegalArgumentException is thrown.

      In practice, if you have code that tries to submit an empty mutation to a BatchWriter, it will fail and throw an exception in the real world, but this will not be caught in tests against MockAccumulo.

        Activity

        Hide
        Ryan Leary added a comment -

        Added fixes to check for null mutation/mutation iterables as well as empty mutations. Adds unit test for these cases.

        Show
        Ryan Leary added a comment - Added fixes to check for null mutation/mutation iterables as well as empty mutations. Adds unit test for these cases.
        Hide
        ASF subversion and git services added a comment -

        Commit 1491900 from John Vines
        [ https://svn.apache.org/r1491900 ]

        ACCUMULO-1505 - Applying Ryan Leary's patch

        Show
        ASF subversion and git services added a comment - Commit 1491900 from John Vines [ https://svn.apache.org/r1491900 ] ACCUMULO-1505 - Applying Ryan Leary's patch
        Hide
        ASF subversion and git services added a comment -

        Commit 1491910 from John Vines
        [ https://svn.apache.org/r1491910 ]

        ACCUMULO-1505 - fixing up some warnings in the patch

        Show
        ASF subversion and git services added a comment - Commit 1491910 from John Vines [ https://svn.apache.org/r1491910 ] ACCUMULO-1505 - fixing up some warnings in the patch
        Hide
        ASF subversion and git services added a comment -

        Commit 1491911 from John Vines
        [ https://svn.apache.org/r1491911 ]

        ACCUMULO-1505 - merging Ryan Leary's patch, with modifications to update and remove warnings

        Show
        ASF subversion and git services added a comment - Commit 1491911 from John Vines [ https://svn.apache.org/r1491911 ] ACCUMULO-1505 - merging Ryan Leary's patch, with modifications to update and remove warnings
        Hide
        ASF subversion and git services added a comment -

        Commit 1491912 from John Vines
        [ https://svn.apache.org/r1491912 ]

        ACCUMULO-1505 - Ryan Leary's patch with updates/warning busting

        Show
        ASF subversion and git services added a comment - Commit 1491912 from John Vines [ https://svn.apache.org/r1491912 ] ACCUMULO-1505 - Ryan Leary's patch with updates/warning busting
        Hide
        John Vines added a comment -

        Looks good. I went ahead and applied it to 1.4.4, 1.5.1, and 1.6.0. There was a typing warning from the use of Collection.EMPTY_LIST that I fixed. Additionally, updated it to use the new APIs for 1.5.0+.

        I also added you as a contributor, Ryan. Thanks again!

        Show
        John Vines added a comment - Looks good. I went ahead and applied it to 1.4.4, 1.5.1, and 1.6.0. There was a typing warning from the use of Collection.EMPTY_LIST that I fixed. Additionally, updated it to use the new APIs for 1.5.0+. I also added you as a contributor, Ryan. Thanks again!

          People

          • Assignee:
            Ryan Leary
            Reporter:
            Ryan Leary
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development