Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-18 Thread Torsten Krah
Am Freitag, den 15.06.2012, 18:22 +0100 schrieb Kissue Kissue:
 Hi,
 
 Does anybody know what the default connection timeout setting is for
 StreamingUpdateSolrServer? Can i explicitly set one and how?
 
 Thanks. 

Use a custom HttpClient to set one (only snippets, should be clear, if
not tell):

this.instance = new StreamingUpdateSolrServer(getUrl(), httpClient,
DOC_QUEUE_SIZE, WORKER_SIZE);

and use httpClient like this:

this.connectionManager = new MultiThreadedHttpConnectionManager();
final HttpClient httpClient = new HttpClient(this.connectionManager);
httpClient.getParams().setConnectionManagerTimeout(CONN_ACQUIRE_TIMEOUT);
httpClient.getParams().setSoTimeout(SO_TIMEOUT);

regards

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-18 Thread Torsten Krah
AddOn: You can even set a custom http factory for commons-http (which is
used by SolrStreamingUpdateServer) at all to influence socket options,
example is:

final Protocol http = new Protocol(http,
MycustomHttpSocketFactory.getSocketFactory(), 80);

and MycustomHttpSocketFactory.getSocketFactory is a factory which does
extend

org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory

and override / implement methods as needed (direct socket access).

Call this e.g. in a ServletListener in contextInitialized and you are
done.

regards

Torsten



smime.p7s
Description: S/MIME cryptographic signature


Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-18 Thread Torsten Krah
You should also call the glue code ;-):

Protocol.registerProtocol(http, http);

regards

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-16 Thread Kissue Kissue
Thanks Sami. Has anybody had any need to explicitly set the connection
timeout? Just trying to understand how folks use it.

Thanks.

On Fri, Jun 15, 2012 at 7:01 PM, Sami Siren ssi...@gmail.com wrote:

 The api doc for version 3.6.0 is available here:

 http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/StreamingUpdateSolrServer.html

 I think the default is coming from your OS if you are not setting it
 explicitly.

 --
  Sami Siren

 On Fri, Jun 15, 2012 at 8:22 PM, Kissue Kissue kissue...@gmail.com
 wrote:
  Hi,
 
  Does anybody know what the default connection timeout setting is for
  StreamingUpdateSolrServer? Can i explicitly set one and how?
 
  Thanks.



StreamingUpdateSolrServer Connection Timeout Setting

2012-06-15 Thread Kissue Kissue
Hi,

Does anybody know what the default connection timeout setting is for
StreamingUpdateSolrServer? Can i explicitly set one and how?

Thanks.


Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-15 Thread Sami Siren
The api doc for version 3.6.0 is available here:
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/StreamingUpdateSolrServer.html

I think the default is coming from your OS if you are not setting it explicitly.

--
 Sami Siren

On Fri, Jun 15, 2012 at 8:22 PM, Kissue Kissue kissue...@gmail.com wrote:
 Hi,

 Does anybody know what the default connection timeout setting is for
 StreamingUpdateSolrServer? Can i explicitly set one and how?

 Thanks.