Fix local segment tar copy
@@ -24,6 +24,7 @@ import java.io.InputStream;
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URLDecoder;
import java.nio.file.FileSystems;
import java.nio.file.PathMatcher;
import java.nio.file.Paths;
@@ -384,7 +385,7 @@ public class SegmentPushUtils implements Serializable {
try {
if (fileSystem instanceof LocalPinotFS) {
// For local file system, we don't need to copy the tar file.
- tarFile = new File(tarFileURI);
+ tarFile = new File(URLDecoder.decode(tarFileURI.getRawPath(), "UTF-8"));
} else {
// For other file systems, we need to download the file to local file system
fileSystem.copyToLocalFile(tarFileURI, tarFile);
