public ClientProtos.GetQueryStatusResponse getQueryStatus(
RpcController controller,
ClientProtos.GetQueryStatusRequest request) throws ServiceException {
ClientProtos.GetQueryStatusResponse.Builder builder
= ClientProtos.GetQueryStatusResponse.newBuilder();
QueryId queryId = new QueryId(request.getQueryId());
builder.setQueryId(request.getQueryId());
if (queryId.equals(QueryIdFactory.NULL_QUERY_ID)) {
builder.setResultCode(ClientProtos.ResultCode.OK);
builder.setState(TajoProtos.QueryState.QUERY_SUCCEEDED);
} else {
QueryMasterTask queryMasterTask = workerContext.getQueryMaster().getQueryMasterTask(queryId);
builder.setResultCode(ClientProtos.ResultCode.OK);