public PrestoQueryExecution internalExecuteRawQuery(RequestContext context, String query, ClientSession clientSession, boolean update) { return new PrestoQueryExecution(clientSession, query, update); }
CompletableFuture<QueryResult> result = new PrestoQueryExecution(defaultSession, prestoQuery, true).getResult(); return result.thenApply(v -> { if (v.isFailed()) {
QueryResult queryResult = new PrestoQueryExecution(defaultSession, getNodeCount, false).getResult().join(); if (queryResult.isFailed()) { throw new RakamException(queryResult.getError().message, SERVICE_UNAVAILABLE);
prestoConfig.getColdStorageConnector(), project, checkCollection(collection), queryEnd, properties); QueryResult join = new PrestoQueryExecution(defaultSession, query, false).getResult().join(); if (join.isFailed()) { if (join.getError().message.contains("exists") || join.getError().message.equals(METADATA_ERROR)) {
@Override public void deleteProject(String project) { checkProject(project); try (Handle handle = dbi.open()) { handle.createStatement("delete from project where name = :project") .bind("project", project).execute(); } for (String collectionName : getCollectionNames(project)) { String query = format("DROP TABLE %s.\"%s\".\"%s\"", prestoConfig.getColdStorageConnector(), project, collectionName); QueryResult join = new PrestoQueryExecution(defaultSession, query, true).getResult().join(); if (join.isFailed()) { LOGGER.error("Error while deleting table %s.%s : %s", project, collectionName, join.getError().toString()); } } super.onDeleteProject(project); }