Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions src/main/java/com/alipay/oceanbase/hbase/OHTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,6 @@ public Result call() throws IOException {
}
}
} catch (Exception e) {
logger.error(LCD.convert("01-00002"), tableNameString, Bytes.toString(family),
e);
throw new IOException("query table:" + tableNameString + " family "
+ Bytes.toString(family) + " error.", e);
}
Expand Down Expand Up @@ -1104,8 +1102,6 @@ public ResultScanner call() throws IOException {
}
}
} catch (Exception e) {
logger.error(LCD.convert("01-00003"), tableNameString, Bytes.toString(family),
e);
throw new IOException("scan table:" + tableNameString + " family "
+ Bytes.toString(family) + " error.", e);
}
Expand Down Expand Up @@ -1206,8 +1202,6 @@ public List<ResultScanner> call() throws IOException {
}
}
} catch (Exception e) {
logger.error(LCD.convert("01-00003"), tableNameString, Bytes.toString(family),
e);
throw new IOException("scan table:" + tableNameString + " family "
+ Bytes.toString(family) + " error.", e);
}
Expand Down Expand Up @@ -1342,7 +1336,6 @@ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
try {
return checkAndMutation(row, family, qualifier, compareOp, value, null, rowMutations);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), put, tableNameString, e);
throw new IOException("checkAndPut type table:" + tableNameString + " e.msg:"
+ e.getMessage() + " error.", e);
}
Expand All @@ -1362,7 +1355,6 @@ private void innerDelete(Delete delete) throws IOException {
Object[] results = new Object[actions.size()];
batch(actions, results);
} catch (Exception e) {
logger.error(LCD.convert("01-00004"), tableNameString, e);
throw e;
}
}
Expand Down Expand Up @@ -1405,7 +1397,6 @@ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
try {
return checkAndMutation(row, family, qualifier, compareOp, value, null, rowMutations);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), delete, tableNameString, e);
throw new IOException("checkAndDelete type table:" + tableNameString + " e.msg:"
+ e.getMessage() + " error.", e);
}
Expand All @@ -1425,7 +1416,6 @@ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
try {
return checkAndMutation(row, family, qualifier, compareOp, value, null, rowMutations);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), rowMutations, tableNameString, e);
throw new IOException("checkAndMutate type table:" + tableNameString + " e.msg:"
+ e.getMessage() + " error.", e);
}
Expand Down Expand Up @@ -1529,7 +1519,6 @@ public Result append(Append append) throws IOException {
}
return Result.create(keyValues);
} catch (Exception e) {
logger.error(LCD.convert("01-00006"), tableNameString, e);
throw new IOException("append table " + tableNameString + " error.", e);
}
}
Expand Down Expand Up @@ -1580,7 +1569,6 @@ public Result increment(Increment increment) throws IOException {
}
return Result.create(keyValues);
} catch (Exception e) {
logger.error(LCD.convert("01-00007"), tableNameString, e);
throw new IOException("increment table " + tableNameString + " error.", e);
}
}
Expand Down Expand Up @@ -1625,7 +1613,6 @@ public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, lo
}
return Bytes.toLong((byte[]) queryResult.getPropertiesRows().get(0).get(3).getValue());
} catch (Exception e) {
logger.error(LCD.convert("01-00007"), tableNameString, e);
throw new IOException("increment table " + tableNameString + " error.", e);
}
}
Expand Down Expand Up @@ -1656,10 +1643,10 @@ public void flushCommits() throws IOException {
}
}
} catch (Exception e) {
logger.error(LCD.convert("01-00008"), tableNameString, null, autoFlush,
writeBuffer.size(), e);
if (e instanceof IOException) {
throw (IOException) e;
} else {
throw new IOException(tableNameString + " table occurred unexpected error.", e);
}
} finally {
// mutate list so that it is empty for complete success, or contains
Expand Down Expand Up @@ -1706,10 +1693,10 @@ public void flushCommitsV2() throws IOException {
throw new IOException(tableNameString + " table occurred unexpected error.", e);
}
} catch (Exception e) {
logger.error(LCD.convert("01-00008"), tableNameString, null, autoFlush,
writeBuffer.size(), e);
if (e instanceof IOException) {
throw (IOException) e;
} else {
throw new IOException(tableNameString + " table occurred unexpected error.", e);
}
}
} finally {
Expand Down Expand Up @@ -2302,7 +2289,6 @@ private BatchOperation buildBatchOperation(String tableName, List<? extends Row>
try {
query.setRowKey(row(colVal("K", Bytes.toString(get.getRow())), colVal("Q", null), colVal("T", Integer.MAX_VALUE)));
} catch (Exception e) {
logger.error("unexpected error occurs when set row key", e);
throw new IOException(e);
}
batch.addOperation(query);
Expand Down Expand Up @@ -2694,7 +2680,6 @@ public boolean thenPut(Put put) throws IOException {
return checkAndMutation(row, family, qualifier, getCompareOp(cmpOp), value,
timeRange, rowMutations);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), rowMutations, tableNameString, e);
throw new IOException("checkAndMutate type table: " + tableNameString + " e.msg: "
+ e.getMessage() + " error.", e);
}
Expand All @@ -2709,7 +2694,6 @@ public boolean thenDelete(Delete delete) throws IOException {
return checkAndMutation(row, family, qualifier, getCompareOp(cmpOp), value,
timeRange, rowMutations);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), rowMutations, tableNameString, e);
throw new IOException("checkAndMutate type table: " + tableNameString + " e.msg: "
+ e.getMessage() + " error.", e);
}
Expand All @@ -2722,7 +2706,6 @@ public boolean thenMutate(RowMutations mutation) throws IOException {
return checkAndMutation(row, family, qualifier, getCompareOp(cmpOp), value,
timeRange, mutation);
} catch (Exception e) {
logger.error(LCD.convert("01-00005"), mutation, tableNameString, e);
throw new IOException("checkAndMutate type table: " + tableNameString + " e.msg: "
+ e.getMessage() + " error.", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public Result next() throws IOException {
OHBaseFuncUtils.sortHBaseResult(keyValues);
return Result.create(keyValues);
} catch (Exception e) {
logger.error(LCD.convert("01-00000"), streamResult.getTableName(), e);
throw new IOException(String.format("get table %s stream next result error ",
streamResult.getTableName()), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,14 @@ private void execute(boolean flushAll) throws IOException {
execBuffer.clear();
} catch (Exception ex) {
// do not recollect error operations, notify outside
LOGGER.error("error happens, table name: {}", tableName.getNameAsString(), ex);
if (ex instanceof RetriesExhaustedWithDetailsException) {
LOGGER.error("TableName: {}, One or more of the operations have failed after retries.", tableName.getNameAsString(), ex);
RetriesExhaustedWithDetailsException retryException = (RetriesExhaustedWithDetailsException) ex;
if (listener != null) {
listener.onException(retryException, this);
} else {
throw retryException;
}
} else {
LOGGER.error("Errors unrelated to operations occur during mutation operation", ex);
throw ex;
}
}
Expand Down