@Test public void convert() throws Exception { hadoopConf.set("fs.default.name", "file:/"); Map<String, String> conf = new HashMap<>(); ResourceProfile resourceProfile = new ResourceProfile( "testing", HadoopFsProvider.class, new ProfileContext(getClass().getClassLoader(), new ParameterList()), conf); HadoopFsProfile profile = HadoopFsProfile.convert(hadoopConf, resourceProfile); assertThat(profile.getResourceName(), is("testing")); assertThat(profile.getBasePath().toUri().getScheme(), is("file")); }
public static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile) throws IOException { if (configuration == null) { throw new IllegalArgumentException("configuration must not be null"); } if (profile == null) { throw new IllegalArgumentException("profile must not be null"); } String name = profile.getName(); Path basePath = extractBasePath(configuration, profile); extractCompressionCodec(configuration, profile); return new HadoopFsProfile(name, basePath); }
HadoopFsProfile { public static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile) throws IOException { if (configuration == null) { throw new IllegalArgumentException("configuration must not be null"); } if (profile == null) { throw new IllegalArgumentException("profile must not be null"); } String name = profile.getName(); Path basePath = extractBasePath(configuration, profile); extractCompressionCodec(configuration, profile); return new HadoopFsProfile(name, basePath); } }
HadoopFsProfile { public static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile) throws IOException { if (configuration == null) { throw new IllegalArgumentException("configuration must not be null"); } if (profile == null) { throw new IllegalArgumentException("profile must not be null"); } String name = profile.getName(); Path basePath = extractBasePath(configuration, profile); extractCompressionCodec(configuration, profile); return new HadoopFsProfile(name, basePath); } @Deprecated  HadoopFsProfile(
            String resourceName,
            Path basePath,
            CompressionCodec compressionCodec);  HadoopFsProfile(String resourceName, Path basePath); }
HadoopFsProfile { public static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile) throws IOException { if (configuration == null) { throw new IllegalArgumentException("configuration must not be null"); } if (profile == null) { throw new IllegalArgumentException("profile must not be null"); } String name = profile.getName(); Path basePath = extractBasePath(configuration, profile); extractCompressionCodec(configuration, profile); return new HadoopFsProfile(name, basePath); } @Deprecated  HadoopFsProfile(
            String resourceName,
            Path basePath,
            CompressionCodec compressionCodec);  HadoopFsProfile(String resourceName, Path basePath); static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile); String getResourceName(); Path getBasePath(); @Deprecated CompressionCodec getCompressionCodec(); }
HadoopFsProfile { public static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile) throws IOException { if (configuration == null) { throw new IllegalArgumentException("configuration must not be null"); } if (profile == null) { throw new IllegalArgumentException("profile must not be null"); } String name = profile.getName(); Path basePath = extractBasePath(configuration, profile); extractCompressionCodec(configuration, profile); return new HadoopFsProfile(name, basePath); } @Deprecated  HadoopFsProfile(
            String resourceName,
            Path basePath,
            CompressionCodec compressionCodec);  HadoopFsProfile(String resourceName, Path basePath); static HadoopFsProfile convert(Configuration configuration, ResourceProfile profile); String getResourceName(); Path getBasePath(); @Deprecated CompressionCodec getCompressionCodec(); static final String KEY_BASE_PATH; static final String KEY_COMPRESSION; }