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

Deprecate HTable#batch(final List<? extends Row>)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.0, 0.99.0
    • None
    • None
    • Reviewed

    Description

      This was brought up by Amit's inquiry on mailing list, entitled 'Batch returned value and exception handling'

      Here is his sample code:

      Object[] res = null;
      try {
        res = table.batch(batch);
      } catch (RetriesExhaustedWithDetailsException retriesExhaustedWithDetailsException) {
        retriesExhaustedWithDetailsException.printStackTrace();
      }
      if (res == null) {
        System.out.println("No results - returned null.");
      }
      

      When RetriesExhaustedWithDetailsException was thrown from batch() call, variable res carried value of null.
      Meaning user wouldn't get partial result along with the exception.

      We should deprecate

      HTable#batch(final List<? extends Row>)

      and refer to the following method:

      void batch(final List<?extends Row> actions, final Object[] results) throws IOException, InterruptedException;

      Attachments

        1. HBASE-8112-v3-trunk.patch
          5 kB
          Jean-Marc Spaggiari
        2. HBASE-8112-v2-trunk.patch
          5 kB
          Jean-Marc Spaggiari
        3. HBASE-8112-v1-trunk.patch
          5 kB
          Jean-Marc Spaggiari
        4. HBASE-8112-v0-trunk.patch
          4 kB
          Jean-Marc Spaggiari

        Activity

          People

            jmspaggi Jean-Marc Spaggiari
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: