Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3181

VolumeChooser usage doesn't always comply with implied API contract

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 1.6.1
    • Fix Version/s: 1.6.2, 1.7.0
    • Component/s: None
    • Labels:

      Description

      The VolumeChooser interface accepts a String array of "options" to choose from. This method has no javadoc to explicitly declare what "options" mean, but given the name of the class, and its intended purpose, derived from its usage, it appears that the Strings it receives should represent volumes.

      However, some of the current usage is a bit lax in its parameter passing. In some cases, what is passed are not volumes at all, but volumes concatenated with some path. This works for the RandomVolumeChooser provided, but it should not be expected to work for any arbitrary implementation.

      The use of this API should consider the parameter to strictly be an array of volumes (or Strings, representing volumes), since it's not a "PathChooser". Any concatenation of path elements should be done outside the chooser, so we can define the API contract explicitly. That means that some of the current usage should be altered to concatenate path elements after the choose method returns.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hustjl22 Jenna Huston
                Reporter:
                ctubbsii Christopher Tubbs
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m