|
@@ -57,8 +57,6 @@ import org.apache.hadoop.mapred.Reporter;
|
|
import org.apache.hadoop.mapred.OutputCollector;
|
|
import org.apache.hadoop.mapred.OutputCollector;
|
|
import org.apache.hadoop.mapred.JobConf;
|
|
import org.apache.hadoop.mapred.JobConf;
|
|
import org.apache.hadoop.mapred.Reducer;
|
|
import org.apache.hadoop.mapred.Reducer;
|
|
-import org.apache.hadoop.mapreduce.MRJobConfig;
|
|
|
|
-import org.apache.hadoop.mapreduce.TaskAttemptID;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* This program executes a specified operation that applies load to
|
|
* This program executes a specified operation that applies load to
|
|
@@ -689,9 +687,6 @@ public class NNBench {
|
|
dataDirName = conf.get("test.nnbench.datadir.name");
|
|
dataDirName = conf.get("test.nnbench.datadir.name");
|
|
op = conf.get("test.nnbench.operation");
|
|
op = conf.get("test.nnbench.operation");
|
|
readFile = conf.getBoolean("test.nnbench.readFileAfterOpen", false);
|
|
readFile = conf.getBoolean("test.nnbench.readFileAfterOpen", false);
|
|
- int taskId =
|
|
|
|
- TaskAttemptID.forName(conf.get(MRJobConfig.TASK_ATTEMPT_ID))
|
|
|
|
- .getTaskID().getId();
|
|
|
|
|
|
|
|
long totalTimeTPmS = 0l;
|
|
long totalTimeTPmS = 0l;
|
|
long startTimeTPmS = 0l;
|
|
long startTimeTPmS = 0l;
|
|
@@ -704,19 +699,18 @@ public class NNBench {
|
|
successfulFileOps = 0l;
|
|
successfulFileOps = 0l;
|
|
|
|
|
|
if (barrier()) {
|
|
if (barrier()) {
|
|
- String filePrefix = "file_" + taskId + "_";
|
|
|
|
if (op.equals(OP_CREATE_WRITE)) {
|
|
if (op.equals(OP_CREATE_WRITE)) {
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
- doCreateWriteOp(filePrefix, reporter);
|
|
|
|
|
|
+ doCreateWriteOp("file_" + hostName + "_", reporter);
|
|
} else if (op.equals(OP_OPEN_READ)) {
|
|
} else if (op.equals(OP_OPEN_READ)) {
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
- doOpenReadOp(filePrefix, reporter);
|
|
|
|
|
|
+ doOpenReadOp("file_" + hostName + "_", reporter);
|
|
} else if (op.equals(OP_RENAME)) {
|
|
} else if (op.equals(OP_RENAME)) {
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
- doRenameOp(filePrefix, reporter);
|
|
|
|
|
|
+ doRenameOp("file_" + hostName + "_", reporter);
|
|
} else if (op.equals(OP_DELETE)) {
|
|
} else if (op.equals(OP_DELETE)) {
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
startTimeTPmS = System.currentTimeMillis();
|
|
- doDeleteOp(filePrefix, reporter);
|
|
|
|
|
|
+ doDeleteOp("file_" + hostName + "_", reporter);
|
|
}
|
|
}
|
|
|
|
|
|
endTimeTPms = System.currentTimeMillis();
|
|
endTimeTPms = System.currentTimeMillis();
|