HBASE-11240 Print hdfs pipeline when hlog's sync is slow ADDENDUM

This commit is contained in:
stack 2014-07-15 07:57:20 -07:00
parent 96dcd67f56
commit c694ec11df
1 changed files with 2 additions and 2 deletions

View File

@ -472,7 +472,7 @@ class FSHLog implements HLog, Syncable {
rollWriter(); rollWriter();
this.slowSyncNs = this.slowSyncNs =
1000 * conf.getInt("hbase.regionserver.hlog.slowsync.ms", 1000000 * conf.getInt("hbase.regionserver.hlog.slowsync.ms",
DEFAULT_SLOW_SYNC_TIME_MS); DEFAULT_SLOW_SYNC_TIME_MS);
// handle the reflection necessary to call getNumCurrentReplicas(). TODO: Replace with // handle the reflection necessary to call getNumCurrentReplicas(). TODO: Replace with
// HdfsDataOutputStream#getCurrentBlockReplication() and go without reflection. // HdfsDataOutputStream#getCurrentBlockReplication() and go without reflection.
@ -1443,7 +1443,7 @@ class FSHLog implements HLog, Syncable {
if (timeInNanos > this.slowSyncNs) { if (timeInNanos > this.slowSyncNs) {
String msg = String msg =
new StringBuilder().append("Slow sync cost: ") new StringBuilder().append("Slow sync cost: ")
.append(timeInNanos / 1000).append(" ms, current pipeline: ") .append(timeInNanos / 1000000).append(" ms, current pipeline: ")
.append(Arrays.toString(getPipeLine())).toString(); .append(Arrays.toString(getPipeLine())).toString();
Trace.addTimelineAnnotation(msg); Trace.addTimelineAnnotation(msg);
LOG.info(msg); LOG.info(msg);