Skip to content

Commit

Permalink
rename properties for min/max workers threads to keep consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
SiyuanHe committed Feb 25, 2015
1 parent 6609edb commit 41d2817
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions conf/tachyon-env.sh.template
Expand Up @@ -71,11 +71,11 @@ export TACHYON_JAVA_OPTS+="
-Dtachyon.underfs.address=$TACHYON_UNDERFS_ADDRESS -Dtachyon.underfs.address=$TACHYON_UNDERFS_ADDRESS
-Dtachyon.underfs.hdfs.impl=$TACHYON_UNDERFS_HDFS_IMPL -Dtachyon.underfs.hdfs.impl=$TACHYON_UNDERFS_HDFS_IMPL
-Dtachyon.data.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/data -Dtachyon.data.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/data
-Dtachyon.worker.maxworker.threads=$TACHYON_WORKER_MAX_THREADS -Dtachyon.worker.max.worker.threads=$TACHYON_WORKER_MAX_WORKER_THREADS
-Dtachyon.workers.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/workers -Dtachyon.workers.folder=$TACHYON_UNDERFS_ADDRESS/tmp/tachyon/workers
-Dtachyon.worker.memory.size=$TACHYON_WORKER_MEMORY_SIZE -Dtachyon.worker.memory.size=$TACHYON_WORKER_MEMORY_SIZE
-Dtachyon.worker.data.folder=/tachyonworker/ -Dtachyon.worker.data.folder=/tachyonworker/
-Dtachyon.master.maxworker.threads=$TACHYON_MASTER_MAX_THREADS -Dtachyon.master.max.worker.threads=$TACHYON_MASTER_MAX_WORKER_THREADS
-Dtachyon.master.worker.timeout.ms=60000 -Dtachyon.master.worker.timeout.ms=60000
-Dtachyon.master.hostname=$TACHYON_MASTER_ADDRESS -Dtachyon.master.hostname=$TACHYON_MASTER_ADDRESS
-Dtachyon.master.journal.folder=$TACHYON_HOME/journal/ -Dtachyon.master.journal.folder=$TACHYON_HOME/journal/
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/tachyon/master/TachyonMaster.java
Expand Up @@ -73,8 +73,8 @@ public static void main(String[] args) {
private EditLogProcessor mEditLogProcessor; private EditLogProcessor mEditLogProcessor;
private int mWebPort; private int mWebPort;


private int mMaxWorkerThread; private int mMaxWorkerThreads;
private int mMinWorkerThread; private int mMinWorkerThreads;
private boolean mZookeeperMode = false; private boolean mZookeeperMode = false;
private final ExecutorService mExecutorService = Executors.newFixedThreadPool(2, private final ExecutorService mExecutorService = Executors.newFixedThreadPool(2,
ThreadFactoryUtils.daemon("heartbeat-master-%d")); ThreadFactoryUtils.daemon("heartbeat-master-%d"));
Expand All @@ -101,13 +101,13 @@ public TachyonMaster(TachyonConf tachyonConf) {


mIsStarted = false; mIsStarted = false;
mWebPort = webPort; mWebPort = webPort;
mMinWorkerThread = mTachyonConf.getInt(Constants.MASTER_MIN_WORKER_THREADS, mMinWorkerThreads = mTachyonConf.getInt(Constants.MASTER_MIN_WORKER_THREADS,
Runtime.getRuntime().availableProcessors()); Runtime.getRuntime().availableProcessors());


//Set max thread to max integer by default //Set max thread to max integer by default
//An property will be set/added in tachyon-env for users to specify a number that make sense in //An property will be set/added in tachyon-env for users to specify a number that make sense in
//their production environment //their production environment
mMaxWorkerThread = mTachyonConf.getInt(Constants.MASTER_MAX_WORKER_THREADS, Integer.MAX_VALUE); mMaxWorkerThreads = mTachyonConf.getInt(Constants.MASTER_MAX_WORKER_THREADS, Integer.MAX_VALUE);


try { try {
// Extract the port from the generated socket. // Extract the port from the generated socket.
Expand Down Expand Up @@ -238,8 +238,8 @@ private void setup() throws IOException, TTransportException {


mMasterServiceServer = new TThreadPoolServer( new TThreadPoolServer.Args( mMasterServiceServer = new TThreadPoolServer( new TThreadPoolServer.Args(
mServerTServerSocket) mServerTServerSocket)
.maxWorkerThreads(mMaxWorkerThread) .maxWorkerThreads(mMaxWorkerThreads)
.minWorkerThreads(mMinWorkerThread) .minWorkerThreads(mMinWorkerThreads)
.processor(masterServiceProcessor) .processor(masterServiceProcessor)
.transportFactory(new TFramedTransport.Factory()) .transportFactory(new TFramedTransport.Factory())
.protocolFactory(new TBinaryProtocol.Factory())); .protocolFactory(new TBinaryProtocol.Factory()));
Expand Down

0 comments on commit 41d2817

Please sign in to comment.