public static String getPartitionPath(TieredStoragePartitionId partitionId, String basePath) {
        if (basePath == null) {
            return null;
        }

        while (basePath.endsWith("/") && basePath.length() > 1) {
            basePath = basePath.substring(0, basePath.length() - 1);
        }
        return String.format("%s/%s", basePath, TieredStorageIdMappingUtils.convertId(partitionId));
    }
@Test
    void testGetPartitionPath() {
        TieredStoragePartitionId partitionId =
                TieredStorageIdMappingUtils.convertId(new ResultPartitionID());
        String partitionPath =
                SegmentPartitionFile.getPartitionPath(partitionId, tempFolder.getPath());

        File partitionFile =
                new File(
                        tempFolder.getPath(),
                        TieredStorageIdMappingUtils.convertId(partitionId).toString());
        assertThat(partitionPath).isEqualTo(partitionFile.getPath());
    }