bharatviswa504 commented on a change in pull request #2371:
URL: https://github.com/apache/ozone/pull/2371#discussion_r658654635
##########
File path:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconPipelineReportHandler.java
##########
@@ -63,8 +63,16 @@ 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 =
- scmServiceProvider.getPipeline(report.getPipelineID());
+ Pipeline pipelineFromScm = null;
+
+ try {
+ pipelineFromScm =
+ scmServiceProvider.getPipeline(report.getPipelineID());
+ } catch (PipelineNotFoundException pnfe) {
Review comment:
From SCMClient, I don't think we get PipelineNotFoundException I believe
we get exception as IOException.
```
public static IOException getRemoteException(ServiceException se) {
Throwable e = se.getCause();
if (e == null) {
return new IOException(se);
}
return e instanceof IOException ? (IOException) e : new IOException(se);
}
```
```
private ScmContainerLocationResponse submitRequest(
StorageContainerLocationProtocolProtos.Type type,
Consumer<Builder> builderConsumer) throws IOException {
final ScmContainerLocationResponse response;
try {
Builder builder = ScmContainerLocationRequest.newBuilder()
.setCmdType(type)
.setVersion(CURRENT_VERSION)
.setTraceID(TracingUtil.exportCurrentSpan());
builderConsumer.accept(builder);
ScmContainerLocationRequest wrapper = builder.build();
response = submitRpcRequest(wrapper);
} catch (ServiceException ex) {
throw ProtobufHelper.getRemoteException(ex);
}
return response;
}
```
Can you add a simple test with a cluster start, and see do we get
PipelineNotFoundException?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]