|
@@ -30,7 +30,7 @@ import org.apache.hadoop.fs.FileSystem;
|
|
|
import org.apache.hadoop.fs.Path;
|
|
|
import org.apache.hadoop.fs.FSDataOutputStream;
|
|
|
import org.apache.hadoop.security.UserGroupInformation;
|
|
|
-import org.apache.hadoop.mapreduce.server.tasktracker.TTConfig;
|
|
|
+import org.apache.hadoop.mapreduce.MRJobConfig;
|
|
|
|
|
|
import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
@@ -56,7 +56,7 @@ public class TestIndexCache {
|
|
|
r.setSeed(seed);
|
|
|
System.out.println("seed: " + seed);
|
|
|
fs.delete(p, true);
|
|
|
- conf.setInt(TTConfig.TT_INDEX_CACHE, 1);
|
|
|
+ conf.setInt(MRJobConfig.SHUFFLE_INDEX_CACHE, 1);
|
|
|
final int partsPerMap = 1000;
|
|
|
final int bytesPerFile = partsPerMap * 24;
|
|
|
IndexCache cache = new IndexCache(conf);
|
|
@@ -127,7 +127,7 @@ public class TestIndexCache {
|
|
|
public void testBadIndex() throws Exception {
|
|
|
final int parts = 30;
|
|
|
fs.delete(p, true);
|
|
|
- conf.setInt(TTConfig.TT_INDEX_CACHE, 1);
|
|
|
+ conf.setInt(MRJobConfig.SHUFFLE_INDEX_CACHE, 1);
|
|
|
IndexCache cache = new IndexCache(conf);
|
|
|
|
|
|
Path f = new Path(p, "badindex");
|
|
@@ -159,7 +159,7 @@ public class TestIndexCache {
|
|
|
@Test
|
|
|
public void testInvalidReduceNumberOrLength() throws Exception {
|
|
|
fs.delete(p, true);
|
|
|
- conf.setInt(TTConfig.TT_INDEX_CACHE, 1);
|
|
|
+ conf.setInt(MRJobConfig.SHUFFLE_INDEX_CACHE, 1);
|
|
|
final int partsPerMap = 1000;
|
|
|
final int bytesPerFile = partsPerMap * 24;
|
|
|
IndexCache cache = new IndexCache(conf);
|
|
@@ -205,7 +205,7 @@ public class TestIndexCache {
|
|
|
// fails with probability of 100% on code before MAPREDUCE-2541,
|
|
|
// so it is repeatable in practice.
|
|
|
fs.delete(p, true);
|
|
|
- conf.setInt(TTConfig.TT_INDEX_CACHE, 10);
|
|
|
+ conf.setInt(MRJobConfig.SHUFFLE_INDEX_CACHE, 10);
|
|
|
// Make a big file so removeMapThread almost surely runs faster than
|
|
|
// getInfoThread
|
|
|
final int partsPerMap = 100000;
|
|
@@ -251,7 +251,7 @@ public class TestIndexCache {
|
|
|
@Test
|
|
|
public void testCreateRace() throws Exception {
|
|
|
fs.delete(p, true);
|
|
|
- conf.setInt(TTConfig.TT_INDEX_CACHE, 1);
|
|
|
+ conf.setInt(MRJobConfig.SHUFFLE_INDEX_CACHE, 1);
|
|
|
final int partsPerMap = 1000;
|
|
|
final int bytesPerFile = partsPerMap * 24;
|
|
|
final IndexCache cache = new IndexCache(conf);
|