fjy commented on a change in pull request #6407: Add support
keepSegmentGranularity for automatic compaction
URL: https://github.com/apache/incubator-druid/pull/6407#discussion_r223196892
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/helper/SegmentCompactorUtil.java
##########
@@ -20,42 +20,30 @@
package org.apache.druid.server.coordinator.helper;
import com.google.common.base.Preconditions;
-import org.joda.time.Duration;
import org.joda.time.Interval;
-import org.joda.time.Period;
/**
* Util class used by {@link DruidCoordinatorSegmentCompactor} and {@link
CompactionSegmentSearchPolicy}.
*/
class SegmentCompactorUtil
{
- private static final Period LOOKUP_PERIOD = new Period("P1D");
- private static final Duration LOOKUP_DURATION =
LOOKUP_PERIOD.toStandardDuration();
// Allow compaction of segments if totalSize(segments) <= remainingBytes *
ALLOWED_MARGIN_OF_COMPACTION_SIZE
private static final double ALLOWED_MARGIN_OF_COMPACTION_SIZE = .1;
- static boolean isCompactible(long remainingBytes, long currentTotalBytes,
long additionalBytes)
+ static boolean isCompactibleSize(long targetBytes, long currentTotalBytes,
long additionalBytes)
Review comment:
Oh I see, there's 2 functions, by Size and by Name
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]