Code Monkey home page Code Monkey logo

pegasus-java-client's Introduction

Pegasus Java Client

Build Status

Build

mvn clean package -DskipTests

Install

mvn clean install -DskipTests

Test

To run test, you should start pegasus onebox firstly, and run test as:

mvn clean package

or specify one test:

mvn clean package -Dtest=TestPing

Configuration

Configure client by "pegasus.properties", for example:

meta_servers = 127.0.0.1:34601,127.0.0.1:34602,127.0.0.1:34603
operation_timeout = 1000
async_workers = 4
enable_perf_counter = true
perf_counter_tags = k1=v1,k2=v2,k3=v3
push_counter_interval_secs = 10

You can provide a parameter of 'configPath' when creating a client instance.

The format of 'configPath' should be one of these:

  • zk path: zk://host1:port1,host2:port2,host3:port3/path/to/config
  • local file path: file:///path/to/config
  • resource path: resource:///path/to/config

PerfCounter(Metrics)

Pegasus Java Client supports QPS and latency statistics of requests.

The related configurations are:

enable_perf_counter = true
perf_counter_tags = k1=v1,k2=v2,k3=v3
push_counter_interval_secs = 10

For each type of request(get, set, multiset, etc.), we collect 8 metrics:

  1. cps-1sec: the request's qps
  2. cps-1min: the request's queries per 1 minute
  3. cps-5min: the request's queries per 5 minutes
  4. cps-15min: the request's queries per 15 minutes
  5. latency-p50: the moving median of request's queries
  6. latency-p99: the moving p99 of request's queries
  7. lantecy-p999: the moving p999 of request's queries 8: latency-max: the moving max of request's queries

We use io.dropwizard.metrics library to calculate the request count.

Currently, metrics are integrated with open-falcon(http://open-falcon.com/), which push counters to local http agent http://127.0.0.1:1988/push/v1.

If you'd like to integrate pegasus client with other monitor system, please let us know ASAP.

pegasus-java-client's People

Contributors

foreverneverer avatar qinzuoyan avatar levy5307 avatar zhongchaoqiang avatar shengofsun avatar hycdong avatar totalo avatar acelyc111 avatar dependabot[bot] 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.