Skip to content

Latest commit

 

History

History
85 lines (66 loc) · 2.56 KB

README.mkd

File metadata and controls

85 lines (66 loc) · 2.56 KB

   Thoth demo



Get started

  • Clone the demo project
git clone https://github.com/trulia/thoth-demo.git

Start the demos

This example contains a demo version of

  • ActiveMQ broker
  • A simple solr instance that we will use to intercept queries from
  • A thoth index
  • Thoth

Start the demos separately or use the example start script

Demo of the functionality

  • Let's execute some queries and simulate some exceptions from the intercepted instance

     # Standard query *:*
     curl 'http://localhost:8900/solr/collection1/select?q=*%3A*&wt=json&indent=true'
    
     # Query that will generate exception
     curl 'http://localhost:8900/solr/collection1/select?q=THIS_FIELD:DOES_NOT_EXIST&wt=json&indent=true'
    
  • Those requests have been intercepted and indexed by Thoth inside the Thoth index . Let's verify this:

http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json&indent=true
  • After a minute the documents will be automatically shrinked and a summary shrank document will be added to the shrank core. You can change the shrinking configuration inside thoth/resources/application.properties

Here's a snippet

# Enable/Disable shrinking feature
thoth.shrinker.enabled=true

# Schedule when do you want the shrinker feature to be triggered
# 0 * * * * ? --> Every minute
thoth.shrinker.schedule=0 * * * * ?
# 'how long back' you want to shrink docs in seconds
thoth.shrinker.period= 900
thoth.shrinker.threadPoolSize = 1

Stop the Demos

The stop_demo.sh script kills the above started process based on the default port number's.

Stop the demos separately or use the example stop script. (Make sure you have execute permission's)

  • Execute stop_demo.sh .
    ./scripts/stop_demo.sh
    

License

Copyright (c) 2014 Trulia, Inc. See the LICENSE file for license rights and limitations.

Powered by