Examples of RmiIndexerStub


Examples of com.flaptor.hounder.indexer.RmiIndexerStub

    }

    public static void main(String args[]) {
        HounderDocumentGenerator dg = new HounderDocumentGenerator(args[0]);
        try {
            RmiIndexerStub indexerStub = new RmiIndexerStub(9003, "localhost");

            for (int i=0; i < Integer.parseInt(args[1]); i++) {
                //String argstr[] = {"\'" + dg.getDocument() + "\'"};
                //System.out.println(dg.getDocument() + "\n\n");
                String doc = dg.getDocument();
                IndexerReturnCode result = indexerStub.index(doc);
                while (result == IndexerReturnCode.RETRY_QUEUE_FULL) {
                    System.out.println("queue full " + new Date());
                    try {
                        Thread.sleep(1000);
                    }
                    catch (Exception e) {
                        //ignore
                    }
                    result = indexerStub.index(doc);
                }
                if (i % 1000 == 0) {
                    System.out.println (i + " documents posted");
                    System.out.println(new Date());
                    //System.out.println(doc);
View Full Code Here

Examples of com.flaptor.hounder.indexer.RmiIndexerStub

              specs = mdlConfig.getStringArray("remoteRmiIndexer.host");
          }
          this.indexers = new IRemoteIndexer[specs.length];
          for (int i=0; i<specs.length; i++) {
            Pair<String, Integer> host = PortUtil.parseHost(specs[i], "indexer.rmi");
            this.indexers[i] = new RmiIndexerStub(host.last(), host.first());
          }
            pageMapper = getPageMapper(mdlConfig, specs.length);
        }       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.