当前位置: 首页>>代码示例>>Java>>正文


Java RetriesExhaustedWithDetailsException.getExhaustiveDescription方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException.getExhaustiveDescription方法的典型用法代码示例。如果您正苦于以下问题:Java RetriesExhaustedWithDetailsException.getExhaustiveDescription方法的具体用法?Java RetriesExhaustedWithDetailsException.getExhaustiveDescription怎么用?Java RetriesExhaustedWithDetailsException.getExhaustiveDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException的用法示例。


在下文中一共展示了RetriesExhaustedWithDetailsException.getExhaustiveDescription方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: recordFailure

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
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();
    exceptionInfo = StringUtils.stringifyException(e);
  }
  LOG.error("Failed to mutate: " + keyBase + " after " + (System.currentTimeMillis() - start)
      + "ms; region information: " + getRegionDebugInfoSafe(table, m.getRow()) + "; errors: "
      + exceptionInfo);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:MultiThreadedUpdaterWithACL.java

示例2: recordFailure

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
private void recordFailure(final Table 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();
    exceptionInfo = StringUtils.stringifyException(e);
  }
  LOG.error("Failed to insert: " + keyBase + " after " + (System.currentTimeMillis() - start)
      + "ms; region information: " + getRegionDebugInfoSafe(table, put.getRow()) + "; errors: "
      + exceptionInfo);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:MultiThreadedWriterWithACL.java

