Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21071

HBaseTestingUtility::startMiniCluster() to use builder pattern

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.2.0
    • 3.0.0-alpha-1, 2.2.0
    • test
    • Reviewed
    • Cleanup all the cluster start override combos in HBaseTestingUtility by adding a StartMiniClusterOption and Builder.

    Description

      Currently there are 13 startMiniCluster() methods to set up a mini cluster. I'm not surprised if we have a few more in future. It's good to support different combination of optional parameters. We have to pick up one of them carefully while still wondering the default values of other parameters; if we add a new option, we may bring more new methods.

      One solution is to use builder pattern: create a class MiniClusterOptions along with a static class MiniClusterOptionsBuilder, create a new method startMiniCluster(MiniClusterOptions). In master we delete the old 13 methods while in branch-2, we deprecate the old 13 methods.

      Thoughts?

      Attachments

        1. HBASE-21071.006.patch
          123 kB
          Mingliang Liu
        2. HBASE-21071.006.patch
          123 kB
          Michael Stack
        3. HBASE-21071.006.patch
          123 kB
          Michael Stack
        4. HBASE-21071.006.patch
          123 kB
          Michael Stack
        5. HBASE-21071.006.patch
          123 kB
          Michael Stack
        6. HBASE-21071.branch-2.006.patch
          120 kB
          Mingliang Liu
        7. HBASE-21071.006.patch
          123 kB
          Mingliang Liu
        8. HBASE-21071.005.patch
          123 kB
          Mingliang Liu
        9. HBASE-21071.004.patch
          39 kB
          Mingliang Liu
        10. HBASE-21071.003.patch
          108 kB
          Mingliang Liu
        11. HBASE-21071.002.patch
          108 kB
          Mingliang Liu
        12. HBASE-21071.001.patch
          60 kB
          Mingliang Liu
        13. HBASE-21071.000.patch
          60 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: