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:
parent
24a3e3e5ef
commit
66a4faa7b0
|
@ -587,6 +587,12 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
* @param regionName server to be assigned
|
* @param regionName server to be assigned
|
||||||
*/
|
*/
|
||||||
public void assign(HRegionInfo region) {
|
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);
|
RegionState state = addToRegionsInTransition(region);
|
||||||
synchronized (state) {
|
synchronized (state) {
|
||||||
assign(state);
|
assign(state);
|
||||||
|
|
|
@ -68,6 +68,10 @@ public class DisableTableHandler extends EventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleDisableTable() throws IOException {
|
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
|
// Set the table as disabled so it doesn't get re-onlined
|
||||||
assignmentManager.disableTable(this.tableNameStr);
|
assignmentManager.disableTable(this.tableNameStr);
|
||||||
// Get the online regions of this table.
|
// Get the online regions of this table.
|
||||||
|
|
|
@ -67,6 +67,10 @@ public class EnableTableHandler extends EventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEnableTable() throws IOException {
|
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
|
// Get the regions of this table
|
||||||
List<HRegionInfo> regions = MetaReader.getTableRegions(this.ct, tableName);
|
List<HRegionInfo> regions = MetaReader.getTableRegions(this.ct, tableName);
|
||||||
// Set the table as disabled so it doesn't get re-onlined
|
// Set the table as disabled so it doesn't get re-onlined
|
||||||
|
|
|
@ -1513,6 +1513,8 @@ public class HLog implements Syncable {
|
||||||
Configuration conf = HBaseConfiguration.create();
|
Configuration conf = HBaseConfiguration.create();
|
||||||
for (int i = 1; i < args.length; i++) {
|
for (int i = 1; i < args.length; i++) {
|
||||||
try {
|
try {
|
||||||
|
conf.set("fs.default.name", args[i]);
|
||||||
|
conf.set("fs.defaultFS", args[i]);
|
||||||
Path logPath = new Path(args[i]);
|
Path logPath = new Path(args[i]);
|
||||||
if (dump) {
|
if (dump) {
|
||||||
dump(conf, logPath);
|
dump(conf, logPath);
|
||||||
|
|
|
@ -299,7 +299,8 @@ public class HLogSplitter {
|
||||||
ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
|
ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
|
||||||
builder.setNameFormat("SplitWriter-%1$d");
|
builder.setNameFormat("SplitWriter-%1$d");
|
||||||
ThreadFactory factory = builder.build();
|
ThreadFactory factory = builder.build();
|
||||||
ThreadPoolExecutor threadPool = (ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads, factory);
|
ThreadPoolExecutor threadPool =
|
||||||
|
(ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads, factory);
|
||||||
for (final byte[] region : splitLogsMap.keySet()) {
|
for (final byte[] region : splitLogsMap.keySet()) {
|
||||||
Callable splitter = createNewSplitter(rootDir, logWriters, splitLogsMap,
|
Callable splitter = createNewSplitter(rootDir, logWriters, splitLogsMap,
|
||||||
region, fs, conf);
|
region, fs, conf);
|
||||||
|
|
Loading…
Reference in New Issue