wirybeaver commented on code in PR #10815:
URL: https://github.com/apache/pinot/pull/10815#discussion_r1299509603
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SegmentCompletionUtils.java:
##########
@@ -44,4 +47,8 @@ public static String getSegmentNamePrefix(String segmentName)
{
public static String generateSegmentFileName(String segmentNameStr) {
return getSegmentNamePrefix(segmentNameStr) + UUID.randomUUID().toString();
}
+
+ public static boolean isTmpFile(String uri) {
+ return TMP_FILE.matcher(uri).find();
Review Comment:
Actually I was thinking out the edge case that original full file path
contains `.tmp.`. For example, the original file path
`hdfs://path/to/XXX.tmp.YYY/segment_from_to`, the final tmp file path
`hdfs://path/to/XXX.tmp.YYY/segment_from_to.tmp.UUID`. The split will false
negatively reject customers contain .tmp. in their original file path.
".+\\.tmp\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
can ensure customers original file path is not empty
--
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]