Coder Social home page Coder Social logo

aaababyeos / elasticsearch_plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eoslaomao/elasticsearch_plugin

0.0 1.0 0.0 59 KB

Nodeos plugin for archiving blockchain data into Elasticsearch.

License: MIT License

CMake 0.64% C++ 99.36%

elasticsearch_plugin's Introduction

elasticsearch_plugin

Nodeos plugin for archiving blockchain data into Elasticsearch, inspired by mongo_db_plugin.

Benchmark

Installation

Install EOSLaoMao/elasticlient

elasticsearh_plugin rely on EOSLaoMao/elasticlient

git clone https://github.com/WLBF/elasticlient.git
cd elasticlient
git submodule update --init --recursive
cmake -DBUILD_ELASTICLIENT_TESTS=NO -DBUILD_ELASTICLIENT_EXAMPLE=NO
make
sudo make install
# copy cpr library manually
cp -r "external/cpr/include/cpr" "/usr/local/include/cpr"
cp "lib/libcpr.so" "/usr/local/lib/libcpr.so"

Embed elasticsearch_plugin into nodeos

  1. Get elasticsearch_plugin source code.
git clone https://github.com/EOSLaoMao/elasticsearch_plugin.git plugins/elasticsearch_plugin
  1. Add subdirectory to plugins/CMakeLists.txt.
...
add_subdirectory(mongo_db_plugin)
add_subdirectory(login_plugin)
add_subdirectory(login_plugin)
add_subdirectory(elasticsearch_plugin) # add this line.
...
  1. Add following line to programs/nodeos/CMakeList.txt.
target_link_libraries(
        ...
        # add this line.
        PRIVATE -Wl,${whole_archive_flag} elasticsearch_plugin -Wl,${no_whole_archive_flag}
        ...

Usage

The usage of elasticsearch_plugin is similar to mongo_db_plugin.

Config Options for eosio::elasticsearch_plugin:
  -q [ --elastic-queue-size ] arg (=512)        The target queue size between nodeos 
                                                and elasticsearch plugin thread.
  --elastic-abi-cache-size arg (=2048)          The maximum size of the abi cache for 
                                                serializing data.
  --elastic-index-wipe                          Required with --replay-blockchain, 
                                                --hard-replay-blockchain, or 
                                                --delete-all-blocks to delete 
                                                elasticsearch index.This option 
                                                required to prevent accidental wipe of 
                                                index.
  --elastic-block-start arg (=0)                If specified then only abi data pushed 
                                                to elasticsearch until specified block 
                                                is reached.
  -u [ --elastic-url ] arg                      elasticsearch URL connection string If 
                                                not specified then plugin is disabled.
  --elastic-user arg                            elasticsearch user.
  --elastic-password arg                        elasticsearch password.
  --elastic-store-blocks arg (=1)               Enables storing blocks in 
                                                elasticsearch.
  --elastic-store-block-states arg (=1)         Enables storing block state in 
                                                elasticsearch.
  --elastic-store-transactions arg (=1)         Enables storing transactions in 
                                                elasticsearch.
  --elastic-store-transaction-traces arg (=1)   Enables storing transaction traces in 
                                                elasticsearch.
  --elastic-store-action-traces arg (=1)        Enables storing action traces in 
                                                elasticsearch.
  --elasticsearch-filter-on arg                 elasticsearch: Track actions which 
                                                match receiver:action:actor. Actor may 
                                                be blank to include all. Receiver and 
                                                Action may not be blank. Default is * 
                                                include everything.
  --elasticsearch-filter-out arg                elasticsearch: Do not track actions 
                                                which match receiver:action:actor. 
                                                Action and Actor both blank excludes 
                                                all from reciever. Actor blank excludes
                                                all from reciever:action. Receiver may 
                                                not be blank.

elasticsearch_plugin's People

Contributors

wlbf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.