Skip to content

Commit c2d44d4

Browse files
committed
Fix a bug: load config files
1 parent 0dcae14 commit c2d44d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/embulk/output/hdfs/HdfsFileOutputPlugin.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.embulk.output.hdfs;
22

3+
import java.io.File;
34
import java.io.IOException;
45
import java.io.OutputStream;
56
import java.util.ArrayList;
@@ -176,10 +177,10 @@ private static FileSystem getFs(final PluginTask task)
176177
{
177178
Configuration configuration = new Configuration();
178179

179-
for (Object configFile : task.getConfigFiles()) {
180-
configuration.addResource(configFile.toString());
180+
for (String configFile : task.getConfigFiles()) {
181+
File file = new File(configFile);
182+
configuration.addResource(file.toURI().toURL());
181183
}
182-
configuration.reloadConfiguration();
183184

184185
for (Map.Entry<String, String> entry: task.getConfig().entrySet()) {
185186
configuration.set(entry.getKey(), entry.getValue());

0 commit comments

Comments
 (0)