Changed hdfs IP to docker container's hostname.

This commit is contained in:
K
2025-04-20 20:51:01 +05:30
parent b41b1071e6
commit 18876f2780
@@ -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);
} }