HBASE-17970 Set yarn.app.mapreduce.am.staging-dir when starting MiniMRCluster
Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
parent
923508c9de
commit
73d80bb416
|
@ -91,11 +91,11 @@ import org.apache.hadoop.hbase.master.HMaster;
|
|||
import org.apache.hadoop.hbase.master.RegionStates;
|
||||
import org.apache.hadoop.hbase.master.ServerManager;
|
||||
import org.apache.hadoop.hbase.regionserver.BloomType;
|
||||
import org.apache.hadoop.hbase.regionserver.ChunkCreator;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegion;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegionServer;
|
||||
import org.apache.hadoop.hbase.regionserver.HStore;
|
||||
import org.apache.hadoop.hbase.regionserver.InternalScanner;
|
||||
import org.apache.hadoop.hbase.regionserver.ChunkCreator;
|
||||
import org.apache.hadoop.hbase.regionserver.MemStoreLABImpl;
|
||||
import org.apache.hadoop.hbase.regionserver.Region;
|
||||
import org.apache.hadoop.hbase.regionserver.RegionScanner;
|
||||
|
@ -723,6 +723,8 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
conf.set("mapreduce.jobtracker.staging.root.dir",
|
||||
new Path(root, "mapreduce-jobtracker-staging-root-dir").toString());
|
||||
conf.set("mapreduce.job.working.dir", new Path(root, "mapred-working-dir").toString());
|
||||
conf.set("yarn.app.mapreduce.am.staging-dir",
|
||||
new Path(root, "mapreduce-am-staging-root-dir").toString());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.hbase.snapshot;
|
|||
|
||||
import static org.apache.hadoop.util.ToolRunner.run;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
@ -43,9 +43,9 @@ import org.apache.hadoop.hbase.HRegionInfo;
|
|||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.client.Admin;
|
||||
import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
|
||||
import org.apache.hadoop.hbase.testclassification.LargeTests;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.SnapshotDescription;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest;
|
||||
import org.apache.hadoop.hbase.testclassification.LargeTests;
|
||||
import org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.FSUtils;
|
||||
|
@ -96,19 +96,14 @@ public class TestExportSnapshot {
|
|||
@BeforeClass
|
||||
public static void setUpBeforeClass() throws Exception {
|
||||
setUpBaseConf(TEST_UTIL.getConfiguration());
|
||||
// Setup separate test-data directory for MR cluster and set corresponding configurations.
|
||||
// Otherwise, different test classes running MR cluster can step on each other.
|
||||
TEST_UTIL.getDataTestDir();
|
||||
TEST_UTIL.startMiniZKCluster();
|
||||
TEST_UTIL.startMiniCluster(1, 3);
|
||||
TEST_UTIL.startMiniMapReduceCluster();
|
||||
TEST_UTIL.startMiniHBaseCluster(1, 3);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDownAfterClass() throws Exception {
|
||||
TEST_UTIL.shutdownMiniHBaseCluster();
|
||||
TEST_UTIL.shutdownMiniMapReduceCluster();
|
||||
TEST_UTIL.shutdownMiniZKCluster();
|
||||
TEST_UTIL.shutdownMiniCluster();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
|
||||
package org.apache.hadoop.hbase.snapshot;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -32,8 +29,8 @@ import org.apache.hadoop.hbase.HConstants;
|
|||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
|
||||
import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils.SnapshotMock;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MapReduceTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Rule;
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
package org.apache.hadoop.hbase.snapshot;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HRegionInfo;
|
||||
import org.apache.hadoop.hbase.mob.MobConstants;
|
||||
|
@ -35,7 +33,6 @@ import org.junit.experimental.categories.Category;
|
|||
*/
|
||||
@Category({VerySlowRegionServerTests.class, LargeTests.class})
|
||||
public class TestMobExportSnapshot extends TestExportSnapshot {
|
||||
private final Log LOG = LogFactory.getLog(getClass());
|
||||
|
||||
public static void setUpBaseConf(Configuration conf) {
|
||||
TestExportSnapshot.setUpBaseConf(conf);
|
||||
|
@ -45,12 +42,8 @@ public class TestMobExportSnapshot extends TestExportSnapshot {
|
|||
@BeforeClass
|
||||
public static void setUpBeforeClass() throws Exception {
|
||||
setUpBaseConf(TEST_UTIL.getConfiguration());
|
||||
// Setup separate test-data directory for MR cluster and set corresponding configurations.
|
||||
// Otherwise, different test classes running MR cluster can step on each other.
|
||||
TEST_UTIL.getDataTestDir();
|
||||
TEST_UTIL.startMiniZKCluster();
|
||||
TEST_UTIL.startMiniCluster(1, 3);
|
||||
TEST_UTIL.startMiniMapReduceCluster();
|
||||
TEST_UTIL.startMiniHBaseCluster(1, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -48,9 +48,8 @@ public class TestMobSecureExportSnapshot extends TestMobExportSnapshot {
|
|||
// setup configuration
|
||||
SecureTestUtil.enableSecurity(TEST_UTIL.getConfiguration());
|
||||
|
||||
TEST_UTIL.startMiniZKCluster();
|
||||
TEST_UTIL.startMiniCluster(1, 3);
|
||||
TEST_UTIL.startMiniMapReduceCluster();
|
||||
TEST_UTIL.startMiniHBaseCluster(1, 3);
|
||||
|
||||
// Wait for the ACL table to become available
|
||||
TEST_UTIL.waitTableEnabled(AccessControlLists.ACL_TABLE_NAME);
|
||||
|
|
|
@ -53,9 +53,8 @@ public class TestSecureExportSnapshot extends TestExportSnapshot {
|
|||
// setup configuration
|
||||
SecureTestUtil.enableSecurity(TEST_UTIL.getConfiguration());
|
||||
|
||||
TEST_UTIL.startMiniZKCluster();
|
||||
TEST_UTIL.startMiniCluster(1, 3);
|
||||
TEST_UTIL.startMiniMapReduceCluster();
|
||||
TEST_UTIL.startMiniHBaseCluster(1, 3);
|
||||
|
||||
// Wait for the ACL table to become available
|
||||
TEST_UTIL.waitTableEnabled(AccessControlLists.ACL_TABLE_NAME);
|
||||
|
|
Loading…
Reference in New Issue