private FileSystem getFS(String hdfs, BaseResponse response) { org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(); conf.set("fs.defaultFS", hdfs); // Override default buffer size (4K) to 16K conf.setInt("io.file.buffer.size", 16384); final FileSystem fs; try { fs = FileSystem.get(conf); return fs; } catch (IOException e1) { NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.HDFS_CONNECTION_ERROR, e1, MessageFormat.format("Location: {0}", hdfs)); log.error(qe); response.addException(qe); throw new NotFoundException(qe, response); } }
private VoidResponse deleteModel(@Required("name") String name, String modelTableName, boolean reloadCache) { if (log.isDebugEnabled()) { log.debug("model name: " + name); log.debug("modelTableName: " + (null == modelTableName ? "" : modelTableName)); } VoidResponse response = new VoidResponse(); ModelList models = listModelNames(modelTableName); if (!models.getNames().contains(name)) throw new NotFoundException(null, response); datawave.webservice.model.Model model = getModel(name, modelTableName); deleteMapping(model, modelTableName, reloadCache); return response; }
resultsDir)); response.addException(qe); throw new NotFoundException(qe, response); log.error(qe); response.addException(qe); throw new NotFoundException(qe, response);
NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.NO_QUERY_OBJECT_MATCH); response.addException(qe); throw new NotFoundException(qe, response); throw new NotFoundException(qe, response);
log.error(qe); response.addException(qe); throw new NotFoundException(qe, response); throw new NotFoundException(qe, response);
jobId, jobDirectory)); response.addException(qe); throw new NotFoundException(qe, response); log.error(qe); response.addException(qe); throw new NotFoundException(qe, response);
NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.NO_MAPREDUCE_OBJECT_MATCH); response.addException(qe); throw new NotFoundException(qe, response); } else if (list.getResults().size() > 1) { NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.TOO_MANY_MAPREDUCE_OBJECT_MATCHES); response.addException(qe); throw new NotFoundException(qe, response); } else { MapReduceInfoResponse thisJob = list.getResults().get(0);
throw new NotFoundException(null, response);
NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.NO_MAPREDUCE_OBJECT_MATCH); response.addException(qe); throw new NotFoundException(qe, response); } else if (list.getResults().size() > 1) { NotFoundQueryException qe = new NotFoundQueryException(DatawaveErrorCode.TOO_MANY_MAPREDUCE_OBJECT_MATCHES); response.addException(qe); throw new NotFoundException(qe, response); } else { MapReduceInfoResponse thisJob = list.getResults().get(0);
throw new NotFoundException(e, response); } else { accumuloConnectionRequestBean.adminCancelConnectionRequest(originalQueryId);
throw new NotFoundException(e, response); } else { if (query.getSettings().getOwner().equals(owner)) {
response.addException(e); response.setResult("CachedResult not found"); throw new NotFoundException(e, response);