FrankChen021 commented on code in PR #20806:
URL: https://github.com/apache/druid/pull/20806#discussion_r4481779656


##########
extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsDataSegmentPusher.java:
##########
@@ -108,12 +130,12 @@ public DataSegment push(final File inDir, final 
DataSegment segment, final boole
 
     final String uniquePrefix = useUniquePath ? 
DataSegmentPusher.generateUniquePath() + "_" : "";
     final String outIndexFilePath = StringUtils.format(
-        "%s/%s/%d_%sindex%s",
+      "%s/%s/%s_%sindex%s",

Review Comment:
   Unnecessary formatting churn: please revert `%d` → `%s` for the partition 
number and the re-indentation here (same for the format block in `pushToPath`).



##########
extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsDataSegmentPusher.java:
##########
@@ -123,15 +145,18 @@ public DataSegment push(final File inDir, final 
DataSegment segment, final boole
   public DataSegment pushToPath(File inDir, DataSegment segment, String 
storageDirSuffix) throws IOException
   {
     final String outIndexFilePath;
+
     if (storageDirSuffix.endsWith("index.zip") || 
storageDirSuffix.endsWith("index.lz4")) {
       outIndexFilePath = StringUtils.format("%s/%s", 
fullyQualifiedStorageDirectory.get(), storageDirSuffix);
     } else {
+      final String suffix = compressionFormat == CompressionUtils.Format.NONE 
? "" : compressionFormat.getSuffix();

Review Comment:
   `NONE.getSuffix()` already returns `""`, so this special case is redundant; 
just use `compressionFormat.getSuffix()`. Same for the `tmpPath` construction 
in `pushToFilePath`.



##########
processing/src/main/java/org/apache/druid/guice/JsonConfigurator.java:
##########
@@ -285,6 +285,9 @@ public static <T> void verifyClazzIsConfigurable(
                                                         
.introspect(mapper.constructType(clazz))
                                                         .findProperties();
     for (BeanPropertyDefinition beanDef : beanDefs) {
+      if (!beanDef.couldSerialize()) {

Review Comment:
   Please revert this change. It relaxes the field-annotation check for every 
config class just to allow a creator-only `zip` param. Instead, keep `zip` as a 
`@JsonProperty` field in `DeepStorageSegmentConfig`, marked `@Deprecated`, and 
make sure its getter is not used anywhere; `compressionFormat` stays the only 
thing pushers read.



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