示例3: insert

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void insert(Table table, Put put, long keyBase) {
  long start = System.currentTimeMillis();
  try {
    put = (Put) dataGenerator.beforeMutate(keyBase, put);
    table.put(put);
    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();
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to insert: " + keyBase + " after " + (System.currentTimeMillis() - start)
        + "ms; region information: " + getRegionDebugInfoSafe(table, put.getRow())
        + "; errors: " + exceptionInfo);
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:25,代码来源:MultiThreadedWriter.java

示例4: insert

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void insert(HTable table, Put put, long keyBase) {
  long start = System.currentTimeMillis();
  try {
    put = (Put) dataGenerator.beforeMutate(keyBase, put);
    table.put(put);
    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();
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to insert: " + keyBase + " after " + (System.currentTimeMillis() - start)
        + "ms; region information: " + getRegionDebugInfoSafe(table, put.getRow())
        + "; errors: " + exceptionInfo);
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:25,代码来源:MultiThreadedWriter.java

示例5: recordFailure

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
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();
    exceptionInfo = StringUtils.stringifyException(e);
  }
  LOG.error("Failed to insert: " + keyBase + " after " + (System.currentTimeMillis() - start)
      + "ms; region information: " + getRegionDebugInfoSafe(table, put.getRow()) + "; errors: "
      + exceptionInfo);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:19,代码来源:MultiThreadedWriterWithACL.java

示例6: insert

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void insert(HTable table, Put put, long keyBase) {
  long start = System.currentTimeMillis();
  try {
    table.put(put);
    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();
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to insert: " + keyBase + " after " + (System.currentTimeMillis() - start) +
      "ms; region information: " + getRegionDebugInfoSafe(table, put.getRow()) + "; errors: "
        + exceptionInfo);
  }
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:24,代码来源:MultiThreadedWriterBase.java

示例7: mutate

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void mutate(Table table, Mutation m,
    long keyBase, byte[] row, byte[] cf, byte[] q, byte[] v) {
  long start = System.currentTimeMillis();
  try {
    m = dataGenerator.beforeMutate(keyBase, m);
    if (m instanceof Increment) {
      table.increment((Increment)m);
    } else if (m instanceof Append) {
      table.append((Append)m);
    } else if (m instanceof Put) {
      table.checkAndPut(row, cf, q, v, (Put)m);
    } else if (m instanceof Delete) {
      table.checkAndDelete(row, cf, q, v, (Delete)m);
    } else {
      throw new IllegalArgumentException(
        "unsupported mutation " + m.getClass().getSimpleName());
    }
    totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
  } catch (IOException e) {
    if (ignoreNonceConflicts && (e instanceof OperationConflictException)) {
      LOG.info("Detected nonce conflict, ignoring: " + e.getMessage());
      totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
      return;
    }
    failedKeySet.add(keyBase);
    String exceptionInfo;
    if (e instanceof RetriesExhaustedWithDetailsException) {
      RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
      exceptionInfo = aggEx.getExhaustiveDescription();
    } else {
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to mutate: " + keyBase + " after " +
        (System.currentTimeMillis() - start) +
      "ms; region information: " + getRegionDebugInfoSafe(table, m.getRow()) + "; errors: "
        + exceptionInfo);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:39,代码来源:MultiThreadedUpdater.java

示例8: mutate

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void mutate(HTable table, Mutation m,
     long keyBase, byte[] row, byte[] cf, byte[] q, byte[] v) {
   long start = System.currentTimeMillis();
   try {
     m = dataGenerator.beforeMutate(keyBase, m);
     if (m instanceof Increment) {
       table.increment((Increment)m);
     } else if (m instanceof Append) {
       table.append((Append)m);
     } else if (m instanceof Put) {
       table.checkAndPut(row, cf, q, v, (Put)m);
     } else if (m instanceof Delete) {
       table.checkAndDelete(row, cf, q, v, (Delete)m);
     } else {
       throw new IllegalArgumentException(
         "unsupported mutation " + m.getClass().getSimpleName());
     }
     totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
   } catch (IOException e) {
     if (ignoreNonceConflicts && (e instanceof OperationConflictException)) {
       LOG.info("Detected nonce conflict, ignoring: " + e.getMessage());
totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
       return;
     }
     failedKeySet.add(keyBase);
     String exceptionInfo;
     if (e instanceof RetriesExhaustedWithDetailsException) {
       RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
       exceptionInfo = aggEx.getExhaustiveDescription();
     } else {
       exceptionInfo = StringUtils.stringifyException(e);
     }
     LOG.error("Failed to mutate: " + keyBase + " after " +
         (System.currentTimeMillis() - start) +
       "ms; region information: " + getRegionDebugInfoSafe(table, m.getRow()) + "; errors: "
         + exceptionInfo);
   }
 }
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:39,代码来源:MultiThreadedUpdater.java

示例9: mutate

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void mutate(Table table, Mutation m,
    long keyBase, byte[] row, byte[] cf, byte[] q, byte[] v) {
  long start = System.currentTimeMillis();
  try {
    m = dataGenerator.beforeMutate(keyBase, m);
    if (m instanceof Increment) {
      table.increment((Increment)m);
    } else if (m instanceof Append) {
      table.append((Append)m);
    } else if (m instanceof Put) {
      table.checkAndMutate(row, cf).qualifier(q).ifEquals(v).thenPut((Put)m);
    } else if (m instanceof Delete) {
      table.checkAndMutate(row, cf).qualifier(q).ifEquals(v).thenDelete((Delete)m);
    } else {
      throw new IllegalArgumentException(
        "unsupported mutation " + m.getClass().getSimpleName());
    }
    totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
  } catch (IOException e) {
    if (ignoreNonceConflicts) {
      LOG.info("Detected nonce conflict, ignoring: " + e.getMessage());
      totalOpTimeMs.addAndGet(System.currentTimeMillis() - start);
      return;
    }
    failedKeySet.add(keyBase);
    String exceptionInfo;
    if (e instanceof RetriesExhaustedWithDetailsException) {
      RetriesExhaustedWithDetailsException aggEx = (RetriesExhaustedWithDetailsException) e;
      exceptionInfo = aggEx.getExhaustiveDescription();
    } else {
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to mutate: " + keyBase + " after " +
        (System.currentTimeMillis() - start) +
      "ms; region information: " + getRegionDebugInfoSafe(table, m.getRow()) + "; errors: "
        + exceptionInfo);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:39,代码来源:MultiThreadedUpdater.java

示例10: mutate

import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException; //导入方法依赖的package包/类
public void mutate(HTable table, Mutation m,
    long keyBase, byte[] row, byte[] cf, byte[] q, byte[] v) {
  long start = System.currentTimeMillis();
  try {
    if (m instanceof Increment) {
      table.increment((Increment)m);
    } else if (m instanceof Append) {
      table.append((Append)m);
    } else if (m instanceof Put) {
      table.checkAndPut(row, cf, q, v, (Put)m);
    } else if (m instanceof Delete) {
      table.checkAndDelete(row, cf, q, v, (Delete)m);
    } else {
      throw new IllegalArgumentException(
        "unsupported mutation " + m.getClass().getSimpleName());
    }
    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();
      exceptionInfo = StringUtils.stringifyException(e);
    }
    LOG.error("Failed to mutate: " + keyBase + " after " + (System.currentTimeMillis() - start) +
      "ms; region information: " + getRegionDebugInfoSafe(table, m.getRow()) + "; errors: "
        + exceptionInfo);
  }
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:36,代码来源:MultiThreadedUpdater.java


注:本文中的org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException.getExhaustiveDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。