두 개의 인수 인 URI와 구성이 있습니다. 클라이언트가 설정되어있는 JobConf 객체가 Configuration에서 작동해야한다고 가정하지만 URI는 무엇입니까?hadoop에서 initialize 메서드를 통해 DistributedFileSystem 객체를 초기화하는 방법은 무엇입니까?
JobClient client = new JobClient();
JobConf conf = new JobConf(ClickViewSessions.class);
conf.setJobName("ClickViewSessions");
conf.setOutputKeyClass(LongWritable.class);
conf.setOutputValueClass(MinMaxWritable.class);
FileInputFormat.addInputPath(conf, new Path("input"));
FileOutputFormat.setOutputPath(conf, new Path("output"));
conf.setMapperClass(ClickViewSessionsMapper.class);
conf.setReducerClass(ClickViewSessionsReducer.class);
client.setConf(conf);
DistributedFileSystem dfs = new DistributedFileSystem();
try {
dfs.initialize(new URI("blah") /* what goes here??? */, conf);
} catch (Exception e) {
throw new RuntimeException(e.toString());
}
가 어떻게 URI가 위 initialize
에 대한 호출에 공급받을 수 있나요 : 여기
당신이 로컬 또는 원격이 있습니까 Hadoop 클러스터가 실행 중입니까? –
VM에서 실행하고 있습니다. – jonderry