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.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to