Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException


      put.add(Bytes.toBytes("family"), Bytes.toBytes("c1"), new byte[]{'b'});
      ht.put(put);
      ht.close();
    } catch (IOException ioe) {
      Assert.assertTrue(ioe instanceof RetriesExhaustedWithDetailsException);
      RetriesExhaustedWithDetailsException re = (RetriesExhaustedWithDetailsException) ioe;
      boolean foundRegionInRecoveryException = false;
      for (Throwable t : re.getCauses()) {
        if (t instanceof RegionInRecoveryException) {
          foundRegionInRecoveryException = true;
          break;
        }
      }
      Assert.assertTrue(
        "No RegionInRecoveryException. Following exceptions returned=" + re.getCauses(),
        foundRegionInRecoveryException);
    }

    zkw.close();
  }
View Full Code Here


  private void recordFailure(final HTable table, final Put put, final long keyBase,
      final long start, IOException e) {
    failedKeySet.add(keyBase);
    String exceptionInfo;
    if (e instanceof RetriesExhaustedWithDetailsException) {
      RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
      exceptionInfo = aggEx.getExhaustiveDescription();
    } else {
      StringWriter stackWriter = new StringWriter();
      PrintWriter pw = new PrintWriter(stackWriter);
      e.printStackTrace(pw);
      pw.flush();
View Full Code Here

    private void recordFailure(final Mutation m, final long keyBase,
        final long start, IOException e) {
      failedKeySet.add(keyBase);
      String exceptionInfo;
      if (e instanceof RetriesExhaustedWithDetailsException) {
        RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
        exceptionInfo = aggEx.getExhaustiveDescription();
      } else {
        StringWriter stackWriter = new StringWriter();
        PrintWriter pw = new PrintWriter(stackWriter);
        e.printStackTrace(pw);
        pw.flush();
View Full Code Here

        totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
      } catch (IOException e) {
        failedKeySet.add(keyBase);
        String exceptionInfo;
        if (e instanceof RetriesExhaustedWithDetailsException) {
          RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException)e;
          exceptionInfo = aggEx.getExhaustiveDescription();
        } else {
          StringWriter stackWriter = new StringWriter();
          PrintWriter pw = new PrintWriter(stackWriter);
          e.printStackTrace(pw);
          pw.flush();
View Full Code Here

      totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
    } catch (IOException e) {
      failedKeySet.add(keyBase);
      String exceptionInfo;
      if (e instanceof RetriesExhaustedWithDetailsException) {
        RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException)e;
        exceptionInfo = aggEx.getExhaustiveDescription();
      } else {
        StringWriter stackWriter = new StringWriter();
        PrintWriter pw = new PrintWriter(stackWriter);
        e.printStackTrace(pw);
        pw.flush();
View Full Code Here

            .type(MIMETYPE_TEXT).entity("Bad request" + CRLF +
              StringUtils.stringifyException(exp) + CRLF)
            .build());
    }
    if (exp instanceof RetriesExhaustedWithDetailsException) {
      RetriesExhaustedWithDetailsException retryException =
          (RetriesExhaustedWithDetailsException) exp;
      processException(retryException.getCause(0));
    }
    throw new WebApplicationException(
      Response.status(Response.Status.SERVICE_UNAVAILABLE)
        .type(MIMETYPE_TEXT).entity("Unavailable" + CRLF +
          StringUtils.stringifyException(exp) + CRLF)
View Full Code Here

      put.add(Bytes.toBytes("family"), Bytes.toBytes("c1"), new byte[]{'b'});
      ht.put(put);
      ht.close();
    } catch (IOException ioe) {
      Assert.assertTrue(ioe instanceof RetriesExhaustedWithDetailsException);
      RetriesExhaustedWithDetailsException re = (RetriesExhaustedWithDetailsException) ioe;
      boolean foundRegionInRecoveryException = false;
      for (Throwable t : re.getCauses()) {
        if (t instanceof RegionInRecoveryException) {
          foundRegionInRecoveryException = true;
          break;
        }
      }
      Assert.assertTrue(
        "No RegionInRecoveryException. Following exceptions returned=" + re.getCauses(),
        foundRegionInRecoveryException);
    }

    zkw.close();
  }
View Full Code Here

    private void recordFailure(final Mutation m, final long keyBase,
        final long start, IOException e) {
      failedKeySet.add(keyBase);
      String exceptionInfo;
      if (e instanceof RetriesExhaustedWithDetailsException) {
        RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
        exceptionInfo = aggEx.getExhaustiveDescription();
      } else {
        StringWriter stackWriter = new StringWriter();
        PrintWriter pw = new PrintWriter(stackWriter);
        e.printStackTrace(pw);
        pw.flush();
View Full Code Here

      Put put = new Put(key);
      put.add(Bytes.toBytes("family"), Bytes.toBytes("c1"), new byte[]{'b'});
      ht.put(put);
    } catch (IOException ioe) {
      Assert.assertTrue(ioe instanceof RetriesExhaustedWithDetailsException);
      RetriesExhaustedWithDetailsException re = (RetriesExhaustedWithDetailsException) ioe;
      boolean foundRegionInRecoveryException = false;
      for (Throwable t : re.getCauses()) {
        if (t instanceof RegionInRecoveryException) {
          foundRegionInRecoveryException = true;
          break;
        }
      }
      Assert.assertTrue(
        "No RegionInRecoveryException. Following exceptions returned=" + re.getCauses(),
        foundRegionInRecoveryException);
    }

    ht.close();
    zkw.close();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.