jineshparakh commented on code in PR #18460:
URL: https://github.com/apache/pinot/pull/18460#discussion_r3221160048


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/assignment/segment/StrictRealtimeSegmentAssignmentTest.java:
##########
@@ -415,6 +661,31 @@ private static HelixManager createHelixManager() {
     return helixManager;
   }
 
+  private static HelixManager createHelixManagerWithTiers(String tierName, 
List<String> tierServers) {
+    HelixManager helixManager = mock(HelixManager.class);
+    ZkHelixPropertyStore<ZNRecord> propertyStore = 
mock(ZkHelixPropertyStore.class);
+    // Build the tier instance partitions ZK record so getTierInstances() can 
fetch it
+    String tierInstancePartitionsName =
+        
InstancePartitionsUtils.getInstancePartitionsNameForTier(RAW_TABLE_NAME, 
tierName);
+    String tierInstancePartitionsPath =
+        
ZKMetadataProvider.constructPropertyStorePathForInstancePartitions(tierInstancePartitionsName);

Review Comment:
   `getInstancePartitionsNameForTier` internally calls 
`TableNameBuilder.extractRawTableName(tableName)` which is implemented as:
   ```
     /**
      * Extract the raw table name from the given table name with type suffix.
      *
      * @param tableName Table name with or without type suffix
      * @return Table name without type suffix
      */
     public static String extractRawTableName(String tableName) {
       if (tableName == null) {
         return null;
       }
       if (OFFLINE.tableHasTypeSuffix(tableName)) {
         return tableName.substring(0, tableName.length() - 
OFFLINE._typeSuffix.length());
       }
       if (REALTIME.tableHasTypeSuffix(tableName)) {
         return tableName.substring(0, tableName.length() - 
REALTIME._typeSuffix.length());
       }
       return tableName;
     }
   ```
   
   It works properly for both tableName and tableName_withType.
   
   This is not problematic.



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