`
chengqianl
  • 浏览: 51560 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
今天版本不对导致了这个问题,找了好久,没有知识真可怕 -bash: /home/hadoop/jdk1.7.0_07/bin/java: No such file or directory 看了权限都有 这个问题是由于 linux的版本的是64位的 我的jdk是 32位导致 的
多集群之间的备份使用CopyTable 参考 http://hbase.apache.org/book/ops_mgt.html#copytable CopyTable is a utility that can copy part or of all of a table, either to the same cluster or another cluster. The usage is as follows: $ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable [--starttime=X] [--endtime=Y] [- ...
map   使用默认的map   InputFormat 负责split数据转换数据 job.setInputFormat(SolrInputFormat.class); SolrInputFormat 会根据分配多个split做数据切分 如下   /** Return each index as a split. */     public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {       SolrServer solr = SolrUtils.getCommonsHttpSolrS ...
这个 job的  具体和 nutch1.2 indexhttp://chengqianl.iteye.com/admin/blogs/1597617一样 IndexerMapReduce.initMRJob(crawlDb, linkDb, segments, job); 唯一不同的是writer是设置的 SolrWriter 它的open方法 如下粗体部分通过solrj,new了一个CommonsHttpSolrServer public void open(JobConf job, String name) throws IOException {     solr = new C ...
job 1      map: 默认Mapper ,     输出为key:Text url value :IndexDoc     job.setInputFormat(InputFormat.class);  关键在于这个Format会把lucene的doc转换成IndexDoc 代码如下: public boolean next(Text key, IndexDoc indexDoc)         throws IOException {                 // skip empty indexes         if (indexReader == nul ...
首先如果存在crawl/index ,crawl/indexes目录则删除 map:IndexerMapReduce      map输入目录为  所有的segment的crawl_fetch  crawl_parse parse_data parse_text , crawl/crawldb/current, crawl/linkdb/current      1 map的任务就是为了合并目录代码如下        output.collect(key, new NutchWritable(value)); reduce: IndexerMapReduce      1 循环 解析出路 ...
LinkDb map :LinkDb      输入目录为segments目录里面所有segment下面的parse_data目录     1 首先对key:url 如果配置filter和normalize 则进行filter和normalize     2 如果url不为空 则分析他的外链,db.ignore.internal.links配置为true,如果源链接 ...
crawdb update map :CrawlDbFilter  这个map主要是用来合并数据的         输入,fetch产生的segment目录下面的crawl_fetch 和crawl_parse 以及crawldb/current ,     key:Text value:CrawlDatum       如果设置了urlNormalizers=true 对url进行normalize       如果设置了urlFiltering=true 对url进行过滤        如果url不为空 写入        key : Text  为url  value:  ...
fetcher 是生产者和消费者的模式,生产者是QueueFeeder 不断的读取文件,消费者是 FetcherThread 不断的抓取网址 map是输入是crawl/segments/具体的segment/crawl_generate QueueFeeder QueueFeeder 是一个线程类,主要做了一下事情 1 根据配置属性fet ...
job1 map Selector     输入目录为crawldb/current     输入key:Text 为url ,Value:CrawlDatum     功能如下        1 如果filter为true URLFilter过滤,如果过滤的后的url为空返回       2 调用(!schedule.shouldFetch(url, crawlDatum, curTime)方法计算是不是要fetch 逻辑是看value的当前fetchtime和当前时间的比较,大于返回true,否则为false,这里有个逻辑是如果当前value的fetchtime减去当前时间大约最大 ...
nutch的inject 有二个job 第一个job 如下图 map :InjectMapper 功能如下   1  url是否有tab分割的k-v 对如果有记录下来, 2  如果配置了过滤使用 URLNormalizers和 URLFilters 对url 进行格式化和过滤, 3  如果过滤的url 不为空则创建CrawlDatum对象,状态 STATUS_INJECTED,设置fetcher 间隔时间从fetchdb.fetch.interval.default  配置中取,如果没有默认2592000s 为30 天 4  设置fectchtime  为当前时间  datum.s ...
NutchConfiguration 类中的初始化   public static Configuration createCrawlConfiguration() {     Configuration conf = new Configuration();     addNutchResources(conf, true);     return conf;   } 调用 NutchConfiguration 中的 private static Configuration addNutchResources(Configuration conf,                       ...
solr Spatial Search  schema.xml  定义 <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> <!--field 的定义 location 是用来存放经度和维度, 格式:39.885003,116.384099--> <field name="location" type="location" indexed=" ...
nekohtml http://nekohtml.sourceforge.net/ dk.brics.automaton http://www.brics.dk/automaton/ rome http://mirrors.ibiblio.org/pub/mirrors/maven2/rome/rome/0.9/rome-0.9.jar tagsoup-1.1.3 http://www.findjar.com/jar/org.ccil.cowan.tagsoup/jars/tagsoup-1.1.3.jar.html
使用solr的时候如果把date类型转换成tlong型数据,非常不方便,写入的时候要转换,返回的时候要转换,查询的时候要转换非常不方便,可以用tdate这个类型,使用这个有关注意事项是solr是用世界标准时间去格式化时间,所以在浏 ...
Global site tag (gtag.js) - Google Analytics