public static String getPathWithoutScheme(Path path) {
    return path.toUri().getPath();
  }
@Test
  public void testGetPathWithoutSchemaFromHDFS() {
    final Path path = new Path("hdfs://localhost:1234/foo/bar/baz?please=dont&show=up");

    final String output = HadoopUtils.getPathWithoutScheme(path);
    assertFalse("/foo/bar/baz".equals(output));
  }