You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zheng Hu (JIRA)" <ji...@apache.org> on 2018/02/11 06:10:00 UTC
[jira] [Updated] (HBASE-19972) Should rethrow the
RetriesExhaustedWithDetailsException when failed to apply the batch in
ReplicationSink
[ https://issues.apache.org/jira/browse/HBASE-19972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zheng Hu updated HBASE-19972:
-----------------------------
Description:
As [~Apache9] said in HBASE-12091.
In ReplicationSink#batch,we swallow the RetriesExhaustedWithDetailsException except
TableNotFoundException, actually, should rethrow the exception.
{code:java}
try {
Connection connection = getConnection();
table = connection.getTable(tableName);
for (List<Row> rows : allRows) {
table.batch(rows);
}
} catch (RetriesExhaustedWithDetailsException rewde) {
for (Throwable ex : rewde.getCauses()) {
if (ex instanceof TableNotFoundException) {
throw new TableNotFoundException("'"+tableName+"'");
}
}
}
{code}
was:
As [~Apache9] saided in HBASE-12091.
In ReplicationSink#batch,we swallow the RetriesExhaustedWithDetailsException except
TableNotFoundException, actually, should rethrow the exception.
{code}
try {
Connection connection = getConnection();
table = connection.getTable(tableName);
for (List<Row> rows : allRows) {
table.batch(rows);
}
} catch (RetriesExhaustedWithDetailsException rewde) {
for (Throwable ex : rewde.getCauses()) {
if (ex instanceof TableNotFoundException) {
throw new TableNotFoundException("'"+tableName+"'");
}
}
}
{code}
> Should rethrow the RetriesExhaustedWithDetailsException when failed to apply the batch in ReplicationSink
> ----------------------------------------------------------------------------------------------------------
>
> Key: HBASE-19972
> URL: https://issues.apache.org/jira/browse/HBASE-19972
> Project: HBase
> Issue Type: Bug
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
>
> As [~Apache9] said in HBASE-12091.
> In ReplicationSink#batch,we swallow the RetriesExhaustedWithDetailsException except
> TableNotFoundException, actually, should rethrow the exception.
> {code:java}
> try {
> Connection connection = getConnection();
> table = connection.getTable(tableName);
> for (List<Row> rows : allRows) {
> table.batch(rows);
> }
> } catch (RetriesExhaustedWithDetailsException rewde) {
> for (Throwable ex : rewde.getCauses()) {
> if (ex instanceof TableNotFoundException) {
> throw new TableNotFoundException("'"+tableName+"'");
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)