HBASE-3085 TestSchemaResource broken on TRUNK up on HUDSON

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1004860 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-10-06 00:02:22 +00:00
parent 24a3e3e5ef
commit 66a4faa7b0
5 changed files with 20 additions and 3 deletions

View File

@ -587,6 +587,12 @@ public class AssignmentManager extends ZooKeeperListener {
* @param regionName server to be assigned
*/
public void assign(HRegionInfo region) {
String tableName = region.getTableDesc().getNameAsString();
if (isTableDisabled(tableName)) {
LOG.info("Table " + tableName + " disabled; skipping assign of " +
region.getRegionNameAsString());
return;
}
RegionState state = addToRegionsInTransition(region);
synchronized (state) {
assign(state);

View File

@ -68,6 +68,10 @@ public class DisableTableHandler extends EventHandler {
}
private void handleDisableTable() throws IOException {
if (this.assignmentManager.isTableDisabled(this.tableNameStr)) {
LOG.info("Table " + tableNameStr + " is already disabled; skipping disable");
return;
}
// Set the table as disabled so it doesn't get re-onlined
assignmentManager.disableTable(this.tableNameStr);
// Get the online regions of this table.

View File

@ -67,6 +67,10 @@ public class EnableTableHandler extends EventHandler {
}
private void handleEnableTable() throws IOException {
if (!this.assignmentManager.isTableDisabled(this.tableNameStr)) {
LOG.info("Table " + tableNameStr + " is not disabled; skipping enable");
return;
}
// Get the regions of this table
List<HRegionInfo> regions = MetaReader.getTableRegions(this.ct, tableName);
// Set the table as disabled so it doesn't get re-onlined

View File

@ -1513,6 +1513,8 @@ public class HLog implements Syncable {
Configuration conf = HBaseConfiguration.create();
for (int i = 1; i < args.length; i++) {
try {
conf.set("fs.default.name", args[i]);
conf.set("fs.defaultFS", args[i]);
Path logPath = new Path(args[i]);
if (dump) {
dump(conf, logPath);

View File

@ -296,10 +296,11 @@ public class HLogSplitter {
"hbase.regionserver.hlog.splitlog.writer.threads", 3);
boolean skipErrors = conf.getBoolean("hbase.skip.errors", false);
HashMap<byte[], Future> writeFutureResult = new HashMap<byte[], Future>();
ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
builder.setNameFormat("SplitWriter-%1$d");
ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
builder.setNameFormat("SplitWriter-%1$d");
ThreadFactory factory = builder.build();
ThreadPoolExecutor threadPool = (ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads, factory);
ThreadPoolExecutor threadPool =
(ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads, factory);
for (final byte[] region : splitLogsMap.keySet()) {
Callable splitter = createNewSplitter(rootDir, logWriters, splitLogsMap,
region, fs, conf);