github-advanced-security[bot] commented on code in PR #18402:
URL: https://github.com/apache/druid/pull/18402#discussion_r2280310791


##########
server/src/main/java/org/apache/druid/server/compaction/CompactionStatus.java:
##########
@@ -204,22 +208,29 @@
    */
   static CompactionStatus compute(
       CompactionCandidate candidateSegments,
-      DataSourceCompactionConfig config,
-      ObjectMapper objectMapper
+      DataSourceCompactionConfig config
   )
   {
-    final Evaluator evaluator = new Evaluator(candidateSegments, config, 
objectMapper);
+    final Evaluator evaluator = new Evaluator(candidateSegments, config);
     return CHECKS.stream().map(f -> f.apply(evaluator))
                  .filter(status -> !status.isComplete())
                  .findFirst().orElse(COMPLETE);
   }
 
+  @Nullable
   static PartitionsSpec 
findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig tuningConfig)
   {
     final PartitionsSpec partitionsSpecFromTuningConfig = 
tuningConfig.getPartitionsSpec();
     if (partitionsSpecFromTuningConfig == null) {
-      final long maxTotalRows = 
Configs.valueOrDefault(tuningConfig.getMaxTotalRows(), Long.MAX_VALUE);
-      return new DynamicPartitionsSpec(tuningConfig.getMaxRowsPerSegment(), 
maxTotalRows);
+      final Long maxTotalRows = tuningConfig.getMaxTotalRows();
+      final Integer maxRowsPerSegment = tuningConfig.getMaxRowsPerSegment();

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [ClientCompactionTaskQueryTuningConfig.getMaxRowsPerSegment](1) 
should be avoided because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/10223)



##########
server/src/main/java/org/apache/druid/server/compaction/CompactionStatus.java:
##########
@@ -204,22 +208,29 @@
    */
   static CompactionStatus compute(
       CompactionCandidate candidateSegments,
-      DataSourceCompactionConfig config,
-      ObjectMapper objectMapper
+      DataSourceCompactionConfig config
   )
   {
-    final Evaluator evaluator = new Evaluator(candidateSegments, config, 
objectMapper);
+    final Evaluator evaluator = new Evaluator(candidateSegments, config);
     return CHECKS.stream().map(f -> f.apply(evaluator))
                  .filter(status -> !status.isComplete())
                  .findFirst().orElse(COMPLETE);
   }
 
+  @Nullable
   static PartitionsSpec 
findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig tuningConfig)
   {
     final PartitionsSpec partitionsSpecFromTuningConfig = 
tuningConfig.getPartitionsSpec();
     if (partitionsSpecFromTuningConfig == null) {
-      final long maxTotalRows = 
Configs.valueOrDefault(tuningConfig.getMaxTotalRows(), Long.MAX_VALUE);
-      return new DynamicPartitionsSpec(tuningConfig.getMaxRowsPerSegment(), 
maxTotalRows);
+      final Long maxTotalRows = tuningConfig.getMaxTotalRows();

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [ClientCompactionTaskQueryTuningConfig.getMaxTotalRows](1) should 
be avoided because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/10222)



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