HBASE-9298 ns checker runs too frequently; too much mention in master logs
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3babc19ae1
commit
af208097a5
|
@ -20,22 +20,6 @@
|
|||
package org.apache.hadoop.hbase.client;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.HRegionLocation;
|
||||
import org.apache.hadoop.hbase.DoNotRetryIOException;
|
||||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.HRegionLocation;
|
||||
import org.apache.hadoop.hbase.protobuf.generated.Tracing;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||
import org.apache.hadoop.hbase.util.Pair;
|
||||
import org.cloudera.htrace.Span;
|
||||
import org.cloudera.htrace.Trace;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -52,6 +36,17 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.DoNotRetryIOException;
|
||||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.HRegionLocation;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||
import org.apache.hadoop.hbase.util.Pair;
|
||||
import org.cloudera.htrace.Trace;
|
||||
|
||||
/**
|
||||
* This class allows a continuous flow of requests. It's written to be compatible with a
|
||||
* synchronous caller such as HTable.
|
||||
|
@ -419,8 +414,7 @@ class AsyncProcess<CResult> {
|
|||
try {
|
||||
res = createCaller(callable).callWithoutRetries(callable);
|
||||
} catch (IOException e) {
|
||||
LOG.warn("The call to the RS failed, we don't know where we stand. location="
|
||||
+ loc, e);
|
||||
LOG.warn("The call to the RS failed, we don't know where we stand, " + loc, e);
|
||||
resubmitAll(initialActions, multi, loc, numAttempt + 1, e, errorsByServer);
|
||||
return;
|
||||
}
|
||||
|
@ -438,8 +432,7 @@ class AsyncProcess<CResult> {
|
|||
// This should never happen. But as the pool is provided by the end user, let's secure
|
||||
// this a little.
|
||||
decTaskCounters(regionName);
|
||||
LOG.warn("The task was rejected by the pool. This is unexpected. " +
|
||||
"location=" + loc, ree);
|
||||
LOG.warn("The task was rejected by the pool. This is unexpected. " + loc, ree);
|
||||
// We're likely to fail again, but this will increment the attempt counter, so it will
|
||||
// finish.
|
||||
resubmitAll(initialActions, multi, loc, numAttempt + 1, ree, errorsByServer);
|
||||
|
@ -535,8 +528,7 @@ class AsyncProcess<CResult> {
|
|||
|
||||
if (toReplay.isEmpty()) {
|
||||
LOG.warn("Attempt #" + numAttempt + "/" + numTries + " failed for all " +
|
||||
initialActions.size() + "ops, NOT resubmitting, tableName=" + tableName +
|
||||
", location=" + location);
|
||||
initialActions.size() + "ops, NOT resubmitting, " + location);
|
||||
} else {
|
||||
submit(initialActions, toReplay, numAttempt, true, errorsByServer);
|
||||
}
|
||||
|
@ -558,7 +550,7 @@ class AsyncProcess<CResult> {
|
|||
|
||||
if (responses == null) {
|
||||
LOG.info("Attempt #" + numAttempt + "/" + numTries + " failed all ops, trying resubmit," +
|
||||
" tableName=" + tableName + ", location=" + location);
|
||||
location);
|
||||
resubmitAll(initialActions, rsActions, location, numAttempt + 1, null, errorsByServer);
|
||||
return;
|
||||
}
|
||||
|
@ -618,15 +610,14 @@ class AsyncProcess<CResult> {
|
|||
// We use this value to have some logs when we have multiple failures, but not too many
|
||||
// logs as errors are to be expected wehn region moves, split and so on
|
||||
LOG.debug("Attempt #" + numAttempt + "/" + numTries + " failed " + failureCount +
|
||||
" ops , resubmitting " + toReplay.size() + ", tableName=" + tableName + ", location=" +
|
||||
location + ", last exception was: " + throwable.getMessage() +
|
||||
" - sleeping " + backOffTime + " ms.");
|
||||
" ops , resubmitting " + toReplay.size() + ", " + location + ", last exception was: " +
|
||||
throwable.getMessage() + ", sleeping " + backOffTime + "ms");
|
||||
}
|
||||
try {
|
||||
Thread.sleep(backOffTime);
|
||||
} catch (InterruptedException e) {
|
||||
LOG.warn("Not sent: " + toReplay.size() +
|
||||
" operations, tableName=" + tableName + ", location=" + location, e);
|
||||
" operations, " + location, e);
|
||||
Thread.interrupted();
|
||||
return;
|
||||
}
|
||||
|
@ -634,8 +625,7 @@ class AsyncProcess<CResult> {
|
|||
submit(initialActions, toReplay, numAttempt + 1, true, errorsByServer);
|
||||
} else if (failureCount != 0) {
|
||||
LOG.warn("Attempt #" + numAttempt + "/" + numTries + " failed for " + failureCount +
|
||||
" ops on " + location.getServerName() + " NOT resubmitting." +
|
||||
", tableName=" + tableName + ", location=" + location);
|
||||
" ops on " + location.getServerName() + " NOT resubmitting." + location);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -215,13 +215,13 @@ public class ClientScanner extends AbstractClientScanner {
|
|||
done) {
|
||||
close();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Finished region=" + this.currentRegion);
|
||||
LOG.debug("Finished " + this.currentRegion);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
localStartKey = endKey;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Finished with region " + this.currentRegion);
|
||||
LOG.debug("Finished " + this.currentRegion);
|
||||
}
|
||||
} else {
|
||||
localStartKey = this.scan.getStartRow();
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.apache.hadoop.fs.FileStatus;
|
|||
import org.apache.hadoop.fs.FileSystem;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.fs.PathFilter;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.HRegionInfo;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegion;
|
||||
import org.apache.hadoop.hbase.regionserver.StoreFile;
|
||||
|
@ -91,7 +90,7 @@ public class HFileArchiver {
|
|||
public static boolean archiveRegion(FileSystem fs, Path rootdir, Path tableDir, Path regionDir)
|
||||
throws IOException {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("ARCHIVING region " + regionDir.toString());
|
||||
LOG.debug("ARCHIVING " + regionDir.toString());
|
||||
}
|
||||
|
||||
// otherwise, we archive the files
|
||||
|
@ -132,12 +131,12 @@ public class HFileArchiver {
|
|||
|
||||
// convert the files in the region to a File
|
||||
toArchive.addAll(Lists.transform(Arrays.asList(storeDirs), getAsFile));
|
||||
LOG.debug("Archiving:" + toArchive);
|
||||
LOG.debug("Archiving " + toArchive);
|
||||
boolean success = false;
|
||||
try {
|
||||
success = resolveAndArchive(fs, regionArchiveDir, toArchive);
|
||||
} catch (IOException e) {
|
||||
LOG.error("Failed to archive: " + toArchive, e);
|
||||
LOG.error("Failed to archive " + toArchive, e);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
@ -280,7 +279,7 @@ public class HFileArchiver {
|
|||
*/
|
||||
private static boolean resolveAndArchive(FileSystem fs, Path baseArchiveDir,
|
||||
Collection<File> toArchive) throws IOException {
|
||||
if (LOG.isTraceEnabled()) LOG.trace("Starting to archive files:" + toArchive);
|
||||
if (LOG.isTraceEnabled()) LOG.trace("Starting to archive " + toArchive);
|
||||
long start = EnvironmentEdgeManager.currentTimeMillis();
|
||||
List<File> failures = resolveAndArchive(fs, baseArchiveDir, toArchive, start);
|
||||
|
||||
|
@ -348,7 +347,7 @@ public class HFileArchiver {
|
|||
failures.addAll(resolveAndArchive(fs, parentArchiveDir, children, start));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Failed to archive file: " + file, e);
|
||||
LOG.warn("Failed to archive " + file, e);
|
||||
failures.add(file);
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +394,7 @@ public class HFileArchiver {
|
|||
+ ") to make room for similarly named file.");
|
||||
}
|
||||
}
|
||||
LOG.debug("Backed up archive file from: " + archiveFile);
|
||||
LOG.debug("Backed up archive file from " + archiveFile);
|
||||
}
|
||||
|
||||
if (LOG.isTraceEnabled()) {
|
||||
|
@ -418,25 +417,25 @@ public class HFileArchiver {
|
|||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Failed to create the archive directory: " + archiveDir, e);
|
||||
LOG.warn("Failed to create directory: " + archiveDir, e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
success = currentFile.moveAndClose(archiveFile);
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Failed to archive file: " + currentFile + " on try #" + i, e);
|
||||
LOG.warn("Failed to archive " + currentFile + " on try #" + i, e);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
LOG.error("Failed to archive file:" + currentFile);
|
||||
LOG.error("Failed to archive " + currentFile);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Finished archiving file from: " + currentFile + ", to: " + archiveFile);
|
||||
LOG.debug("Finished archiving from " + currentFile + ", to " + archiveFile);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public class MetaEditor {
|
|||
HRegionInfo regionInfo)
|
||||
throws IOException {
|
||||
putToMetaTable(catalogTracker, makePutFromRegionInfo(regionInfo));
|
||||
LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to META");
|
||||
LOG.info("Added " + regionInfo.getRegionNameAsString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -233,7 +233,7 @@ public class MetaEditor {
|
|||
addDaughtersToPut(put, splitA, splitB);
|
||||
meta.put(put);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Added region " + regionInfo.getRegionNameAsString() + " to META");
|
||||
LOG.debug("Added " + regionInfo.getRegionNameAsString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ public class MetaEditor {
|
|||
puts.add(makePutFromRegionInfo(regionInfo));
|
||||
}
|
||||
putsToMetaTable(catalogTracker, puts);
|
||||
LOG.info("Added " + puts.size() + " regions in META");
|
||||
LOG.info("Added " + puts.size());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,7 +286,7 @@ public class MetaEditor {
|
|||
addLocation(put, sn, openSeqNum);
|
||||
}
|
||||
putToMetaTable(catalogTracker, put);
|
||||
LOG.info("Added daughter " + regionInfo.getRegionNameAsString() +
|
||||
LOG.info("Added daughter " + regionInfo.getEncodedName() +
|
||||
(sn == null? ", serverName=null": ", serverName=" + sn.toString()));
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ public class MetaEditor {
|
|||
throws IOException {
|
||||
Delete delete = new Delete(regionInfo.getRegionName());
|
||||
deleteFromMetaTable(catalogTracker, delete);
|
||||
LOG.info("Deleted region " + regionInfo.getRegionNameAsString() + " from META");
|
||||
LOG.info("Deleted " + regionInfo.getRegionNameAsString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -477,7 +477,7 @@ public class MetaEditor {
|
|||
deletes.add(new Delete(hri.getRegionName()));
|
||||
}
|
||||
deleteFromMetaTable(catalogTracker, deletes);
|
||||
LOG.info("Deleted from META, regions: " + regionsInfo);
|
||||
LOG.info("Deleted " + regionsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -503,10 +503,10 @@ public class MetaEditor {
|
|||
}
|
||||
mutateMetaTable(catalogTracker, mutation);
|
||||
if (regionsToRemove != null && regionsToRemove.size() > 0) {
|
||||
LOG.debug("Deleted from META, regions: " + regionsToRemove);
|
||||
LOG.debug("Deleted " + regionsToRemove);
|
||||
}
|
||||
if (regionsToAdd != null && regionsToAdd.size() > 0) {
|
||||
LOG.debug("Add to META, regions: " + regionsToAdd);
|
||||
LOG.debug("Added " + regionsToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1270,13 +1270,10 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||
|
||||
HRegionInfo regionInfo = rs.getRegion();
|
||||
String regionNameStr = regionInfo.getRegionNameAsString();
|
||||
LOG.debug("The znode of " + regionNameStr
|
||||
+ " has been deleted, region state: " + rs);
|
||||
LOG.debug("Znode " + regionNameStr + " deleted, state: " + rs);
|
||||
if (rs.isOpened()) {
|
||||
ServerName serverName = rs.getServerName();
|
||||
regionOnline(regionInfo, serverName);
|
||||
LOG.info("The master has opened "
|
||||
+ regionNameStr + " that was online on " + serverName);
|
||||
boolean disabled = getZKTable().isDisablingOrDisabledTable(
|
||||
regionInfo.getTableName());
|
||||
if (!serverManager.isServerOnline(serverName) && !disabled) {
|
||||
|
|
|
@ -46,11 +46,10 @@ public class NamespaceJanitor extends Chore {
|
|||
private static final Log LOG = LogFactory.getLog(NamespaceJanitor.class.getName());
|
||||
private final MasterServices services;
|
||||
private AtomicBoolean enabled = new AtomicBoolean(true);
|
||||
private AtomicBoolean alreadyRunning = new AtomicBoolean(false);
|
||||
|
||||
public NamespaceJanitor(final MasterServices services) {
|
||||
super("NamespaceJanitor-" + services.getServerName().toShortString(),
|
||||
services.getConfiguration().getInt("hbase.namespacejanitor.interval", 30000),
|
||||
services.getConfiguration().getInt("hbase.namespacejanitor.interval", 300000),
|
||||
services);
|
||||
this.services = services;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ public class RegionStates {
|
|||
ServerName newServerName = serverName;
|
||||
if (serverName != null &&
|
||||
(state == State.CLOSED || state == State.OFFLINE)) {
|
||||
LOG.warn("Closed region " + hri.getShortNameToLog() + " still on "
|
||||
LOG.warn("Closed " + hri.getShortNameToLog() + " still on "
|
||||
+ serverName + "? Ignored, reset it to null");
|
||||
newServerName = null;
|
||||
}
|
||||
|
@ -282,12 +282,12 @@ public class RegionStates {
|
|||
String regionName = hri.getEncodedName();
|
||||
RegionState oldState = regionStates.get(regionName);
|
||||
if (oldState == null) {
|
||||
LOG.warn("Online a region not in RegionStates: " + hri.getShortNameToLog());
|
||||
LOG.warn("Online region not in RegionStates: " + hri.getShortNameToLog());
|
||||
} else {
|
||||
State state = oldState.getState();
|
||||
ServerName sn = oldState.getServerName();
|
||||
if (state != State.OPEN || sn == null || !sn.equals(serverName)) {
|
||||
LOG.debug("Online a region " + hri.getShortNameToLog() + " with current state=" + state +
|
||||
LOG.debug("Online " + hri.getShortNameToLog() + " with current state=" + state +
|
||||
", expected state=OPEN" + ", assigned to server: " + sn + " expected " + serverName);
|
||||
}
|
||||
}
|
||||
|
@ -331,17 +331,17 @@ public class RegionStates {
|
|||
String regionName = hri.getEncodedName();
|
||||
RegionState oldState = regionStates.get(regionName);
|
||||
if (oldState == null) {
|
||||
LOG.warn("Offline a region not in RegionStates: " + hri.getShortNameToLog());
|
||||
LOG.warn("Offline region not in RegionStates: " + hri.getShortNameToLog());
|
||||
} else if (LOG.isDebugEnabled()) {
|
||||
State state = oldState.getState();
|
||||
ServerName sn = oldState.getServerName();
|
||||
if (state != State.OFFLINE
|
||||
&& state != State.SPLITTING && state != State.MERGING) {
|
||||
LOG.debug("Offline a region " + hri.getShortNameToLog() + " with current state="
|
||||
LOG.debug("Offline " + hri.getShortNameToLog() + " with current state="
|
||||
+ state + ", expected state=OFFLINE/SPLITTING/MERGING");
|
||||
}
|
||||
if (sn != null && state == State.OFFLINE) {
|
||||
LOG.debug("Offline a region " + hri.getShortNameToLog()
|
||||
LOG.debug("Offline " + hri.getShortNameToLog()
|
||||
+ " with current state=OFFLINE, assigned to server: "
|
||||
+ sn + ", expected null");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue