builder.setQueryMasterHost(bindAddr.getHostName());
builder.setQueryMasterPort(bindAddr.getPort());
if (queryMasterTask != null) {
queryMasterTask.touchSessionTime();
Query query = queryMasterTask.getQuery();
builder.setState(query.getState());
builder.setProgress(query.getProgress());
builder.setSubmitTime(query.getAppSubmitTime());
builder.setInitTime(query.getInitializationTime());
builder.setHasResult(
!(queryMasterTask.getQueryTaskContext().getQueryContext().isCreateTable() ||
queryMasterTask.getQueryTaskContext().getQueryContext().isInsert())
);
if (query.getState() == TajoProtos.QueryState.QUERY_SUCCEEDED) {
builder.setFinishTime(query.getFinishTime());
} else {
builder.setFinishTime(System.currentTimeMillis());
}
} else {
builder.setState(TajoProtos.QueryState.QUERY_NOT_ASSIGNED);