Separating QueryMaster and TaskRunner roles in worker

Details

Description

In C++ implementation of Tajo worker,
I think it is better to maintain Java code of QueryMaster and implement only TaskRunner as C++ code, rather than implementing both QueryMaster and TaskRunner as C++ code.

If not specified in configuration, worker works as before,
i.e., one worker has both querymaster and taskrunner roles.

How to have querymaster and taskrunner as separate daemons:
1) add following in conf/tajo-site.xml
tajo.worker.mode.querymaster=false
2) add list of querymaster servers in conf/querymaster
3) execute bin/tajo-start.sh

How to start/stop querymaster in a given server
bin/tajo-daemon.sh start querymaster
bin/tajo-daemon.sh stop querymaster

This is a nice work.
But, how about distinguish QueryMaster and TaskRunner roles in the java implementation, too?
Due to the inconsistency of supported modes in the java and C++, the configuration looks little complex.

Jihoon Son
added a comment - 23/Oct/13 06:22 This is a nice work.
But, how about distinguish QueryMaster and TaskRunner roles in the java implementation, too?
Due to the inconsistency of supported modes in the java and C++, the configuration looks little complex.

Jihoon, what this patch does is actually distinguishing QueryMaster and TaskRunner roles in the java implementation.
You can run java TaskRunner Worker by setting as follows:
tajo.worker.mode.querymaster=false
tajo.worker.mode.taskrunner=true

C++ TaskRunner will be implemented maybe next month.

I think my issue explanation made you confused, hence, I updated the issue description.

Keuntae Park
added a comment - 24/Oct/13 10:48 Jihoon, what this patch does is actually distinguishing QueryMaster and TaskRunner roles in the java implementation.
You can run java TaskRunner Worker by setting as follows:
tajo.worker.mode.querymaster=false
tajo.worker.mode.taskrunner=true
C++ TaskRunner will be implemented maybe next month.
I think my issue explanation made you confused, hence, I updated the issue description.

Keuntae, thanks for the further explanation.
You are right. To implement C++ TaskRunner, QueryMaster and TaskRunner roles in java should be distinguished first.

But, the configuration still looks little complicated.
I mean that added configurations are not intuitive.
For example, when both tajo.worker.mode.querymaster and tajo.worker.mode.taskrunner are set to false, it is hard to suppose what will happen.

Jihoon Son
added a comment - 25/Oct/13 02:05 Keuntae, thanks for the further explanation.
You are right. To implement C++ TaskRunner, QueryMaster and TaskRunner roles in java should be distinguished first.
But, the configuration still looks little complicated.
I mean that added configurations are not intuitive.
For example, when both tajo.worker.mode.querymaster and tajo.worker.mode.taskrunner are set to false, it is hard to suppose what will happen.

I think that it is a temporary and good way to help us develop C++ TaskRunner without QueryMaster. This feature seems to be used by only developers rather than users. Also, In default, both configs are true. And, the case where both are true is the same to the current mode, so it would be compatible to current systems.

Hyunsik Choi
added a comment - 25/Oct/13 02:37 - edited I think that it is a temporary and good way to help us develop C++ TaskRunner without QueryMaster. This feature seems to be used by only developers rather than users. Also, In default, both configs are true. And, the case where both are true is the same to the current mode, so it would be compatible to current systems.

Keuntae Park
added a comment - 25/Oct/13 04:23 - edited Thank you for the review, Jihoon, Hyunsik
I've uploaded another patch:
when both tajo.worker.mode.querymaster, tajo.worker.mode.taskrunner are set as false, worker is terminated with fatal message.
(if parameter is not set, it is treated as true)
and, rebase