GeorgeJahad commented on code in PR #4182:
URL: https://github.com/apache/ozone/pull/4182#discussion_r1120927976


##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestContainerEndpoint.java:
##########
@@ -229,13 +239,63 @@ public void setUp() throws Exception {
     OMMetadataManager omMetadataManagerMock = mock(OMMetadataManager.class);
     Table tableMock = mock(Table.class);
     when(tableMock.getName()).thenReturn("KeyTable");
-    when(omMetadataManagerMock.getKeyTable(getBucketLayout()))
+    when(omMetadataManagerMock.getKeyTable(BucketLayout.LEGACY))
         .thenReturn(tableMock);
-    ContainerKeyMapperTask containerKeyMapperTask  =
+    when(omMetadataManagerMock.getKeyTable(BucketLayout.FILE_SYSTEM_OPTIMIZED))
+        .thenReturn(tableMock);
+    reprocessContainerKeyMapper();
+  }
+
+  private void reprocessContainerKeyMapper() {
+    ContainerKeyMapperTask containerKeyMapperTask =
         new ContainerKeyMapperTask(reconContainerMetadataManager);
     containerKeyMapperTask.reprocess(reconOMMetadataManager);
   }
 
+  private void setUpMultiBlockKey() throws IOException {
+    OmKeyLocationInfoGroup locationInfoGroup =
+        getLocationInfoGroup1();
+
+    // add the multi-block key to Recon's OM
+    writeKeyToOm(reconOMMetadataManager,
+        FSO_KEY_NAME,
+        BUCKET_NAME,
+        VOLUME_NAME,
+        FILE_NAME,
+        KEY_LENGTH,
+        BLOCK_LENGTH,
+        KEY_SEQ_NO,
+        MODIFICATION_TIME,
+        Collections.singletonList(locationInfoGroup),
+        getBucketLayout(),

Review Comment:
   this layout returns default instead of fso



-- 
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]

Reply via email to