当前位置: 首页>>代码示例>>Java>>正文


Java WarcInputFormat类代码示例

本文整理汇总了Java中nl.surfsara.warcutils.WarcInputFormat的典型用法代码示例。如果您正苦于以下问题:Java WarcInputFormat类的具体用法?Java WarcInputFormat怎么用?Java WarcInputFormat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WarcInputFormat类属于nl.surfsara.warcutils包,在下文中一共展示了WarcInputFormat类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import nl.surfsara.warcutils.WarcInputFormat; //导入依赖的package包/类
@Override
public int run(String[] args) throws Exception {

	Configuration conf = this.getConf();

	Job job = Job.getInstance(conf, "Torrent Web");
	job.setJarByClass(TorrentWeb.class);

	FileInputFormat.addInputPath(job, new Path(args[0]));
	FileOutputFormat.setOutputPath(job, new Path(args[1]));

	job.setMapperClass(TorrentWebExtracter.class);
	job.setReducerClass(TorrentWebReducer.class);
	job.setInputFormatClass(WarcInputFormat.class);
	job.setOutputKeyClass(Text.class);
	job.setOutputValueClass(Text.class);

	// Execute job and return status
	return job.waitForCompletion(true) ? 0 : 1;

}
 
开发者ID:wdwind,项目名称:TorrentWeb,代码行数:22,代码来源:TorrentWeb.java

示例2: run

import nl.surfsara.warcutils.WarcInputFormat; //导入依赖的package包/类
@Override
public int run(String[] args) throws Exception {

	Configuration conf = this.getConf();

	Job job = Job.getInstance(conf, "Name entities");
	job.setJarByClass(NER.class);

	FileInputFormat.addInputPath(job, new Path(args[0]));
	FileOutputFormat.setOutputPath(job, new Path(args[1]));

	job.setMapperClass(NERMapper.class);
	job.setReducerClass(Reducer.class);
	job.setInputFormatClass(WarcInputFormat.class);
	job.setOutputKeyClass(Text.class);
	job.setOutputValueClass(Text.class);

	// Execute job and return status
	return job.waitForCompletion(true) ? 0 : 1;

}
 
开发者ID:norvigaward,项目名称:warcexamples,代码行数:22,代码来源:NER.java

示例3: run

import nl.surfsara.warcutils.WarcInputFormat; //导入依赖的package包/类
@Override
public int run(String[] args) throws Exception {

	Configuration conf = this.getConf();

	Job job = Job.getInstance(conf, "Extract server type");
	job.setJarByClass(ServerType.class);

	FileInputFormat.addInputPath(job, new Path(args[0]));
	FileOutputFormat.setOutputPath(job, new Path(args[1]));

	job.setMapperClass(ServerTypeExtracter.class);
	job.setReducerClass(LongSumReducer.class);
	job.setInputFormatClass(WarcInputFormat.class);
	job.setOutputKeyClass(Text.class);
	job.setOutputValueClass(LongWritable.class);

	// Execute job and return status
	return job.waitForCompletion(true) ? 0 : 1;

}
 
开发者ID:norvigaward,项目名称:warcexamples,代码行数:22,代码来源:ServerType.java

示例4: getInputFormat

import nl.surfsara.warcutils.WarcInputFormat; //导入依赖的package包/类
@Override
public InputFormat<LongWritable, WarcRecord> getInputFormat() throws IOException {
	return new WarcInputFormat();
}
 
开发者ID:norvigaward,项目名称:warcutils,代码行数:5,代码来源:WarcFileLoader.java


注:本文中的nl.surfsara.warcutils.WarcInputFormat类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。