nutch,solr集成在hadoop上

nutch,solr集成在hadoop上

   nutch是一个应用程序,在我的这个项目里主要是做爬虫用,爬取后的内容寄存在hdfs上,所以在hdfs结合模块现已结合上去了。

   solr:

    在eclipse新建动态页面项目,删去WebContent的一切内容。

 在solr/dist下(或许/solr3.6.2/example/webapps下)解压solr.war  将一切内容拷贝到WenContent里。

    修正WEB-INF里的web.xml

    增加

solr/home/home/hadoop/solr3.6.2/example/solrtype>java.lang.Stringtype>

  到最后的前。

 解说下这个当地是你的solr core的方位

 采用solr多核的话能够将

/home/hadoop/solr3.6.2/example/multicore,一起修正multicore中的solr.xml

 instanceDir为core的寄存方位

在server中新建tomcat7服务,然后增加你刚新建的动态页面工程:


创建indexwrite,开始抓取资源:


indexwrite.sprite("http://www.metabase.cn/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.jinanwuliangye.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.tongxinglong.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.qclchina.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.vipfuxin.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.minnan888.net/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.lcsyt.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://lf.yunnanw.cn/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.yzbljp.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.hyyfscl.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.shoudashou.com/","utf-8");//资源地址,utf-8

indexwrite.sprite("http://www.shuoma.com.cn/","utf-8");//资源地址,utf-8

InputStrame.close;


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值