Exception in thread “main” java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost:9000/user/

// pickup config files off classpath
Configuration conf = new Configuration()
// explicitely add other config files
// PASS A PATH NOT A STRING!
conf.addResource(new Path(“/home/hadoop/conf/core-site.xml”));
FileSystem fs = FileSystem.get(conf);
// load files and stuff below!

你可能感兴趣的:(mapreduce,hdfs)