@@ -0,0 +1,892 @@
+package crawler;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.hbase.HBaseConfiguration;%0Aimport org.apache.hadoop.hbase.client.HConnection;%0Aimport org.apache.hadoop.hbase.client.HConnectionManager;%0Aimport org.apache.hadoop.hbase.client.HTableInterface;%0Aimport org.apache.hadoop.hbase.client.Put;%0A%0Apublic class HBaseWriter %7B%0A%09private static String TableName;%0A%09private static Configuration conf = null; %0A%09private static HConnection hConnection = null;%0A%09%0A%09public HBaseWriter(String tableName) throws IOException %7B%0A%09%09HBaseWriter.TableName = tableName;%0A%09%09%0A%09%09if (conf == null)%0A%09%09%09conf = HBaseConfiguration.create();%0A%09%09if (hConnection == null)%0A%09%09%09hConnection = HConnectionManager.createConnection(conf);%0A%09%7D%0A%0A%09public void write(Put p) throws IOException %7B%0A%09%09HTableInterface ht = hConnection.getTable(TableName);%09%09%0A%09%09ht.put(p);%0A%09%09ht.close();%0A%09%7D%0A%7D%0A

Create HBaseWriter.java