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 2019/12/04 18:20:49 UTC

[GitHub] [hadoop-ozone] avijayanhwx commented on a change in pull request #301: HDDS-2636. Refresh pipeline information in OzoneManager lookupFile call.

avijayanhwx commented on a change in pull request #301: HDDS-2636. Refresh pipeline information in OzoneManager lookupFile call.
URL: https://github.com/apache/hadoop-ozone/pull/301#discussion_r353904813
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestKeyManagerUnit.java
 ##########
 @@ -177,4 +194,128 @@ private OmMultipartInfo initMultipartUpload(KeyManagerImpl omtest,
         .build();
     return omtest.initiateMultipartUpload(key1);
   }
+
+  @Test
+  public void testLookupFileWithDnFailure() throws IOException {
+    final ScmBlockLocationProtocol blockClient =
+        Mockito.mock(ScmBlockLocationProtocol.class);
+    final StorageContainerLocationProtocol containerClient =
+        Mockito.mock(StorageContainerLocationProtocol.class);
+    final KeyManager manager = new KeyManagerImpl(null,
+        new ScmClient(blockClient, containerClient),
+        metadataManager, configuration, "test-om",
+        Mockito.mock(OzoneBlockTokenSecretManager.class), null, null);
+
+    final DatanodeDetails dnOne = TestUtils.randomDatanodeDetails();
+    final DatanodeDetails dnTwo = TestUtils.randomDatanodeDetails();
+    final DatanodeDetails dnThree = TestUtils.randomDatanodeDetails();
+
+    final DatanodeDetails dnFour = TestUtils.randomDatanodeDetails();
+    final DatanodeDetails dnFive = TestUtils.randomDatanodeDetails();
+    final DatanodeDetails dnSix = TestUtils.randomDatanodeDetails();
+
+    final PipelineID pipelineOneId = PipelineID.randomId();
+    final Pipeline pipelineOne = Pipeline.newBuilder()
+        .setId(pipelineOneId)
+        .setType(ReplicationType.RATIS)
+        .setFactor(ReplicationFactor.THREE)
+        .setState(Pipeline.PipelineState.OPEN)
+        .setLeaderId(dnOne.getUuid())
+        .setNodes(Arrays.asList(dnOne, dnTwo, dnThree))
+        .build();
+
+    final PipelineID pipelineTwoId = PipelineID.randomId();
+    final Pipeline pipelineTwo = Pipeline.newBuilder()
+        .setId(pipelineOneId)
 
 Review comment:
   Should this be pipelineTwoId?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org