Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ public HStore call() throws IOException {
try {
store.close();
} catch (IOException e) {
LOG.warn("close store failed", e);
LOG.warn("close store {} failed in region {}", store.toString(), this, e);
}
}
}
Expand Down Expand Up @@ -1766,7 +1766,7 @@ public Pair<byte[], Collection<HStoreFile>> call() throws IOException {
if (!canFlush) {
decrMemStoreSize(this.memStoreSizing.getMemStoreSize());
} else if (this.memStoreSizing.getDataSize() != 0) {
LOG.error("Memstore data size is {}", this.memStoreSizing.getDataSize());
LOG.error("Memstore data size is {} in region {}", this.memStoreSizing.getDataSize(), this);
}
if (coprocessorHost != null) {
status.setStatus("Running coprocessor post-close hooks");
Expand Down Expand Up @@ -1805,7 +1805,7 @@ public void waitForFlushesAndCompactions() {
writestate.wait();
} catch (InterruptedException iex) {
// essentially ignore and propagate the interrupt back up
LOG.warn("Interrupted while waiting");
LOG.warn("Interrupted while waiting in region {}", this);
interrupted = true;
break;
}
Expand Down Expand Up @@ -1846,7 +1846,7 @@ public boolean waitForFlushes(long timeout) {
writestate.wait(toWait);
} catch (InterruptedException iex) {
// essentially ignore and propagate the interrupt back up
LOG.warn("Interrupted while waiting");
LOG.warn("Interrupted while waiting in region {}", this);
interrupted = true;
break;
} finally {
Expand All @@ -1858,7 +1858,7 @@ public boolean waitForFlushes(long timeout) {
Thread.currentThread().interrupt();
}
}
LOG.debug("Waited " + duration + " ms for flush to complete");
LOG.debug("Waited {} ms for region {} flush to complete", duration, this);
return !(writestate.flushing);
}
}
Expand Down Expand Up @@ -2287,7 +2287,7 @@ public boolean compact(CompactionContext compaction, HStore store,
requestNeedsCancellation = false;
store.compact(compaction, throughputController, user);
} catch (InterruptedIOException iioe) {
String msg = "compaction interrupted";
String msg = "region " + this + " compaction interrupted";
LOG.info(msg, iioe);
status.abort(msg);
return false;
Expand Down Expand Up @@ -2758,8 +2758,8 @@ private void doAbortFlushToWAL(final WAL wal, final long flushOpSeqId,
WALUtil.writeFlushMarker(wal, this.getReplicationScope(), getRegionInfo(), desc, false,
mvcc);
} catch (Throwable t) {
LOG.warn("Received unexpected exception trying to write ABORT_FLUSH marker to WAL:" +
StringUtils.stringifyException(t));
LOG.warn("Received unexpected exception trying to write ABORT_FLUSH marker to WAL: {} in "
+ " region {}", StringUtils.stringifyException(t), this);
// ignore this since we will be aborting the RS with DSE.
}
// we have called wal.startCacheFlush(), now we have to abort it
Expand Down Expand Up @@ -3344,7 +3344,7 @@ protected void checkAndPrepareMutation(int index, long timestamp) throws IOExcep
durability = tmpDur;
}
} catch (NoSuchColumnFamilyException nscfe) {
final String msg = "No such column family in batch mutation. ";
final String msg = "No such column family in batch mutation in region " + this;
if (observedExceptions.hasSeenNoSuchFamily()) {
LOG.warn(msg + nscfe.getMessage());
} else {
Expand All @@ -3357,7 +3357,7 @@ protected void checkAndPrepareMutation(int index, long timestamp) throws IOExcep
throw nscfe;
}
} catch (FailedSanityCheckException fsce) {
final String msg = "Batch Mutation did not pass sanity check. ";
final String msg = "Batch Mutation did not pass sanity check in region " + this;
if (observedExceptions.hasSeenFailedSanityCheck()) {
LOG.warn(msg + fsce.getMessage());
} else {
Expand All @@ -3370,7 +3370,7 @@ protected void checkAndPrepareMutation(int index, long timestamp) throws IOExcep
throw fsce;
}
} catch (WrongRegionException we) {
final String msg = "Batch mutation had a row that does not belong to this region. ";
final String msg = "Batch mutation had a row that does not belong to this region " + this;
if (observedExceptions.hasSeenWrongRegion()) {
LOG.warn(msg + we.getMessage());
} else {
Expand Down Expand Up @@ -3443,7 +3443,8 @@ public MiniBatchOperationInProgress<Mutation> lockRowsAndBuildMiniBatch(
throwException = true;
throw e;
} catch (IOException ioe) {
LOG.warn("Failed getting lock, row=" + Bytes.toStringBinary(mutation.getRow()), ioe);
LOG.warn("Failed getting lock, row={}, in region {}",
Bytes.toStringBinary(mutation.getRow()), this, ioe);
if (isAtomic()) { // fail, atomic means all or none
throwException = true;
throw ioe;
Expand Down Expand Up @@ -3981,7 +3982,7 @@ protected void checkAndPreparePut(Put p) throws IOException {
if (nonExistentList != null) {
for (byte[] family : nonExistentList) {
// Perhaps schema was changed between crash and replay
LOG.info("No family for " + Bytes.toString(family) + " omit from reply.");
LOG.info("No family for {} omit from reply in region {}.", Bytes.toString(family), this);
familyCellMap.remove(family);
}
}
Expand Down Expand Up @@ -4815,7 +4816,7 @@ private long replayRecoveredEditsForPaths(long minSeqIdForTheRegion, FileSystem
if (maxSeqId <= minSeqIdForTheRegion) {
if (LOG.isDebugEnabled()) {
String msg = "Maximum sequenceid for this wal is " + maxSeqId
+ " and minimum sequenceid for the region is " + minSeqIdForTheRegion
+ " and minimum sequenceid for the region " + this + " is " + minSeqIdForTheRegion
+ ", skipped the whole file, path=" + edits;
LOG.debug(msg);
}
Expand Down Expand Up @@ -4909,7 +4910,7 @@ private long replayRecoveredEdits(final Path edits, Map<byte[], Long> maxSeqIdIn
" edits=" + editsCount);
// Timeout reached
if(!reporter.progress()) {
msg = "Progressable reporter failed, stopping replay";
msg = "Progressable reporter failed, stopping replay for region " + this;
LOG.warn(msg);
status.abort(msg);
throw new IOException(msg);
Expand Down Expand Up @@ -4977,13 +4978,13 @@ private long replayRecoveredEdits(final Path edits, Map<byte[], Long> maxSeqIdIn
if (store == null) {
// This should never happen. Perhaps schema was changed between
// crash and redeploy?
LOG.warn("No family for " + cell);
LOG.warn("No family for cell {} in region {}", cell, this);
skippedEdits++;
continue;
}
if (checkRowWithinBoundary && !rowIsInRange(this.getRegionInfo(),
cell.getRowArray(), cell.getRowOffset(), cell.getRowLength())) {
LOG.warn("Row of " + cell + " is not within region boundary");
LOG.warn("Row of {} is not within region boundary for region {}", cell, this);
skippedEdits++;
continue;
}
Expand Down Expand Up @@ -5016,9 +5017,9 @@ private long replayRecoveredEdits(final Path edits, Map<byte[], Long> maxSeqIdIn
}
} catch (EOFException eof) {
Path p = WALSplitUtil.moveAsideBadEditsFile(walFS, edits);
msg = "EnLongAddered EOF. Most likely due to Master failure during " +
"wal splitting, so we have this data in another edit. " +
"Continuing, but renaming " + edits + " as " + p;
msg = "EnLongAddered EOF. Most likely due to Master failure during "
+ "wal splitting, so we have this data in another edit. Continuing, but renaming "
+ edits + " as " + p + " for region " + this;
LOG.warn(msg, eof);
status.abort(msg);
} catch (IOException ioe) {
Expand Down Expand Up @@ -6098,7 +6099,8 @@ protected RowLock getRowLockInternal(byte[] row, boolean readLock, final RowLock
success = true;
return result;
} catch (InterruptedException ie) {
LOG.warn("Thread interrupted waiting for lock on row: " + rowKey);
LOG.warn("Thread interrupted waiting for lock on row: {}, in region {}", rowKey,
getRegionInfo().getRegionNameAsString());
InterruptedIOException iie = new InterruptedIOException();
iie.initCause(ie);
TraceUtil.addTimelineAnnotation("Interrupted exception getting row lock");
Expand All @@ -6108,7 +6110,8 @@ protected RowLock getRowLockInternal(byte[] row, boolean readLock, final RowLock
// The maximum lock count for read lock is 64K (hardcoded), when this maximum count
// is reached, it will throw out an Error. This Error needs to be caught so it can
// go ahead to process the minibatch with lock acquired.
LOG.warn("Error to get row lock for " + Bytes.toStringBinary(row) + ", cause: " + error);
LOG.warn("Error to get row lock for {}, in region {}, cause: {}", Bytes.toStringBinary(row),
getRegionInfo().getRegionNameAsString(), error);
IOException ioe = new IOException(error);
TraceUtil.addTimelineAnnotation("Error getting row lock");
throw ioe;
Expand Down Expand Up @@ -6359,7 +6362,8 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f

// validation failed because of some sort of IO problem.
if (ioException != null) {
LOG.error("There was IO error when checking if the bulk load is ok.", ioException);
LOG.error("There was IO error when checking if the bulk load is ok in region {}.", this,
ioException);
throw ioException;
}
}
Expand All @@ -6371,8 +6375,8 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
.append(p.getSecond());
}
// problem when validating
LOG.warn("There was a recoverable bulk load failure likely due to a" +
" split. These (family, HFile) pairs were not loaded: " + list);
LOG.warn("There was a recoverable bulk load failure likely due to a split. These (family,"
+ " HFile) pairs were not loaded: {}, in region {}", list.toString(), this);
return null;
}

Expand Down Expand Up @@ -7714,7 +7718,8 @@ public MiniBatchOperationInProgress<Mutation> lockRowsAndBuildMiniBatch(
prevRowLock = rowLock;
}
} catch (IOException ioe) {
LOG.warn("Failed getting lock, row=" + Bytes.toStringBinary(row), ioe);
LOG.warn("Failed getting lock, row={}, in region {}", Bytes.toStringBinary(row), this,
ioe);
throw ioe;
}
}
Expand Down Expand Up @@ -7913,8 +7918,8 @@ private void doProcessRowWithTimeout(final RowProcessor<?,?> processor,
} catch (IOException e) {
String row = processor.getRowsToLock().isEmpty() ? "" :
" on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
LOG.warn("RowProcessor:" + processor.getClass().getName() +
" throws Exception" + row, e);
LOG.warn("RowProcessor: {}, in region {}, throws Exception {}",
processor.getClass().getName(), getRegionInfo().getRegionNameAsString(), row, e);
throw e;
}
return;
Expand All @@ -7930,8 +7935,8 @@ public Void call() throws IOException {
} catch (IOException e) {
String row = processor.getRowsToLock().isEmpty() ? "" :
" on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
LOG.warn("RowProcessor:" + processor.getClass().getName() +
" throws Exception" + row, e);
LOG.warn("RowProcessor: {}, in region {}, throws Exception {}",
processor.getClass().getName(), getRegionInfo().getRegionNameAsString(), row, e);
throw e;
}
}
Expand All @@ -7942,7 +7947,8 @@ public Void call() throws IOException {
} catch (TimeoutException te) {
String row = processor.getRowsToLock().isEmpty() ? "" :
" on row(s):" + Bytes.toStringBinary(processor.getRowsToLock().iterator().next()) + "...";
LOG.error("RowProcessor timeout:" + timeout + " ms" + row);
LOG.error("RowProcessor timeout: {} ms, in region {}, {}", timeout,
getRegionInfo().getRegionNameAsString(), row);
throw new IOException(te);
} catch (Exception e) {
throw new IOException(e);
Expand Down Expand Up @@ -8246,8 +8252,8 @@ private List<Cell> reckonDeltasByStore(HStore store, Operation op, Mutation muta
}
int newCellSize = PrivateCellUtil.estimatedSerializedSizeOf(newCell);
if (newCellSize > this.maxCellSize) {
String msg = "Cell with size " + newCellSize + " exceeds limit of " +
this.maxCellSize + " bytes";
String msg = "Cell with size " + newCellSize + " exceeds limit of " + this.maxCellSize
+ " bytes in region " + this;
if (LOG.isDebugEnabled()) {
LOG.debug(msg);
}
Expand Down Expand Up @@ -8402,8 +8408,8 @@ public boolean registerService(Service instance) {
ServiceDescriptor serviceDesc = instance.getDescriptorForType();
String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);
if (coprocessorServiceHandlers.containsKey(serviceName)) {
LOG.error("Coprocessor service " + serviceName +
" already registered, rejecting request from " + instance);
LOG.error("Coprocessor service {} already registered, rejecting request from {} in region {}",
serviceName, instance, this);
return false;
}

Expand Down Expand Up @@ -8531,7 +8537,7 @@ public byte[] checkSplit() {
try {
checkRow(ret, "calculated split");
} catch (IOException e) {
LOG.error("Ignoring invalid split", e);
LOG.error("Ignoring invalid split for region {}", this, e);
return null;
}
}
Expand Down Expand Up @@ -8699,7 +8705,7 @@ private void lock(final Lock lock, final int multiplier)
this.getRegionServerServices().getServerName()));
}
} catch (InterruptedException ie) {
LOG.info("Interrupted while waiting for a lock");
LOG.info("Interrupted while waiting for a lock in region {}", this);
InterruptedIOException iie = new InterruptedIOException();
iie.initCause(ie);
throw iie;
Expand Down