package solrs
- Alphabetic
- Public
- All
Type Members
-
class
AsyncSolrClient
[F[_]] extends AnyRef
Async, non-blocking Solr Server that just allows to
#query(SolrQuery)
.Async, non-blocking Solr Server that just allows to
#query(SolrQuery)
. The usage shall be similar to the solrj SolrServer, so query returns a future of aQueryResponse
. - trait AsyncSolrClientAware [F[_]] extends AnyRef
-
class
CloudSolrServers
[F[_]] extends SolrServers with AsyncSolrClientAware[F] with ServerStateChangeObservable
Provides servers based on information from from ZooKeeper.
Provides servers based on information from from ZooKeeper. Uses the ZkStateReader to read the ZK cluster state, which is also used by solrj's CloudSolrServer. While ZkStateReader uses ZK Watches to get cluster state changes from ZK, we're regularly updating our internal state by reading the cluster state from ZkStateReader.
- class CodaHaleMetrics [F[_]] extends Metrics
-
class
FastestServerLB
[F[_]] extends LoadBalancer with AsyncSolrClientAware[F] with FastestServerLBJmxSupport[F]
LB strategy that selects the fastest server based on the latest average response time.
LB strategy that selects the fastest server based on the latest average response time. It's aimed to handle a multi datacenter setup where some server regularly need longer to response. It shall also detect short (subsecond) pauses of a server e.g. due to garbage collection or s.th. else.
The latest average response time is determined in the following order (the first found measure is used): - currently still running requests (if they're lasting longer than previous, already completed requests) - average response time of the current or the last second - average response time of the last ten seconds - total average resonse time
The response time is measured using the given testQuery. A dedicated test query is used, because queries can have very different performance characteristics, so that it might even be hard for an application to classify this. With the testQuery you have control what is used to measure response time.
For "normal" / "fast" servers (default: with a resonse time <= the average of all servers, you can override
determineFastServers
) test queries are run whenever a request comes in, but between test queries at least the minDelay has to be passed. This way servers are not hammered with requests when nobody else is using your search, but if there's high traffic this load balancer get high resolution of monitoring data to detect short pauses as well.For "slow" servers (default: response time > average) tests are run using the specified maxDelay.
Directly after creation of this LoadBalancer / AsnycSolrClient multiple test queries are run (according to the specified
initialTestRuns
, by default 10) to have initial stats. -
trait
FastestServerLBJmxSupport
[F[_]] extends FastestServerLBMBean
JMX support for FastestServerLB, implementation of FastestServerLBMBean, to be mixed into FastestServerLB.
-
trait
FastestServerLBMBean
extends AnyRef
JMX MBean for FastestServerLB.
-
class
JavaAsyncSolrClient
extends AsyncSolrClient[CompletionStage]
Java API: Async, non-blocking Solr Server that just allows to
query(SolrQuery)
.Java API: Async, non-blocking Solr Server that just allows to
query(SolrQuery)
. The usage shall be similar to the solrj SolrServer, so query returns a CompletionStage of a QueryResponse.Example usage:
JavaAsyncSolrClient solr = JavaAsyncSolrClient.create("http://localhost:" + solrRunner.port + "/solr/collection1"); CompletionStage<QueryResponse> response = solr.query(new SolrQuery("*:*")); response.thenAccept(r -> System.out.println("found "+ r.getResults().getNumFound() +" docs"));
- trait LoadBalancer extends RequestInterceptor
- trait Metrics extends AnyRef
-
class
PerformanceStats
extends AnyRef
Statistics for a solr server.
-
class
PingStatusObserver
[F[_]] extends ServerStateObserver[F]
A ServerStateObserver that uses the ping status to enable/disable SolrServers.
A ServerStateObserver that uses the ping status to enable/disable SolrServers. To use this in solrconfig.xml the PingRequestHandler must be configured with the healthcheckFile, e.g.:
<str name="healthcheckFile">server-enabled.txt</str>
-
case class
QueryContext
(q: SolrQuery, preferred: Option[SolrServer] = None, failedRequests: Seq[RequestInfo] = Seq.empty) extends Product with Serializable
Defines the context for a search query initiated by the client.
Defines the context for a search query initiated by the client.
- q
the search query
- preferred
the server that the user would like to use for the query
- failedRequests
information regarding failed requests
- class ReloadingSolrServers [F[_]] extends SolrServers
-
class
RemoteSolrException
extends SolrException
Subclass of SolrException that allows us to capture an arbitrary HTTP status code that may have been returned by the remote server or a proxy along the way.
-
case class
RequestInfo
(server: SolrServer, duration: Duration, exception: Throwable) extends Product with Serializable
Information about a failed request.
-
trait
RequestInterceptor
extends AnyRef
Clients can intercept requests.
-
sealed
trait
RetryDecision
extends AnyRef
A retry decision to adopt on a failed request.
-
abstract
class
RetryPolicy
extends AnyRef
Specifies a policy for retrying query failures.
- case class RetryServer (server: SolrServer) extends RetryDecision with Product with Serializable
- class RoundRobinLB extends LoadBalancer
- class ScalaAsyncSolrClient extends AsyncSolrClient[Future]
- trait ServerStateChangeObservable extends AnyRef
-
case class
ServerStateObservation
[F[_]](serverStateObserver: ServerStateObserver[F], checkInterval: FiniteDuration, actorSystem: ActorSystem, futureFactory: FutureFactory[F]) extends Product with Serializable
Configuration for scheduled server state observation.
Configuration for scheduled server state observation.
- serverStateObserver
the observer that checks server state
- checkInterval
the interval to check server state
- actorSystem
used for scheduling
- futureFactory
factory to create promise/future types.
-
trait
ServerStateObserver
[F[_]] extends AnyRef
Monitoring of solr server state (enabled/disabled/dead etc.)
- sealed trait ServerStatus extends AnyRef
- class SingleServerLB extends LoadBalancer
-
class
SolrServer
extends AnyRef
Represents a solr host.
-
trait
SolrServers
extends AnyRef
Provides the list of solr servers.
- case class StandardRetryDecision (result: Result) extends RetryDecision with Product with Serializable
- trait StateChangeObserver extends AnyRef
- class StaticSolrServers extends SolrServers
- trait TypedAsyncSolrClient [F[_], ASC <: AsyncSolrClient[F]] extends AnyRef
Value Members
- object AsyncSolrClient
- object CloudSolrServers
- object Disabled extends ServerStatus with Product with Serializable
- object Enabled extends ServerStatus with Product with Serializable
- object Failed extends ServerStatus with Product with Serializable
- object FastestServerLB
- object FastestServerLBJmxSupport
- object JavaAsyncSolrClient extends TypedAsyncSolrClient[CompletionStage, JavaAsyncSolrClient]
-
object
Main
extends App
Created by magro on 9/12/14.
- object NoopMetrics extends Metrics
- object PerformanceStats
- object RetryDecision
-
object
RetryPolicy
Predefined query retry policies.
- object RoundRobinLB
- object ServerStateChangeObservable
- object SolrServer
- object StaticSolrServers