You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/10/03 09:11:45 UTC
[GitHub] [incubator-druid] jihoonson commented on a change in pull request
#8571: Use hash of Segment IDs instead of a list of explicit segments in
auto compaction
jihoonson commented on a change in pull request #8571: Use hash of Segment IDs instead of a list of explicit segments in auto compaction
URL: https://github.com/apache/incubator-druid/pull/8571#discussion_r330936890
##########
File path: core/src/main/java/org/apache/druid/segment/SegmentUtils.java
##########
@@ -19,22 +19,43 @@
package org.apache.druid.segment;
+import com.google.common.hash.HashFunction;
+import com.google.common.hash.Hasher;
+import com.google.common.hash.Hashing;
import com.google.common.io.Files;
import com.google.common.primitives.Ints;
import org.apache.druid.guice.annotations.PublicApi;
import org.apache.druid.java.util.common.IOE;
+import org.apache.druid.java.util.common.StringUtils;
+import org.apache.druid.timeline.DataSegment;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.List;
/**
* Utility methods useful for implementing deep storage extensions.
*/
@PublicApi
public class SegmentUtils
{
+ private static final HashFunction HASH_FUNCTION = Hashing.sha256();
Review comment:
Hmm, why is it better?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org