1
Exception in thread "main" org.apache.gora.util.GoraException: java.io.IOException
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167)
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
    at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75)
    at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:214)
    at org.apache.nutch.crawl.Crawler.runTool(Crawler.java:68)
    at org.apache.nutch.crawl.Crawler.run(Crawler.java:136)
    at org.apache.nutch.crawl.Crawler.run(Crawler.java:250)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.nutch.crawl.Crawler.main(Crawler.java:257)
Caused by: java.io.IOException
    at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:88)
    at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
    ... 8 more
Caused by: java.lang.NullPointerException
    at org.apache.gora.cassandra.store.CassandraMapping.<init>(CassandraMapping.java:117)
    at org.apache.gora.cassandra.store.CassandraMappingManager.get(CassandraMappingManager.java:84)
    at org.apache.gora.cassandra.store.CassandraClient.initialize(CassandraClient.java:84)
    at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:85)
    ... 10 more

cassandraでnutch2.0を実行します。これはクロールの出力であり、TestGoreStorageの出力は次のとおりです。

Starting!
Exception in thread "main" org.apache.gora.util.GoraException: java.io.IOException
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167)
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
    at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75)
    at org.apache.nutch.storage.TestGoraStorage.main(TestGoraStorage.java:204)
Caused by: java.io.IOException
    at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:88)
    at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
    ... 3 more
Caused by: java.lang.NullPointerException
    at org.apache.gora.cassandra.store.CassandraMapping.<init>(CassandraMapping.java:117)
    at org.apache.gora.cassandra.store.CassandraMappingManager.get(CassandraMappingManager.java:84)
    at org.apache.gora.cassandra.store.CassandraClient.initialize(CassandraClient.java:84)
    at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:85)
    ... 5 more

cassandraをcassandra-cliに接続し、svnからnutchをチェックすることができます。gora.propertiesのエフェクト設定は次のとおりです。

    gora.datastore.default=org.apache.gora.cassandra.store.CassandraStore
    gora.sqlstore.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
    gora.sqlstore.jdbc.url=jdbc:hsqldb:hsql://210.44.138.8/nutchtest
    gora.sqlstore.jdbc.user=sa
    gora.sqlstore.jdbc.password=
    gora.cassandrastore.servers=210.44.138.8:9160

およびgora-cassandra-mappingの構成:

<keyspace name="webpage" cluster="My Cluster" host="210.44.138.8">
    <family name="p"/>
    <family name="f"/>
    <family name="sc" type="super"/>
</keyspace>

210.44.138.8は私のクラスターのノードであり、クラスターの名前は「My Cluster」です。詳細:ファイアウォールを閉じ、Eclipseで実行します。誰かが私に助けをくれたらとても嬉しいです。

4

1 に答える 1

0

まったく同じ問題が発生したかどうかはわかりませんが、 gora-cassandra-mapping.xml ファイルで、クラス要素にキースペース属性 ( keyspace="ks1" ) を追加する必要があることがわかりました。

<keyspace name="ks1" cluster="My Cluster" host="1.2.3.4">
    ...
</keyspace>
<class keyspace="ks1" keyClass="java.lang.String" name="org.apache.nutch.storage.WebPage">
    ...
</class>    
于 2012-09-20T19:53:21.240 に答える