protected AtlasResults convertTokenizedLineToAtlasResults(String[] tokenizedLine) { try { AtlasResults atlasResults = kayentaObjectMapper.readValue(tokenizedLine[1], AtlasResults.class); String atlasResultsType = atlasResults.getType(); if (StringUtils.isEmpty(atlasResultsType) || !EXPECTED_RESULTS_TYPE_LIST.contains(atlasResultsType)) { if (atlasResultsType.equals("error")) { if (atlasResults.getMessage().contains("IllegalStateException")) { throw new FatalQueryException("Atlas query failed: " + atlasResults.getMessage()); } else { throw new RetryableQueryException("Atlas query failed: " + atlasResults.getMessage()); } } log.info("Received results of type other than 'timeseries' or 'close' from Atlas: {}", atlasResults); return null; } return atlasResults; } catch (IOException e) { log.error("Cannot process Atlas results", e); return null; } }
protected AtlasResults convertTokenizedLineToAtlasResults(String[] tokenizedLine) { try { AtlasResults atlasResults = kayentaObjectMapper.readValue(tokenizedLine[1], AtlasResults.class); String atlasResultsType = atlasResults.getType(); if (StringUtils.isEmpty(atlasResultsType) || !EXPECTED_RESULTS_TYPE_LIST.contains(atlasResultsType)) { if (atlasResultsType.equals("error")) { if (atlasResults.getMessage().contains("IllegalStateException")) { throw new FatalQueryException("Atlas query failed: " + atlasResults.getMessage()); } else { throw new RetryableQueryException("Atlas query failed: " + atlasResults.getMessage()); } } log.info("Received results of type other than 'timeseries' or 'close' from Atlas: {}", atlasResults); return null; } return atlasResults; } catch (IOException e) { log.error("Cannot process Atlas results", e); return null; } }