Skip to content

Commit

Permalink
update new workloads
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinjia committed Apr 14, 2015
1 parent 929efa9 commit 43b19b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Expand Up @@ -4,9 +4,9 @@
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
Expand All @@ -18,16 +18,17 @@
import java.io.IOException;
import java.util.List;

import tachyon.perf.PerfConstants;
import tachyon.perf.basic.PerfThread;
import tachyon.perf.basic.TaskConfiguration;
import tachyon.perf.benchmark.ListGenerator;
import tachyon.perf.benchmark.Operators;
import tachyon.perf.fs.PerfFileSystem;
import tachyon.perf.fs.PerfFS;

public class IterateThread extends PerfThread {
protected int mBufferSize;
protected long mFileLength;
protected PerfFileSystem mFileSystem;
protected PerfFS mFileSystem;
protected int mIterations;
protected int mReadFilesNum;
protected boolean mShuffle;
Expand Down Expand Up @@ -134,7 +135,7 @@ public boolean setupThread(TaskConfiguration taskConf) {
mWorkDir = taskConf.getProperty("work.dir");
mWriteFilesNum = taskConf.getIntProperty("write.files.per.thread");
try {
mFileSystem = PerfFileSystem.get();
mFileSystem = PerfConstants.getFileSystem();
initSyncBarrier();
} catch (IOException e) {
LOG.error("Failed to setup thread, task " + mTaskId + " - thread " + mId, e);
Expand All @@ -156,4 +157,4 @@ public boolean cleanupThread(TaskConfiguration taskConf) {
return true;
}

}
}
Expand Up @@ -4,9 +4,9 @@
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
Expand All @@ -19,19 +19,20 @@
import java.util.List;
import java.util.Random;

import tachyon.perf.PerfConstants;
import tachyon.perf.basic.PerfThread;
import tachyon.perf.basic.TaskConfiguration;
import tachyon.perf.benchmark.ListGenerator;
import tachyon.perf.benchmark.Operators;
import tachyon.perf.fs.PerfFileSystem;
import tachyon.perf.fs.PerfFS;

public class MixtureThread extends PerfThread {
private Random mRand;

private int mBasicFilesNum;
private int mBufferSize;
private long mFileLength;
private PerfFileSystem mFileSystem;
private PerfFS mFileSystem;
private int mReadFilesNum;
private String mWorkDir;
private int mWriteFilesNum;
Expand Down Expand Up @@ -152,7 +153,7 @@ public boolean setupThread(TaskConfiguration taskConf) {
mWorkDir = taskConf.getProperty("work.dir");
mWriteFilesNum = taskConf.getIntProperty("write.files.per.thread");
try {
mFileSystem = PerfFileSystem.get();
mFileSystem = PerfConstants.getFileSystem();
initSyncBarrier();
} catch (IOException e) {
LOG.error("Failed to setup thread, task " + mTaskId + " - thread " + mId, e);
Expand Down

0 comments on commit 43b19b4

Please sign in to comment.