/** * If the outer loop should continue, this method returns successfully; * otherwise it throws a MissingPyramidException. * * @param pixels * @param pixelsPyramidFilePath * @throws MissingPyramidException */ protected void handleMissingPyramid(Pixels pixels, String pixelsPyramidFilePath) { if (!isReadOnlyRepo) { final MissingPyramidMessage mpm = new MissingPyramidMessage(this, pixels.getId()); pub.publishEvent(mpm); if (mpm.isRetry()) { log.debug("Retrying pyramid:" + pixelsPyramidFilePath); return; } } String msg = "Missing pyramid:" + pixelsPyramidFilePath; log.info(msg); backOff.throwMissingPyramidException(msg, pixels); }
/** * If the outer loop should continue, this method returns successfully; * otherwise it throws a MissingPyramidException. * @param pixels */ protected void handleMissingStatsInfo(Pixels pixels) { for (int channel = 0; channel < pixels.sizeOfChannels(); channel++) { if (pixels.getChannel(channel).getStatsInfo() != null) { return; } } long pixelsId = pixels.getId(); if (!isReadOnlyRepo) { final MissingStatsInfoMessage m = new MissingStatsInfoMessage(this, pixelsId); pub.publishEvent(m); if (m.isRetry()) { log.debug("Retrying stats info for Pixels:" + pixelsId); return; } } String msg = "Missing stats info for Pixels:" + pixelsId; log.info(msg); backOff.throwMissingPyramidException(msg, pixels); }