Code example for URI

Methods: equalsrelativize

0
public class HiveUriTest { 
 
    // test MapOperator#setChildren#501 
    @Test 
    public void testUriRelativize() throws Exception { 
        URI onePath = new URI("/tmp/hive/warehouse/test.db/artistscount");
        URI fpath = new URI("file:/tmp/hive/warehouse/test.db/artistscount");
 
        URI relative = onePath.relativize(fpath);
        System.out.println(relative);
        assertTrue(!relative.equals(fpath));
    } 
}