Package org.apache.solr.client.solrj.impl

Examples of org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer$Runner


        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run() {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{});
View Full Code Here


        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run(Object arg) {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{arg});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run() {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run(Object arg) {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{arg});
View Full Code Here

                    {
                        synchronized (url.intern())
                        {
                            if((server = streamingClients.get(url)) == null)
                            {
                                server =  new StreamingUpdateSolrServer(url, 512, 1+(numClients/urls.length));
                                streamingClients.put(url, server);
                            }
                        }
                    }                
                   
View Full Code Here

  public SolrServer createNewSolrServer()
  {
    try {
      // setup the server...
      String url = "http://localhost:"+port+context;       // smaller queue size hits locks more often
      CommonsHttpSolrServer s = new StreamingUpdateSolrServer( url, 2, 5 ) {
        @Override
        public void handleError(Throwable ex) {
          // do something...    TODO?
        }
      };
      s.setConnectionTimeout(100); // 1/10th sec
      s.setDefaultMaxConnectionsPerHost(100);
      s.setMaxTotalConnections(100);
      return s;
    }
    catch( Exception ex ) {
      throw new RuntimeException( ex );
    }
View Full Code Here

  protected SolrServer createNewSolrServer()
  {
    try {
      // setup the server...
      String url = "http://localhost:"+port+context;       // smaller queue size hits locks more often
      CommonsHttpSolrServer s = new StreamingUpdateSolrServer( url, 2, 5 ) {
        @Override
        public void handleError(Throwable ex) {
          // do somethign...
        }
      };
      s.setConnectionTimeout(100); // 1/10th sec
      s.setDefaultMaxConnectionsPerHost(100);
      s.setMaxTotalConnections(100);
      return s;
    }
    catch( Exception ex ) {
      throw new RuntimeException( ex );
    }
View Full Code Here

    public void open(JobConf job, String name) throws IOException {
        String solrURL = job.get("solr.server.url");
        int queueSize = job.getInt("solr.client.queue.size", 100);
        int threadCount = job.getInt("solr.client.threads", 1);
        solr = new StreamingUpdateSolrServer(solrURL, queueSize, threadCount);
        /*
         * Generate mapping for Behemoth annotations/features to Solr fields
         * config values look like solr.f.<solr field> =
         * <annotationtype>.<feature> E.g., solr.f.foo = bar solr.f.foo =
         * spam.eggs generates the mapping {"bar":{"*","foo"},
 
View Full Code Here

        super(endpointUri, component);

        solrServer = new CommonsHttpSolrServer("http://" + address);
        streamingQueueSize = getIntFromString((String) parameters.get(SolrConstants.PARAM_STREAMING_QUEUE_SIZE), SolrConstants.DEFUALT_STREAMING_QUEUE_SIZE);
        streamingThreadCount = getIntFromString((String) parameters.get(SolrConstants.PARAM_STREAMING_THREAD_COUNT), SolrConstants.DEFAULT_STREAMING_THREAD_COUNT);
        streamingSolrServer = new StreamingUpdateSolrServer("http://" + address, streamingQueueSize, streamingThreadCount);
    }
View Full Code Here

                    {
                        synchronized (url.intern())
                        {
                            if((server = streamingClients.get(url)) == null)
                            {
                                server =  new StreamingUpdateSolrServer(url, numLoops, (numClients/urls.length));
                                System.err.println("Connection added by :"+threadId);
                                streamingClients.put(url, server);
                            }
                        }
                    }                
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer$Runner

Copyright © 2018 www.massapicom. 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.