Skip to content
Merged
Show file tree
Hide file tree
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 @@ -64,7 +64,6 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
Expand All @@ -80,7 +79,6 @@
/**
* Test Export Snapshot Tool
*/
@Ignore // HBASE-24493
@Category({ VerySlowMapReduceTests.class, LargeTests.class })
public class TestExportSnapshot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2832,10 +2832,14 @@ private void startMiniMapReduceCluster(final int servers) throws IOException {
jvmOpts + " --add-opens java.base/java.lang=ALL-UNNAMED");
}

// Disable fs cache for DistributedFileSystem, to avoid YARN RM close the shared FileSystem
// instance and cause trouble in HBase. See HBASE-29802 for more details.
JobConf mrClusterConf = new JobConf(conf);
mrClusterConf.setBoolean("fs.hdfs.impl.disable.cache", true);
// Allow the user to override FS URI for this map-reduce cluster to use.
mrCluster =
new MiniMRCluster(servers, FS_URI != null ? FS_URI : FileSystem.get(conf).getUri().toString(),
1, null, null, new JobConf(this.conf));
1, null, null, mrClusterConf);
JobConf jobConf = MapreduceTestingShim.getJobConf(mrCluster);
if (jobConf == null) {
jobConf = mrCluster.createJobConf();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Set;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
import org.apache.hadoop.hbase.master.HMaster;
import org.apache.hadoop.hbase.regionserver.HRegion;
Expand All @@ -45,7 +44,6 @@
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService;
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService;
import org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse;

/**
* This class creates a single process HBase cluster. each server. The master uses the 'default'
Expand Down Expand Up @@ -122,7 +120,7 @@ public Configuration getConfiguration() {
* only, not All filesystems as the FileSystem system exit hook does.
*/
public static class MiniHBaseClusterRegionServer extends HRegionServer {
private Thread shutdownThread = null;

private User user = null;
/**
* List of RegionServers killed so far. ServerName also comprises startCode of a server, so any
Expand All @@ -137,20 +135,6 @@ public MiniHBaseClusterRegionServer(Configuration conf)
this.user = User.getCurrent();
}

/*
* @param currentfs We return this if we did not make a new one.
* @param uniqueName Same name used to help identify the created fs.
* @return A new fs instance if we are up on DistributeFileSystem.
*/

@Override
protected void handleReportForDutyResponse(final RegionServerStartupResponse c)
throws IOException {
super.handleReportForDutyResponse(c);
// Run this thread to shutdown our filesystem on way out.
this.shutdownThread = new SingleFileSystemShutdownThread(getFileSystem());
}

@Override
public void run() {
try {
Expand All @@ -163,12 +147,6 @@ public Object run() {
});
} catch (Throwable t) {
LOG.error("Exception in run", t);
} finally {
// Run this on the way out.
if (this.shutdownThread != null) {
this.shutdownThread.start();
Threads.shutdown(this.shutdownThread, 30000);
}
}
}

Expand Down Expand Up @@ -198,29 +176,6 @@ private void abortRegionServer(String reason, Throwable cause) {
}
}

/**
* Alternate shutdown hook. Just shuts down the passed fs, not all as default filesystem hook
* does.
*/
static class SingleFileSystemShutdownThread extends Thread {
private final FileSystem fs;

SingleFileSystemShutdownThread(final FileSystem fs) {
super("Shutdown of " + fs);
this.fs = fs;
}

@Override
public void run() {
try {
LOG.info("Hook closing fs=" + this.fs);
this.fs.close();
} catch (IOException e) {
LOG.warn("Running hook", e);
}
}
}

private void init(final int nMasterNodes, final int numAlwaysStandByMasters,
final int nRegionNodes, List<Integer> rsPorts, Class<? extends HMaster> masterClass,
Class<? extends MiniHBaseCluster.MiniHBaseClusterRegionServer> regionserverClass)
Expand Down