HBASE-24524 SyncTable logging improvements (#1878)

Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
(cherry picked from commit d8247ebae3)
This commit is contained in:
Wellington Ramos Chevreuil 2020-06-10 09:36:30 +01:00 committed by Wellington Chevreuil
parent c02554024f
commit ef984cb18e
1 changed files with 6 additions and 6 deletions

View File

@ -363,16 +363,16 @@ public class SyncTable extends Configured implements Tool {
boolean rowMatched; boolean rowMatched;
int rowComparison = compareRowKeys(nextSourceRow, nextTargetRow); int rowComparison = compareRowKeys(nextSourceRow, nextTargetRow);
if (rowComparison < 0) { if (rowComparison < 0) {
if (LOG.isInfoEnabled()) { if (LOG.isDebugEnabled()) {
LOG.info("Target missing row: " + Bytes.toHex(nextSourceRow)); LOG.debug("Target missing row: " + Bytes.toString(nextSourceRow));
} }
context.getCounter(Counter.TARGETMISSINGROWS).increment(1); context.getCounter(Counter.TARGETMISSINGROWS).increment(1);
rowMatched = syncRowCells(context, nextSourceRow, sourceCells, EMPTY_CELL_SCANNER); rowMatched = syncRowCells(context, nextSourceRow, sourceCells, EMPTY_CELL_SCANNER);
nextSourceRow = sourceCells.nextRow(); // advance only source to next row nextSourceRow = sourceCells.nextRow(); // advance only source to next row
} else if (rowComparison > 0) { } else if (rowComparison > 0) {
if (LOG.isInfoEnabled()) { if (LOG.isDebugEnabled()) {
LOG.info("Source missing row: " + Bytes.toHex(nextTargetRow)); LOG.debug("Source missing row: " + Bytes.toString(nextTargetRow));
} }
context.getCounter(Counter.SOURCEMISSINGROWS).increment(1); context.getCounter(Counter.SOURCEMISSINGROWS).increment(1);
@ -557,10 +557,10 @@ public class SyncTable extends Configured implements Tool {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Different values: "); LOG.debug("Different values: ");
LOG.debug(" source cell: " + sourceCell LOG.debug(" source cell: " + sourceCell
+ " value: " + Bytes.toHex(sourceCell.getValueArray(), + " value: " + Bytes.toString(sourceCell.getValueArray(),
sourceCell.getValueOffset(), sourceCell.getValueLength())); sourceCell.getValueOffset(), sourceCell.getValueLength()));
LOG.debug(" target cell: " + targetCell LOG.debug(" target cell: " + targetCell
+ " value: " + Bytes.toHex(targetCell.getValueArray(), + " value: " + Bytes.toString(targetCell.getValueArray(),
targetCell.getValueOffset(), targetCell.getValueLength())); targetCell.getValueOffset(), targetCell.getValueLength()));
} }
context.getCounter(Counter.DIFFERENTCELLVALUES).increment(1); context.getCounter(Counter.DIFFERENTCELLVALUES).increment(1);