bharatviswa504 commented on a change in pull request #2371:
URL: https://github.com/apache/ozone/pull/2371#discussion_r678130218
##########
File path:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconPipelineReportHandler.java
##########
@@ -63,13 +64,17 @@ protected void processPipelineReport(PipelineReport report,
PipelineID pipelineID = PipelineID.getFromProtobuf(report.getPipelineID());
if (!reconPipelineManager.containsPipeline(pipelineID)) {
LOG.info("Unknown pipeline {}. Trying to get from SCM.", pipelineID);
- Pipeline pipelineFromScm = null;
+ Pipeline pipelineFromScm;
try {
pipelineFromScm =
scmServiceProvider.getPipeline(report.getPipelineID());
- } catch (PipelineNotFoundException pnfe) {
- LOG.error("Could not find pipeline at SCM: {}.", pipelineID, pnfe);
+ } catch (IOException ex) {
+ assert (ex instanceof RemoteException);
+ IOException exception = ((RemoteException) ex)
+ .unwrapRemoteException(PipelineNotFoundException.class);
+ assert (exception instanceof PipelineNotFoundException);
Review comment:
Not understood why we need this assert here. It can also be any other
exception right? (Lets say when SCM's are down)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]