@@ -0,0 +1,2565 @@
+package com.example.solr;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.hbase.HBaseConfiguration;%0Aimport org.apache.hadoop.hbase.KeyValue;%0Aimport org.apache.hadoop.hbase.client.HTable;%0Aimport org.apache.hadoop.hbase.client.Result;%0Aimport org.apache.hadoop.hbase.client.ResultScanner;%0Aimport org.apache.hadoop.hbase.client.Scan;%0Aimport org.apache.hadoop.hbase.util.Bytes;%0Aimport org.apache.solr.client.solrj.SolrServerException;%0Aimport org.apache.solr.client.solrj.impl.HttpSolrServer;%0Aimport org.apache.solr.common.SolrInputDocument;%0A%0Apublic class solrIndexer %7B%0A%0A    public static void main(String%5B%5D args) throws IOException,SolrServerException %7B%0A    %09%0A        final Configuration conf;%0A        HttpSolrServer solrServer = new HttpSolrServer(%22http://c1master:8983/solr%22); %0A        conf = HBaseConfiguration.create();%0A        %0A        //Define Hbase Table Name%0A        HTable table = new HTable(conf, %22test_global_shop%22);%0A        Scan scan = new Scan();%0A        %0A        //Define Hbase Column Family%0A        scan.addFamily(Bytes.toBytes(%22shop%22));%0A        scan.setCaching(1000);%0A        scan.setCacheBlocks(false);%0A        ResultScanner ss = table.getScanner(scan);%0A%0A        System.out.println(%22start Storing...%22);%0A        int i = 0;%0A        try %7B%0A            for (Result r : ss) %7B%0A                SolrInputDocument solrDoc = new SolrInputDocument();%0A                solrDoc.addField(%22key%22, new String(r.getRow()));%0A                for (KeyValue kv : r.raw()) %7B%0A                    String fieldName = new String(kv.getQualifier());%0A                    String fieldValue = new String(kv.getValue());%0A                    if (fieldName.equalsIgnoreCase(%22address%22)%0A                            %7C%7C fieldName.equalsIgnoreCase(%22category%22)%0A                            %7C%7C fieldName.equalsIgnoreCase(%22name%22)%0A                            %7C%7C fieldName.equalsIgnoreCase(%22province%22)%0A                            %7C%7C fieldName.equalsIgnoreCase(%22tel%22)) %7B%0A                        solrDoc.addField(fieldName, fieldValue);%0A                    %7D%0A                %7D%0A                solrServer.add(solrDoc);%0A                solrServer.commit(true, true, true);%0A                i = i + 1;%0A                System.out.println(%22Already Succcess %22 + i + %22 number data%22);%0A            %7D%0A            ss.close();%0A            table.close();%0A            System.out.println(%22done !%22);%0A        %7D catch (IOException e) %7B%0A        %7D finally %7B%0A            ss.close();%0A            table.close();%0A            System.out.println(%22error !%22);%0A        %7D%0A    %7D%0A%0A%7D%0A

Create solrIndexer.java