Solr Driver for SBK Framework

Storage Benchmark Kit

Solr Driver for SBK Framework

This driver provides performance benchmarking capabilities for Apache Solr within the SBK framework.

Overview

Apache Solr is a powerful search platform built on Apache Lucene. This driver allows you to benchmark Solr’s performance for various operations including indexing and searching documents.

Features

Configuration

The Solr driver can be configured using the following parameters:

Parameter Description Default Value
zookeeperHost ZooKeeper host for SolrCloud localhost
zookeeperPort ZooKeeper port for SolrCloud 2181
collection Solr collection name sbk_benchmark
solrUrl Direct Solr URL (for standalone mode) http://localhost:8983/solr
username Solr username (optional) ""
password Solr password (optional) ""
batchSize Number of documents per batch 100
commitWithinMs Commit within time in milliseconds 1000

Prerequisites

  1. Solr Installation: Ensure you have Apache Solr 8.x or later installed and running
  2. SolrCloud Mode: For distributed benchmarks, set up SolrCloud with ZooKeeper
  3. Java: Java 8 or later required
  4. Network Access: Ensure the SBK framework can access your Solr instance

Setting up SolrCloud

  1. Download and extract Apache Solr
  2. Start Solr in cloud mode:
    ./bin/solr start -c -p 8983 -s example/cloud/node1/solr -z localhost:2181
    
  3. Create a collection (optional, the driver will create it if it doesn’t exist):
    ./bin/solr create -c sbk_benchmark -shards 1 -replicationFactor 1
    

Document Structure

The driver stores documents with the following fields:

Performance Considerations

  1. Batch Size: Larger batch sizes generally improve write performance but use more memory
  2. Commit Settings: Longer commit within times improve performance but may affect data visibility
  3. Solr Configuration: Ensure your Solr instance is properly tuned for your workload
  4. Network Latency: Consider network latency between SBK and Solr instances

Troubleshooting

Common Issues

  1. Connection Failed: Ensure Solr is running and accessible from the SBK framework
  2. Collection Not Found: The driver will attempt to create the collection automatically
  3. Authentication Errors: Verify username and password if authentication is enabled

Logging

Enable debug logging to troubleshoot issues:

./gradlew run -PmainClass=io.sbk.app.Main --args="--storage solr --records 1000 --debug"

Dependencies

License

This driver is licensed under the Apache License 2.0.

Contributing

To contribute to this driver:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions: