Jackie-Jiang commented on a change in pull request #7246:
URL: https://github.com/apache/pinot/pull/7246#discussion_r686154953
##########
File path:
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartitionUpsertMetadataManager.java
##########
@@ -238,7 +245,21 @@ public void removeSegment(IndexSegment segment) {
_primaryKeyToRecordLocationMap.size());
}
+ protected static Object hashPrimaryKey(PrimaryKey primaryKey,
UpsertConfig.HashFunction hashFunction) {
+ switch (hashFunction) {
+ case NONE:
+ return primaryKey;
+ case MD5:
+ return new ByteArray(HashUtils.hashMD5(primaryKey.asBytes()));
+ case MURMUR3:
+ return new ByteArray(HashUtils.hashMurmur3(primaryKey.asBytes()));
+ default:
+ throw new IllegalArgumentException(String.format("Unrecognized hash
function %s", hashFunction));
+ }
+ }
+
public static final class RecordInfo {
+ /** stores the primary key of the record or its hash value */
Review comment:
Remove the comment
##########
File path:
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/RealtimeSegmentConfig.java
##########
@@ -69,7 +70,7 @@ private RealtimeSegmentConfig(String tableNameWithType,
String segmentName, Stri
RealtimeSegmentZKMetadata realtimeSegmentZKMetadata, boolean offHeap,
PinotDataBufferMemoryManager memoryManager,
RealtimeSegmentStatsHistory statsHistory, String partitionColumn,
PartitionFunction partitionFunction,
int partitionId, boolean aggregateMetrics, boolean nullHandlingEnabled,
String consumerDir,
- UpsertConfig.Mode upsertMode, String upsertComparisonColumn,
+ UpsertConfig.Mode upsertMode, String upsertComparisonColumn,
UpsertConfig.HashFunction hashFunction,
Review comment:
I believe we can revert the change in this file because hashing is
handled in the upsert metadata manager
--
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]