You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/20 10:16:02 UTC
[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2371: HDDS-5390. reconPipelineReportHandler should not retry when pipeline not found
bharatviswa504 commented on a change in pull request #2371:
URL: https://github.com/apache/ozone/pull/2371#discussion_r672971961
##########
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:
````
try {
cluster.getStorageContainerLocationClient().getPipeline(HddsProtos.PipelineID.newBuilder().setId(UUID.randomUUID().toString()).build());
} catch (IOException ex) {
Assert.assertTrue(ex instanceof RemoteException);
PipelineNotFoundException exception = (PipelineNotFoundException) ((RemoteException) ex).unwrapRemoteException(PipelineNotFoundException.class);
Assert.assertTrue(exception instanceof PipelineNotFoundException);
}
````
We donot get PipelineNotFoundException, we get RemoteException wrapped with PipelineNotFoundException. We need to unwrap and check if it is PipelineNotFoundException.
##########
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:
````
try {
cluster.getStorageContainerLocationClient().getPipeline(HddsProtos.PipelineID.newBuilder().setId(UUID.randomUUID().toString()).build());
} catch (IOException ex) {
Assert.assertTrue(ex instanceof RemoteException);
PipelineNotFoundException exception = (PipelineNotFoundException) ((RemoteException) ex).unwrapRemoteException(PipelineNotFoundException.class);
Assert.assertTrue(exception instanceof PipelineNotFoundException);
}
````
You can use this to check by updating test TestStorageContainerManagerHA#testAllSCMAreRunning. (During this found issue in getStorageContainerLocationClient() comment below code.
/* InetSocketAddress address = scm.getClientRpcAddress();*/
/* LOG.info(
"Creating StorageContainerLocationProtocol RPC client with address {}",
address);*/
We donot get PipelineNotFoundException, we get RemoteException wrapped with PipelineNotFoundException. We need to unwrap and check if it is 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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org