Jackie-Jiang commented on code in PR #15347:
URL: https://github.com/apache/pinot/pull/15347#discussion_r2010698203
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/IngestionConfigUtils.java:
##########
@@ -101,11 +101,38 @@ public static List<Map<String, String>>
getStreamConfigMaps(TableConfig tableCon
return streamConfigMaps;
}
if (tableConfig.getIndexingConfig() != null &&
tableConfig.getIndexingConfig().getStreamConfigs() != null) {
- return Arrays.asList(tableConfig.getIndexingConfig().getStreamConfigs());
+ return List.of(tableConfig.getIndexingConfig().getStreamConfigs());
}
throw new IllegalStateException("Could not find streamConfigs for REALTIME
table: " + tableNameWithType);
}
+ public static List<StreamConfig> getStreamConfigs(TableConfig tableConfig) {
Review Comment:
We don't use `NotNull` annotation and assume all parameters not annotated
with `Nullable` as not null
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/IngestionConfigUtils.java:
##########
@@ -101,11 +101,38 @@ public static List<Map<String, String>>
getStreamConfigMaps(TableConfig tableCon
return streamConfigMaps;
}
if (tableConfig.getIndexingConfig() != null &&
tableConfig.getIndexingConfig().getStreamConfigs() != null) {
- return Arrays.asList(tableConfig.getIndexingConfig().getStreamConfigs());
+ return List.of(tableConfig.getIndexingConfig().getStreamConfigs());
}
throw new IllegalStateException("Could not find streamConfigs for REALTIME
table: " + tableNameWithType);
}
+ public static List<StreamConfig> getStreamConfigs(TableConfig tableConfig) {
+ return getStreamConfigMaps(tableConfig).stream()
+ .map(streamConfigMap -> new StreamConfig(tableConfig.getTableName(),
streamConfigMap))
+ .collect(Collectors.toList());
+ }
+
+ public static Map<String, String> getFirstStreamConfigMap(TableConfig
tableConfig) {
Review Comment:
Same here
--
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]