add hdfs to resource

This commit is contained in:
tqchen 2015-03-12 22:43:41 -07:00
parent 9b66e7edf2
commit 07740003b8
2 changed files with 1 additions and 2 deletions

View File

@ -1 +0,0 @@
foler used to hold generated class files

View File

@ -51,6 +51,7 @@ public class Client {
*/
private Client() throws IOException {
conf.addResource(new Path(System.getenv("HADOOP_CONF_DIR") +"/core-site.xml"));
conf.addResource(new Path(System.getenv("HADOOP_CONF_DIR") +"/hdfs-site.xml"));
dfs = FileSystem.get(conf);
}
@ -169,7 +170,6 @@ public class Client {
}
this.initArgs(args);
// Create yarnClient
YarnConfiguration conf = new YarnConfiguration();
YarnClient yarnClient = YarnClient.createYarnClient();
yarnClient.init(conf);
yarnClient.start();