HBASE-12607 TestHBaseFsck#testParallelHbck fails running against hadoop 2.6.0
This commit is contained in:
parent
7310fa2ba7
commit
57b1efaabe
|
@ -129,6 +129,7 @@ import org.apache.hadoop.util.Tool;
|
|||
import org.apache.hadoop.util.ToolRunner;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
|
@ -329,6 +330,7 @@ public class HBaseFsck extends Configured {
|
|||
* @throws IOException
|
||||
*/
|
||||
private FSDataOutputStream checkAndMarkRunningHbck() throws IOException {
|
||||
long start = EnvironmentEdgeManager.currentTime();
|
||||
try {
|
||||
FileSystem fs = FSUtils.getCurrentFileSystem(getConf());
|
||||
FsPermission defaultPerms = FSUtils.getFilePermissions(fs, getConf(),
|
||||
|
@ -346,6 +348,13 @@ public class HBaseFsck extends Configured {
|
|||
} else {
|
||||
throw e;
|
||||
}
|
||||
} finally {
|
||||
long duration = EnvironmentEdgeManager.currentTime() - start;
|
||||
if (duration > 30000) {
|
||||
LOG.warn("Took " + duration + " milliseconds to obtain lock");
|
||||
// took too long to obtain lock
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue