HBASE-18998 processor.getRowsToLock() always assumes there is some row being locked

This commit is contained in:
tedyu 2017-10-13 08:38:48 -07:00
parent 5a26243a8a
commit 501f8b9509
1 changed files with 9 additions and 9 deletions

View File

@ -7279,10 +7279,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
try { try {
processor.process(now, region, mutations, walEdit); processor.process(now, region, mutations, walEdit);
} catch (IOException e) { } catch (IOException e) {
String row = processor.getRowsToLock().isEmpty() ? "" :
" on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
LOG.warn("RowProcessor:" + processor.getClass().getName() + LOG.warn("RowProcessor:" + processor.getClass().getName() +
" throws Exception on row(s):" + " throws Exception" + row, e);
Bytes.toStringBinary(
processor.getRowsToLock().iterator().next()) + "...", e);
throw e; throw e;
} }
return; return;
@ -7296,10 +7296,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
processor.process(now, region, mutations, walEdit); processor.process(now, region, mutations, walEdit);
return null; return null;
} catch (IOException e) { } catch (IOException e) {
String row = processor.getRowsToLock().isEmpty() ? "" :
" on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
LOG.warn("RowProcessor:" + processor.getClass().getName() + LOG.warn("RowProcessor:" + processor.getClass().getName() +
" throws Exception on row(s):" + " throws Exception" + row, e);
Bytes.toStringBinary(
processor.getRowsToLock().iterator().next()) + "...", e);
throw e; throw e;
} }
} }
@ -7308,9 +7308,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
try { try {
task.get(timeout, TimeUnit.MILLISECONDS); task.get(timeout, TimeUnit.MILLISECONDS);
} catch (TimeoutException te) { } catch (TimeoutException te) {
LOG.error("RowProcessor timeout:" + timeout + " ms on row(s):" + String row = processor.getRowsToLock().isEmpty() ? "" :
Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + " on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
"..."); LOG.error("RowProcessor timeout:" + timeout + " ms" + row);
throw new IOException(te); throw new IOException(te);
} catch (Exception e) { } catch (Exception e) {
throw new IOException(e); throw new IOException(e);