Reputation: 324
I'm using Nutch 1.8 to crawl data from website. I am writing now a custom plugin for Nutch to parse HTML and save data to HBase. By tutorials I create configuration:
Configuration conf = HBaseConfiguration.create();
Then I call openz() method to set configuration things etc.
public static void openz() throws IOException {
LOG.info("openz()");
System.out.println("openz()");
System.out.println("Establishing connection with database..");
conf = HBaseConfiguration.create();
conf.set("hbase.master", SERVER_IP);
conf.set("hbase.zookeeper.quorum", MASTER_PC);
conf.set("zookeeper.znode.parent", ZOOKEEPER_PARENT_NODE);
conf.set("hbase.zookeeper.property.clientPort","2181");
System.out.println("Conf here? :" + conf);
System.out.println("Creating table variable..");
table = new HTable(conf, "bstore");
}
At this point, on line, where I create HTable, I get
java.io.IOException: java.lang.reflect.InvocationTargetException at org.apache.hadoop.hbase.client.ConnectionManager.createConnection java.lang.NoSuchMethodError: org.apache.hadoop.hbase.protobuf.generated.ClientProtos$Result$Builder.setStale(Z)Lorg/apache/hadoop/hbase/protobuf/generated/ClientProtos$Result$Builder;
Previously I got a lot of trouble with libraries. When I run my plugins code on netbeans with remote connection, it works fine. Saves website data to hbase without having any trouble. But these errors I get when I launch Nutch crawler on cluster.
Upvotes: 0
Views: 1130
Reputation: 324
I will post my solution to this problem maybe it will help someone in the future. I use Hadoop 2.4.0, HBase 0.98.0, Apache Nutch 1.8 and Solr 4.2.1. Problems were caused by lack of some libraries. I'll post a list with all libraries, which I inserted in nutch /lib folder (this way isn't best one because nutch isn't correctly installed on the cluster, yet).
Upvotes: 1