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

Avoid passing null in Admin methods

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.2.0, 2.3.0
    • Admin
    • None
    • Reviewed
    • Hide
      Introduced these methods:
      void move(byte[]);
      void move(byte[], ServerName);
      Future<Void> splitRegionAsync(byte[]);

      These methods are deprecated:
      void move(byte[], byte[])
      Show
      Introduced these methods: void move(byte[]); void move(byte[], ServerName); Future<Void> splitRegionAsync(byte[]); These methods are deprecated: void move(byte[], byte[])

    Description

      For some methods we must pass null if we want specific behaviors, for example, move region to a random server, split region without providing an explicit split point, etc.

      We should provide methods without some parameters so user do not need to pass null.

      So in the future users do not need to guess whether a method accept null parameters, the answer is always no.

      Attachments

        1. HBASE-22108.patch
          59 kB
          Duo Zhang
        2. HBASE-22108-v1.patch
          60 kB
          Duo Zhang
        3. HBASE-22108-branch-2.patch
          58 kB
          Duo Zhang
        4. HBASE-22108-branch-2.patch
          58 kB
          Duo Zhang
        5. HBASE-22108-branch-2.patch
          58 kB
          Duo Zhang

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: