@Deprecated(forRemoval = true)
    @Nonnull
    protected static Path backwardsCompatible(@Nonnull Path path, NodeId nodeId, String configProperty) {
        final Path nodeIdSubdir = path.resolve(nodeId.getNodeId());
        if(Files.exists(nodeIdSubdir) && Files.isDirectory(nodeIdSubdir)) {
            LOG.warn("Caution, this datanode instance uses old format of directories. Please configure {} to point directly to {}", configProperty, nodeIdSubdir.toAbsolutePath());
            return nodeIdSubdir;
        }
        return path;
    }
@Deprecated(forRemoval = true)
    @SuppressWarnings("removal")
    @Test
    void testBackwardsCompatibility(@TempDir Path tempDir) throws IOException {
        final Path withoutSubdir = DatanodeDirectories.backwardsCompatible(tempDir, new SimpleNodeId("5ca1ab1e-0000-4000-a000-000000000000"), "my_config_property");
        Assertions.assertThat(withoutSubdir).isEqualTo(tempDir);

        Files.createDirectories(tempDir.resolve("5ca1ab1e-0000-4000-a000-000000000000"));

        final Path withSubdir = DatanodeDirectories.backwardsCompatible(tempDir, new SimpleNodeId("5ca1ab1e-0000-4000-a000-000000000000"), "my_config_property");

        Assertions.assertThat(withSubdir)
                .startsWith(tempDir)
                .endsWith(Path.of("5ca1ab1e-0000-4000-a000-000000000000"));


    }