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

Improve isTableState() method to ensure caller gets correct info

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 3.0.0-alpha-1, 1.3.0, 2.0.0
    • None
    • None
    • None

    Description

       

      public boolean isTableState(TableName tableName, TableState.State... states) {
       try {
       TableState tableState = getTableState(tableName);
       return tableState.isInStates(states);
       } catch (IOException e) {
       LOG.error("Unable to get table " + tableName + " state", e);
       // XXX: is it safe to just return false here?
       return false;
       }
       }
       
      

       

      When cannot get table state, returning false is not always safe or correct.

      Attachments

        1. HBASE-21066.master.001.patch
          6 kB
          Xu Cang
        2. HBASE-21066.master.002.patch
          6 kB
          Xu Cang

        Activity

          People

            Unassigned Unassigned
            xucang Xu Cang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: