void function ( ) { final Path loc0 = new Path ( "srini_string" ) ; final String loc1 = HadoopUtils . getPathWithoutScheme ( loc0 ) ; Assert . assertFalse ( "srini_string" . equals ( loc1 ) ) ; }
this test does n't work the way you might expect . if you take the uri.create `` hdfs : / / localhost :1234 / foo/bar/baz ? please = dont & show = up '' . getpath it will return / foo/bar/baz . if you go through hadoop 's path using path #path string then hadoop injects the query params into the path , so when you call touri it gives a different response . concode_field_sep PlaceHolder placeHolder concode_field_sep void testGetPathWithoutSchemaFromHDFSURI concode_elem_sep void testGetPathWithoutSchema concode_elem_sep void testGetPathWithoutSchemaThatContainsSchema