nutch-2.x

<b>Introduction</b>
This document describes how to get Nutch 2.X to use HBase as a storage backend(后臺) for Gora. It is assumed(假定) that you have a working knowledge of configuring Nutch 1.X, as currently configuration in 2.X is more complex. It is important to take this in to consideration before progressing any further. We therefore strongly advise that you check out the Nutch 1.X tutorial.

這個文檔描述了怎么獲取nutch2.x使用hbase作為存儲后臺為gora庄萎。如果你已經(jīng)有了使用nutch1.x的經(jīng)驗(yàn)踪少,作為現(xiàn)在配置在2.x是更加復(fù)雜了。它很重要做下一步考慮糠涛。所以我門建議你查看Nutch1.x的教程援奢。

<b>Obtaining(獲得) Software and Configuration</b>

  • Grab the latest distribution of Nutch 2.X from here. Do NOT build the source yet. From now on we will refer to the directory where the Nutch code resides as $NUTCH_HOME.

下載nutch2.x的最新版本。先不要build源碼忍捡,現(xiàn)在我們先配置Nutch——home環(huán)境變量

  • Download and configure HBase 0.98.8-hadoop2. You can get it here (N.B. Each version of Gora is tied to a particular version of HBase, we therefore suggest you use this version if possible. If you decide to use another version of HBase please do not be surprised if the stack does not work. You should also obtain current documentation for HBase however please again take into consideration that the version of HBase we recommend you use may not correlate to the current documentation. Please keep this in mind and use your initiative.

下載配置hbase0.98.8-hadoop2集漾。你可以在這里獲得。每個gora都綁定在一個特別的hbase版本砸脊,但是我們建議你使用這個版本具篇。如果你決定使用另外一個hbase版本,請不要驚奇如果stack不工作凌埂。你需要獲取當(dāng)前的hbase文檔驱显,但是請注意這個版本的hbase我建議你使用的可能不是當(dāng)前的文檔相關(guān)的。請時刻主動記住這個瞳抓。

  • Specify(指定) the GORA backend in $NUTCH_HOME/conf/nutch-site.xml along with all of the other Configuration options suggested within the Nutch 1.x tutorial.

指定gora后臺在$nutch_home/conf/nutch-site.xml隨著和我們在1.x中建議的所有的其他配置選項(xiàng)埃疫。

<property> 
<name>storage.data.store.class</name> 
<value>org.apache.gora.hbase.store.HBaseStore</value> 
<description>Default class for storing data</description>
</property>
  • Ensure the HBase gora-hbase dependency is available in $NUTCH_HOME/ivy/ivy.xml

確保hbase gora-hbase 依賴可用在ivy文件中

<dependency org="org.apache.gora" name="gora-hbase" rev="0.6.1" conf="*->default" />

In addition add the missing hbase-common-0.98.8-hadoop2.jar transitive (傳遞)dependency, this is a bug in gora-hbase 0.6.1 as described here. This bug is removed in current Gora development.

另外添加缺失的hbase-common-0.98.8-hadoop2.jar 傳遞依賴,這是一個bug在gora-hbase0.6.1 并且在這里有描述孩哑。這個bug被移動到gora 開發(fā)栓霜。

 <dependency org="org.apache.hbase" 
name="hbase-common" rev="0.98.8-hadoop2" conf="*->default" />

Ensure that HBaseStore is set as the default datastore in $NUTCH_HOME/conf/gora.properties. Other documentation for HBaseStore can be found here

確保hbasestore被設(shè)置作為默認(rèn)的數(shù)據(jù)存儲在nutch的gora.properties。別的文檔hbasestore的可以在這看横蜒。

 gora.datastore.default=org.apache.gora.hbase.store.HBaseStore
  • N.B. It's probably worth checking and setting all your usual configuration settings within $NUTCH_HOME/conf/nutch-site.xml etc. before progressing.

NB.這是可能的值得查看設(shè)置所有的常用的配置設(shè)置在nutch-site.xml etc. 在進(jìn)行前胳蛮。

  • Compile Nutch -> via
    ant runtime

  • Make sure HBase is started and working properly as per the quick start tutorial.

確保hbase 被開啟并且工作適合的作為

  • Create a list of URLs as you would do within the Nutch 1.X tutorial.

創(chuàng)建一個列表urls,作為在使用

<b>Invoke Nutch</b>
You should then be able to inject URLs into HBase. Try going to $NUTCH_HOME/runtime/local/bin and do :

你需要可以注入urls 到hbase。試著去bin下的

nutch inject /someseedDir 
nutch readdb

Whats Next
You may want to check out the documentation for the Nutch Web Application and then the Nutch REST API as this gives a comprehensive overview of ongoing work with making Nutch 2.X easier to use.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末丛晌,一起剝皮案震驚了整個濱河市鹰霍,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌茵乱,老刑警劉巖茂洒,帶你破解...
    沈念sama閱讀 218,451評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異瓶竭,居然都是意外死亡督勺,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,172評論 3 394
  • 文/潘曉璐 我一進(jìn)店門斤贰,熙熙樓的掌柜王于貴愁眉苦臉地迎上來智哀,“玉大人,你說我怎么就攤上這事荧恍〈山校” “怎么了屯吊?”我有些...
    開封第一講書人閱讀 164,782評論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長摹菠。 經(jīng)常有香客問我盒卸,道長,這世上最難降的妖魔是什么次氨? 我笑而不...
    開封第一講書人閱讀 58,709評論 1 294
  • 正文 為了忘掉前任蔽介,我火速辦了婚禮,結(jié)果婚禮上煮寡,老公的妹妹穿的比我還像新娘虹蓄。我一直安慰自己,他們只是感情好幸撕,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,733評論 6 392
  • 文/花漫 我一把揭開白布薇组。 她就那樣靜靜地躺著,像睡著了一般坐儿。 火紅的嫁衣襯著肌膚如雪体箕。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,578評論 1 305
  • 那天挑童,我揣著相機(jī)與錄音累铅,去河邊找鬼。 笑死站叼,一個胖子當(dāng)著我的面吹牛娃兽,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播尽楔,決...
    沈念sama閱讀 40,320評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼投储,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了阔馋?” 一聲冷哼從身側(cè)響起玛荞,我...
    開封第一講書人閱讀 39,241評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎呕寝,沒想到半個月后勋眯,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,686評論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡下梢,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,878評論 3 336
  • 正文 我和宋清朗相戀三年客蹋,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片孽江。...
    茶點(diǎn)故事閱讀 39,992評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡讶坯,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出岗屏,到底是詐尸還是另有隱情辆琅,我是刑警寧澤漱办,帶...
    沈念sama閱讀 35,715評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站婉烟,受9級特大地震影響娩井,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜隅很,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,336評論 3 330
  • 文/蒙蒙 一撞牢、第九天 我趴在偏房一處隱蔽的房頂上張望率碾。 院中可真熱鬧叔营,春花似錦、人聲如沸所宰。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,912評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽仔粥。三九已至婴谱,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間躯泰,已是汗流浹背谭羔。 一陣腳步聲響...
    開封第一講書人閱讀 33,040評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留麦向,地道東北人瘟裸。 一個月前我還...
    沈念sama閱讀 48,173評論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像诵竭,于是被迫代替她去往敵國和親话告。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,947評論 2 355

推薦閱讀更多精彩內(nèi)容