try {
queryTaskContext = new QueryMasterTaskContext();
String resourceManagerClassName = systemConf.getVar(TajoConf.ConfVars.RESOURCE_MANAGER_CLASS);
if(resourceManagerClassName.indexOf(TajoWorkerResourceManager.class.getName()) >= 0) {
resourceAllocator = new TajoResourceAllocator(queryTaskContext);
} else {
resourceAllocator = new YarnResourceAllocator(queryTaskContext);
}
addService(resourceAllocator);