/** * Gets the status. * * @param qh the qh * @return the status */ @CliCommand( value = "query status", help = "Fetch status of executed query having query handle <query_handle>. " + DEFAULT_QUERY_HANDLE_DESCRIPTION) public String getStatus( @CliOption( key = {"", "query_handle"}, mandatory = false, help = "<query_handle>") String qh) { qh = getOrDefaultQueryHandleString(qh); QueryHandle handle = QueryHandle.fromString(qh); QueryStatus status = getClient().getQueryStatus(handle); if (status == null) { return "Unable to find status for " + handle; } return "Query Handle: " + qh + "\n" + status.toString(); }