@Test public void withPathAndClusterName() throws Exception { final String HOST = "cluster2"; final String FILEPATH = "/my/file/path"; final String URI = BASE_URI + HOST + FILEPATH; buildExtractSchemeMocks( PREFIX, URI, BASE_PATH + HOST + FILEPATH ); FileNameParser parser = MapRFileNameParser.getInstance(); FileName name = parser.parseUri( null, null, URI ); assertEquals( URI, name.getURI() ); assertEquals( PREFIX, name.getScheme() ); assertTrue( name.getURI().startsWith( PREFIX + ":" + BASE_PATH + HOST ) ); assertEquals( FILEPATH, name.getPath() ); }
public static MapRFileNameParser getInstance() { return INSTANCE; }
MapRFileNameParser extends URLFileNameParser { public static MapRFileNameParser getInstance() { return INSTANCE; } }
MapRFileNameParser extends URLFileNameParser { public static MapRFileNameParser getInstance() { return INSTANCE; } private  MapRFileNameParser(); }
MapRFileNameParser extends URLFileNameParser { public static MapRFileNameParser getInstance() { return INSTANCE; } private  MapRFileNameParser(); static MapRFileNameParser getInstance(); }
MapRFileNameParser extends URLFileNameParser { public static MapRFileNameParser getInstance() { return INSTANCE; } private  MapRFileNameParser(); static MapRFileNameParser getInstance(); static final String EMPTY_HOSTNAME; }