Changed hdfs IP to docker container's hostname.
This commit is contained in:
@@ -12,8 +12,8 @@ import java.security.PrivilegedExceptionAction;
|
|||||||
public class HDFSConfig {
|
public class HDFSConfig {
|
||||||
public static FileSystem getHDFS() throws Exception {
|
public static FileSystem getHDFS() throws Exception {
|
||||||
Configuration conf = new Configuration();
|
Configuration conf = new Configuration();
|
||||||
conf.set("fs.defaultFS", "hdfs://192.168.29.56:9000");
|
conf.set("fs.defaultFS", "hdfs://namenode:9000");
|
||||||
return FileSystem.get(new URI("hdfs://192.168.29.56:9000"), conf);
|
return FileSystem.get(new URI("hdfs://namenode:9000"), conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user