public static Text truncate(Text row) { return truncate(row, Constants.MAX_DATA_TO_PRINT); } }
@Override public String toString() { String endRowString; String prevEndRowString; String tableIdString = getTableId().canonicalID().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\"); if (getEndRow() == null) endRowString = "<"; else endRowString = ";" + TextUtil.truncate(getEndRow()).toString().replaceAll(";", "\\\\;") .replaceAll("\\\\", "\\\\\\\\"); if (getPrevEndRow() == null) prevEndRowString = "<"; else prevEndRowString = ";" + TextUtil.truncate(getPrevEndRow()).toString() .replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\"); return tableIdString + endRowString + prevEndRowString; }
@Override public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { OpTimer timer = null; if (log.isTraceEnabled()) { log.trace("tid={} Locating tablet table={} row={} skipRow={} retry={}", Thread.currentThread().getId(), tableId, TextUtil.truncate(row), skipRow, retry); timer = new OpTimer().start(); } while (true) { LockCheckerSession lcSession = new LockCheckerSession(); TabletLocation tl = _locateTablet(context, row, skipRow, retry, true, lcSession); if (retry && tl == null) { sleepUninterruptibly(100, TimeUnit.MILLISECONDS); if (log.isTraceEnabled()) log.trace("Failed to locate tablet containing row {} in table {}, will retry...", TextUtil.truncate(row), tableId); continue; } if (timer != null) { timer.stop(); log.trace("tid={} Located tablet {} at {} in {}", Thread.currentThread().getId(), (tl == null ? "null" : tl.tablet_extent), (tl == null ? "null" : tl.tablet_location), String.format("%.3f secs", timer.scale(TimeUnit.SECONDS))); } return tl; } }
Thread.currentThread().getId(), src.tablet_extent.getTableId(), TextUtil.truncate(row), src.tablet_extent, src.tablet_location); timer = new OpTimer().start();
public static Text truncate(Text row) { return truncate(row, Constants.MAX_DATA_TO_PRINT); } }
@Override public String toString() { String endRowString; String prevEndRowString; String tableIdString = getTableId().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\"); if (getEndRow() == null) endRowString = "<"; else endRowString = ";" + TextUtil.truncate(getEndRow()).toString().replaceAll(";", "\\\\;") .replaceAll("\\\\", "\\\\\\\\"); if (getPrevEndRow() == null) prevEndRowString = "<"; else prevEndRowString = ";" + TextUtil.truncate(getPrevEndRow()).toString() .replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\"); return tableIdString + endRowString + prevEndRowString; }
@Override public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { OpTimer timer = null; if (log.isTraceEnabled()) { log.trace("tid={} Locating tablet table={} row={} skipRow={} retry={}", Thread.currentThread().getId(), tableId, TextUtil.truncate(row), skipRow, retry); timer = new OpTimer().start(); } while (true) { LockCheckerSession lcSession = new LockCheckerSession(); TabletLocation tl = _locateTablet(context, row, skipRow, retry, true, lcSession); if (retry && tl == null) { sleepUninterruptibly(100, TimeUnit.MILLISECONDS); if (log.isTraceEnabled()) log.trace("Failed to locate tablet containing row {} in table {}, will retry...", TextUtil.truncate(row), tableId); continue; } if (timer != null) { timer.stop(); log.trace("tid={} Located tablet {} at {} in {}", Thread.currentThread().getId(), (tl == null ? "null" : tl.tablet_extent), (tl == null ? "null" : tl.tablet_location), String.format("%.3f secs", timer.scale(TimeUnit.SECONDS))); } return tl; } }
Thread.currentThread().getId(), src.tablet_extent.getTableId(), TextUtil.truncate(row), src.tablet_extent, src.tablet_location); timer = new OpTimer().start();