├── src
├── .gitignore
├── mygnuplot.bat
├── tsd
│ ├── static
│ │ └── favicon.ico
│ ├── QueryUi.gwt.xml
│ ├── client
│ │ ├── GotJsonCallback.java
│ │ ├── ValidatedTextBox.java
│ │ ├── QueryString.java
│ │ └── EventsHandler.java
│ ├── HttpRpc.java
│ ├── GnuplotException.java
│ ├── TelnetRpc.java
│ ├── WordSplitter.java
│ ├── StaticFileRpc.java
│ ├── RpcPlugin.java
│ ├── LineBasedFrameDecoder.java
│ ├── SuggestRpc.java
│ ├── ConnectionManager.java
│ └── LogsRpc.java
├── mygnuplot.sh
├── logback.xml
├── upgrade_1to2.sh
├── core
│ ├── IllegalDataException.java
│ ├── DataPoint.java
│ ├── Aggregator.java
│ ├── SeekableView.java
│ ├── RowKey.java
│ ├── Const.java
│ ├── ByteBufferList.java
│ ├── MutableDataPoint.java
│ ├── DataPointsIterator.java
│ ├── RateOptions.java
│ └── IncomingDataPoint.java
├── create_table.sh
├── utils
│ ├── JSONException.java
│ ├── FileSystem.java
│ ├── ByteArrayPair.java
│ └── Pair.java
├── uid
│ ├── NoSuchUniqueId.java
│ ├── NoSuchUniqueName.java
│ └── UniqueIdInterface.java
└── opentsdb.conf
├── test
├── META-INF
│ ├── MANIFEST.MF
│ └── services
│ │ ├── net.opentsdb.tsd.RpcPlugin
│ │ ├── net.opentsdb.search.SearchPlugin
│ │ ├── net.opentsdb.tsd.RTPublisher
│ │ ├── net.opentsdb.tsd.HttpSerializer
│ │ └── net.opentsdb.plugin.DummyPlugin
├── plugin
│ ├── DummyPlugin.java
│ ├── DummyPluginA.java
│ └── DummyPluginB.java
├── uid
│ └── TestNoSuchUniqueId.java
├── tsd
│ ├── DummyHttpSerializer.java
│ ├── DummyRpcPlugin.java
│ ├── DummyRTPublisher.java
│ ├── TestRpcPlugin.java
│ └── TestRTPublisher.java
├── utils
│ ├── TestFileSystem.java
│ └── TestPluginLoader.java
├── search
│ ├── TestSearchQuery.java
│ └── DummySearchPlugin.java
├── core
│ ├── TestMutableDataPoint.java
│ ├── TestTSQuery.java
│ ├── TestAggregators.java
│ └── TestTSSubQuery.java
└── graph
│ └── TestPlot.java
├── third_party
├── guava
│ ├── guava-17.0.jar.md5
│ ├── guava-18.0.jar.md5
│ └── include.mk
├── junit
│ ├── junit-4.10.jar.md5
│ ├── junit-4.11.jar.md5
│ └── include.mk
├── gwt
│ ├── gwt-dev-2.5.0.jar.md5
│ ├── gwt-dev-2.6.0.jar.md5
│ ├── gwt-user-2.5.0.jar.md5
│ ├── gwt-user-2.6.0.jar.md5
│ └── include.mk
├── mockito
│ ├── mockito-1.9.0.jar.md5
│ ├── mockito-core-1.9.5.jar.md5
│ └── include.mk
├── slf4j
│ ├── slf4j-api-1.7.2.jar.md5
│ ├── slf4j-api-1.7.7.jar.md5
│ ├── log4j-over-slf4j-1.7.2.jar.md5
│ ├── log4j-over-slf4j-1.7.7.jar.md5
│ └── include.mk
├── suasync
│ ├── async-1.4.0.jar.md5
│ └── include.mk
├── hamcrest
│ ├── hamcrest-core-1.3.jar.md5
│ └── include.mk
├── hbase
│ ├── asynchbase-1.5.0.jar.md5
│ ├── asynchbase-1.6.0.jar.md5
│ └── include.mk
├── jackson
│ ├── jackson-core-2.1.5.jar.md5
│ ├── jackson-core-2.4.3.jar.md5
│ ├── jackson-databind-2.1.5.jar.md5
│ ├── jackson-databind-2.4.3.jar.md5
│ ├── jackson-annotations-2.1.5.jar.md5
│ ├── jackson-annotations-2.4.3.jar.md5
│ └── include.mk
├── logback
│ ├── logback-core-1.0.9.jar.md5
│ ├── logback-classic-1.0.13.jar.md5
│ ├── logback-classic-1.0.9.jar.md5
│ ├── logback-core-1.0.13.jar.md5
│ └── include.mk
├── netty
│ ├── netty-3.9.1.Final.jar.md5
│ ├── netty-3.9.4.Final.jar.md5
│ └── include.mk
├── objenesis
│ ├── objenesis-1.3.jar.md5
│ ├── objenesis-2.1.jar.md5
│ └── include.mk
├── zookeeper
│ ├── zookeeper-3.3.4.jar.md5
│ ├── zookeeper-3.3.6.jar.md5
│ └── include.mk
├── javassist
│ ├── javassist-3.17.1-GA.jar.md5
│ ├── javassist-3.18.1-GA.jar.md5
│ └── include.mk
├── powermock
│ ├── powermock-mockito-1.5.jar.md5
│ ├── powermock-mockito-release-full-1.5.4-full.jar.md5
│ └── include.mk
├── protobuf
│ ├── protobuf-java-2.5.0.jar.md5
│ └── include.mk
├── validation-api
│ ├── validation-api-1.0.0.GA.jar.md5
│ ├── validation-api-1.0.0.GA-sources.jar.md5
│ └── include.mk
└── include.mk
├── .dir-locals.el
├── .travis.yml
├── tools
├── clean_cache.sh
├── opentsdb_restart.py
└── tsddrain.py
├── .gitignore
├── bootstrap
├── AUTHORS
├── README
├── configure.ac
├── THANKS
├── opentsdb.spec.in
└── tsdb.in
/src/.gitignore:
--------------------------------------------------------------------------------
1 | BuildData.java
2 |
--------------------------------------------------------------------------------
/test/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/third_party/guava/guava-17.0.jar.md5:
--------------------------------------------------------------------------------
1 | 89fef81c2adfa9b50a64ed5cd5d8c155
2 |
--------------------------------------------------------------------------------
/third_party/guava/guava-18.0.jar.md5:
--------------------------------------------------------------------------------
1 | 947641f6bb535b1d942d1bc387c45290
2 |
--------------------------------------------------------------------------------
/third_party/junit/junit-4.10.jar.md5:
--------------------------------------------------------------------------------
1 | 972c3b8fb2cc26008cbceb01ff889ec4
2 |
--------------------------------------------------------------------------------
/third_party/junit/junit-4.11.jar.md5:
--------------------------------------------------------------------------------
1 | 3c42be5ea7cbf3635716abbb429cb90d
2 |
--------------------------------------------------------------------------------
/third_party/gwt/gwt-dev-2.5.0.jar.md5:
--------------------------------------------------------------------------------
1 | 538df8db77bacc863f34b82c59d5632d
2 |
--------------------------------------------------------------------------------
/third_party/gwt/gwt-dev-2.6.0.jar.md5:
--------------------------------------------------------------------------------
1 | 23d8bf52709230c2c7e6dd817261f9ee
2 |
--------------------------------------------------------------------------------
/third_party/gwt/gwt-user-2.5.0.jar.md5:
--------------------------------------------------------------------------------
1 | c58e29c1132ee6694e8f780e045f4d13
2 |
--------------------------------------------------------------------------------
/third_party/gwt/gwt-user-2.6.0.jar.md5:
--------------------------------------------------------------------------------
1 | 99226fc2764f2b8fd6db6e05d0847659
2 |
--------------------------------------------------------------------------------
/third_party/mockito/mockito-1.9.0.jar.md5:
--------------------------------------------------------------------------------
1 | cab21b44958a173a5b1d55a6aff0ab54
2 |
--------------------------------------------------------------------------------
/third_party/slf4j/slf4j-api-1.7.2.jar.md5:
--------------------------------------------------------------------------------
1 | ebf348e2831a3b610860fa134ad6f67f
2 |
--------------------------------------------------------------------------------
/third_party/slf4j/slf4j-api-1.7.7.jar.md5:
--------------------------------------------------------------------------------
1 | ca4280bf93d64367723ae5c8d42dd0b9
2 |
--------------------------------------------------------------------------------
/third_party/suasync/async-1.4.0.jar.md5:
--------------------------------------------------------------------------------
1 | 90aa9cc566423f12af88e205804d5161
2 |
--------------------------------------------------------------------------------
/test/META-INF/services/net.opentsdb.tsd.RpcPlugin:
--------------------------------------------------------------------------------
1 | net.opentsdb.tsd.DummyRpcPlugin
--------------------------------------------------------------------------------
/third_party/hamcrest/hamcrest-core-1.3.jar.md5:
--------------------------------------------------------------------------------
1 | 6393363b47ddcbba82321110c3e07519
2 |
--------------------------------------------------------------------------------
/third_party/hbase/asynchbase-1.5.0.jar.md5:
--------------------------------------------------------------------------------
1 | 12c61569f04eb88229c90dde9fa51848
2 |
--------------------------------------------------------------------------------
/third_party/hbase/asynchbase-1.6.0.jar.md5:
--------------------------------------------------------------------------------
1 | 6738dd73fd48d30cbf5c78f62bc18852
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-core-2.1.5.jar.md5:
--------------------------------------------------------------------------------
1 | 25f14871629c6ed2408438f8285ad26d
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-core-2.4.3.jar.md5:
--------------------------------------------------------------------------------
1 | 750ef3d86f04fe0d6d14d6ae904a6d2d
2 |
--------------------------------------------------------------------------------
/third_party/logback/logback-core-1.0.9.jar.md5:
--------------------------------------------------------------------------------
1 | d1647b6efc66bd38237e4d8c484aa7b4
2 |
--------------------------------------------------------------------------------
/third_party/mockito/mockito-core-1.9.5.jar.md5:
--------------------------------------------------------------------------------
1 | 6f73cf04a56eb60aaa996506e7c10fc7
2 |
--------------------------------------------------------------------------------
/third_party/netty/netty-3.9.1.Final.jar.md5:
--------------------------------------------------------------------------------
1 | c1a35f5f1dbc6d8f693b836a66070d45
2 |
--------------------------------------------------------------------------------
/third_party/netty/netty-3.9.4.Final.jar.md5:
--------------------------------------------------------------------------------
1 | b3701ef46c7518d0d63705e2f092dbe5
2 |
--------------------------------------------------------------------------------
/third_party/objenesis/objenesis-1.3.jar.md5:
--------------------------------------------------------------------------------
1 | 2d649907bd6203f2661f70d430a6ade8
2 |
--------------------------------------------------------------------------------
/third_party/objenesis/objenesis-2.1.jar.md5:
--------------------------------------------------------------------------------
1 | 32ccb1d20a42b5aaaceb90c9082a2efa
2 |
--------------------------------------------------------------------------------
/third_party/zookeeper/zookeeper-3.3.4.jar.md5:
--------------------------------------------------------------------------------
1 | f922a4d30df717ca3fcab8198c53d659
2 |
--------------------------------------------------------------------------------
/third_party/zookeeper/zookeeper-3.3.6.jar.md5:
--------------------------------------------------------------------------------
1 | a4425412297adf88c157a263d61e2cf1
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-databind-2.1.5.jar.md5:
--------------------------------------------------------------------------------
1 | 18603628104fa90698bfd713ffc03beb
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-databind-2.4.3.jar.md5:
--------------------------------------------------------------------------------
1 | 4fcb9f74280eaa21de10191212c65b11
2 |
--------------------------------------------------------------------------------
/third_party/javassist/javassist-3.17.1-GA.jar.md5:
--------------------------------------------------------------------------------
1 | d6a8586b96f0a0fb5f6100371759fa17
2 |
--------------------------------------------------------------------------------
/third_party/javassist/javassist-3.18.1-GA.jar.md5:
--------------------------------------------------------------------------------
1 | 5bb83868c87334320562af7eded65cc2
2 |
--------------------------------------------------------------------------------
/third_party/logback/logback-classic-1.0.13.jar.md5:
--------------------------------------------------------------------------------
1 | 18586a078b51918942002ec085338e19
2 |
--------------------------------------------------------------------------------
/third_party/logback/logback-classic-1.0.9.jar.md5:
--------------------------------------------------------------------------------
1 | ca99e6b10e9b2f46f264afc5cf1c13e1
2 |
--------------------------------------------------------------------------------
/third_party/logback/logback-core-1.0.13.jar.md5:
--------------------------------------------------------------------------------
1 | 945c6dc3c10d3ce784d456a8bbbd0262
2 |
--------------------------------------------------------------------------------
/third_party/powermock/powermock-mockito-1.5.jar.md5:
--------------------------------------------------------------------------------
1 | da9e7012d0e13f90c71829f2ac7d5462
2 |
--------------------------------------------------------------------------------
/third_party/protobuf/protobuf-java-2.5.0.jar.md5:
--------------------------------------------------------------------------------
1 | a44473b98947e2a54c54e0db1387d137
2 |
--------------------------------------------------------------------------------
/third_party/slf4j/log4j-over-slf4j-1.7.2.jar.md5:
--------------------------------------------------------------------------------
1 | cbd407d8ff67a6d54fd233fc0e0d8228
2 |
--------------------------------------------------------------------------------
/third_party/slf4j/log4j-over-slf4j-1.7.7.jar.md5:
--------------------------------------------------------------------------------
1 | 93ab42a5216afd683c35988c6b6fc3d8
2 |
--------------------------------------------------------------------------------
/test/META-INF/services/net.opentsdb.search.SearchPlugin:
--------------------------------------------------------------------------------
1 | net.opentsdb.search.DummySearchPlugin
--------------------------------------------------------------------------------
/test/META-INF/services/net.opentsdb.tsd.RTPublisher:
--------------------------------------------------------------------------------
1 | net.opentsdb.tsd.DummyRTPublisher
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-annotations-2.1.5.jar.md5:
--------------------------------------------------------------------------------
1 | bfe728a2d5f507e143ec41702a3dfc52
2 |
--------------------------------------------------------------------------------
/third_party/jackson/jackson-annotations-2.4.3.jar.md5:
--------------------------------------------------------------------------------
1 | 31ef4fa866f9d24960a6807c9c299e98
2 |
--------------------------------------------------------------------------------
/src/mygnuplot.bat:
--------------------------------------------------------------------------------
1 | set -e
2 | stdout=$1
3 | shift
4 | stderr=$1
5 | shift
6 | gnuplot %1 2>&1
7 |
--------------------------------------------------------------------------------
/test/META-INF/services/net.opentsdb.tsd.HttpSerializer:
--------------------------------------------------------------------------------
1 | net.opentsdb.tsd.DummyHttpSerializer
2 |
--------------------------------------------------------------------------------
/third_party/validation-api/validation-api-1.0.0.GA.jar.md5:
--------------------------------------------------------------------------------
1 | 40c1ee909493066397a6d4d9f8d375d8
2 |
--------------------------------------------------------------------------------
/src/tsd/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/b/opentsdb/master/src/tsd/static/favicon.ico
--------------------------------------------------------------------------------
/third_party/validation-api/validation-api-1.0.0.GA-sources.jar.md5:
--------------------------------------------------------------------------------
1 | f816682933b59c5ffe32bdb4ab4bf628
2 |
--------------------------------------------------------------------------------
/third_party/powermock/powermock-mockito-release-full-1.5.4-full.jar.md5:
--------------------------------------------------------------------------------
1 | 5dee1dce6952bb7338d4d053157ae647
2 |
--------------------------------------------------------------------------------
/test/META-INF/services/net.opentsdb.plugin.DummyPlugin:
--------------------------------------------------------------------------------
1 | net.opentsdb.plugin.DummyPluginA
2 | net.opentsdb.plugin.DummyPluginB
--------------------------------------------------------------------------------
/.dir-locals.el:
--------------------------------------------------------------------------------
1 | ;;; Directory Local Variables
2 | ;;; See Info node `(emacs) Directory Variables' for more information.
3 |
4 | ((java-mode
5 | (c-basic-offset . 2)
6 | (indent-tabs-mode . nil)))
7 | ))
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | before_script: ./build.sh pom.xml
3 | script: export MAVEN_OPTS="-Xmx1024m" && mvn test --quiet
4 | jdk:
5 | - oraclejdk7
6 | - openjdk6
7 | notifications:
8 | email: false
9 |
--------------------------------------------------------------------------------
/src/mygnuplot.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Because !@#$%^ Java can't fucking do this without a bazillion lines of codes.
3 | set -e
4 | stdout=$1
5 | shift
6 | stderr=$1
7 | shift
8 | exec nice gnuplot "$@" >"$stdout" 2>"$stderr"
9 |
--------------------------------------------------------------------------------
/tools/clean_cache.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | CACHE_DIR=/tmp/tsd
4 |
5 | diskSpaceIsShort() {
6 | df -h "$CACHE_DIR" \
7 | | awk 'NR==2{pct=$5; sub(/%/, "", pct); if (pct < 90) exit 1; exit 0;}'
8 | }
9 |
10 | if diskSpaceIsShort; then
11 | rm -rf "$CACHE_DIR"/*
12 | fi
13 |
--------------------------------------------------------------------------------
/src/tsd/QueryUi.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | INSTALL
2 | Makefile
3 | Makefile.in
4 | aclocal.m4
5 | autom4te.cache
6 | build
7 | target
8 | config.log
9 | config.status
10 | configure
11 | pom.xml
12 | *.pyc
13 | .*.swp
14 | *.rrd
15 | *.class
16 | */target/*
17 | *.orig
18 | *.log
19 |
20 | #for Intellij
21 | \.idea
22 | *.iml
23 |
24 | #for guava rpm maker
25 | guava-rpm-maker/\.project
26 |
27 | # for mac finder
28 | .DS_Store
29 |
30 | # for eclipse
31 | .pydevproject
32 | .metadata
33 | .project
34 | .classpath
35 | .settings
36 |
37 | # maven
38 | src-main
39 | src-test
40 | plugin_test.jar
41 |
--------------------------------------------------------------------------------
/src/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %d{ISO8601} %-5level [%thread] %logger{0}: %msg%n
8 |
9 |
10 |
11 |
12 | 1024
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright (C) 2011-2012 The OpenTSDB Authors.
3 | #
4 | # This library is free software: you can redistribute it and/or modify it
5 | # under the terms of the GNU Lesser General Public License as published
6 | # by the Free Software Foundation, either version 2.1 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # This library is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU Lesser General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU Lesser General Public License
15 | # along with this library. If not, see .
16 |
17 | exec autoreconf -fvi
18 |
--------------------------------------------------------------------------------
/tools/opentsdb_restart.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | """Restart opentsdb. Called using -XX:OnOutOfMemoryError=
3 |
4 | Because it's calling the 'service opentsdb' command, should be run as root.
5 |
6 | This is known to work with python2.6 and above.
7 | """
8 | import os
9 | import subprocess
10 |
11 |
12 | subprocess.call(["service", "opentsdb", "stop"])
13 | # Close any file handles we inherited from our parent JVM. We need
14 | # to do this before restarting so that the socket isn't held open.
15 | openfiles = [int(f) for f in os.listdir("/proc/self/fd")]
16 | # Don't need to close stdout/stderr/stdin, leave them open so
17 | # that there is less chance of errors with those standard streams.
18 | # Other files start at fd 3.
19 | os.closerange(3, max(openfiles))
20 | subprocess.call(["service", "opentsdb", "start"])
21 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | The OpenTSDB Authors
2 | --------------------
3 |
4 | OpenTSDB was originally written by Benoit Sigoure.
5 |
6 | The following organizations and people have made significant code
7 | contributions to OpenTSDB. Note that all contributors are required
8 | to sign a standard Contribution License Agreement to ensure that the
9 | code remains free & open-source.
10 | (Please keep both lists sorted alphabetically.)
11 |
12 |
13 | Arista Networks, Inc.
14 | Betfair Group plc
15 | Box, Inc.
16 | Bump Technologies, Inc.
17 | Limelight Networks, Inc.
18 | StumbleUpon, Inc.
19 | Yahoo, Inc.
20 |
21 |
22 | Benoit Sigoure
23 | Chris Larsen
24 | David Bainbridge
25 | Geoffrey Anderson
26 | Ion Savin
27 | Nicholas Whitehead
28 | Will Moss
29 |
--------------------------------------------------------------------------------
/src/tsd/client/GotJsonCallback.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2010-2012 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package tsd.client;
14 |
15 | import com.google.gwt.json.client.JSONValue;
16 |
17 | interface GotJsonCallback {
18 |
19 | void got(JSONValue json);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/third_party/junit/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011-2012 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | JUNIT_VERSION := 4.11
17 | JUNIT := third_party/junit/junit-$(JUNIT_VERSION).jar
18 | JUNIT_BASE_URL := http://central.maven.org/maven2/junit/junit/$(JUNIT_VERSION)
19 |
20 | $(JUNIT): $(JUNIT).md5
21 | set dummy "$(JUNIT_BASE_URL)" "$(JUNIT)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(JUNIT)
24 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | ___ _____ ____ ____ ____
2 | / _ \ _ __ ___ _ _|_ _/ ___|| _ \| __ )
3 | | | | | '_ \ / _ \ '_ \| | \___ \| | | | _ \
4 | | |_| | |_) | __/ | | | | ___) | |_| | |_) |
5 | \___/| .__/ \___|_| |_|_| |____/|____/|____/
6 | |_| The modern time series database.
7 |
8 | OpenTSDB is a distributed, scalable Time Series Database (TSDB) written on
9 | top of HBase. OpenTSDB was written to address a common need: store, index
10 | and serve metrics collected from computer systems (network gear, operating
11 | systems, applications) at a large scale, and make this data easily accessible
12 | and graphable.
13 |
14 | Thanks to HBase's scalability, OpenTSDB allows you to collect thousands of
15 | metrics from tens of thousands of hosts and applications, at a high rate
16 | (every few seconds). OpenTSDB will never delete or downsample data and can
17 | easily store hundreds of billions of data points.
18 |
19 | OpenTSDB is free software and is available under both LGPLv2.1+ and GPLv3+.
20 | Find more about OpenTSDB at http://opentsdb.net
21 |
--------------------------------------------------------------------------------
/third_party/suasync/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | SUASYNC_VERSION := 1.4.0
17 | SUASYNC := third_party/suasync/async-$(SUASYNC_VERSION).jar
18 | SUASYNC_BASE_URL := http://central.maven.org/maven2/com/stumbleupon/async/$(SUASYNC_VERSION)
19 |
20 | $(SUASYNC): $(SUASYNC).md5
21 | set dummy "$(SUASYNC_BASE_URL)" "$(SUASYNC)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(SUASYNC)
24 |
--------------------------------------------------------------------------------
/third_party/mockito/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | MOCKITO_VERSION := 1.9.5
17 | MOCKITO := third_party/mockito/mockito-core-$(MOCKITO_VERSION).jar
18 | MOCKITO_BASE_URL := http://central.maven.org/maven2/org/mockito/mockito-core/$(MOCKITO_VERSION)
19 |
20 | $(MOCKITO): $(MOCKITO).md5
21 | set dummy "$(MOCKITO_BASE_URL)" "$(MOCKITO)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(MOCKITO)
24 |
--------------------------------------------------------------------------------
/third_party/hamcrest/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2013 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | HAMCREST_VERSION := 1.3
17 | HAMCREST := third_party/hamcrest/hamcrest-core-$(HAMCREST_VERSION).jar
18 | HAMCREST_BASE_URL := http://central.maven.org/maven2/org/hamcrest/hamcrest-core/$(HAMCREST_VERSION)
19 |
20 | $(HAMCREST): $(HAMCREST).md5
21 | set dummy "$(HAMCREST_BASE_URL)" "$(HAMCREST)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(HAMCREST)
24 |
--------------------------------------------------------------------------------
/third_party/objenesis/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2013 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | OBJENESIS_VERSION := 1.3
17 | OBJENESIS := third_party/objenesis/objenesis-$(OBJENESIS_VERSION).jar
18 | OBJENESIS_BASE_URL := http://central.maven.org/maven2/org/objenesis/objenesis/$(OBJENESIS_VERSION)
19 |
20 | $(OBJENESIS): $(OBJENESIS).md5
21 | set dummy "$(OBJENESIS_BASE_URL)" "$(OBJENESIS)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(OBJENESIS)
24 |
--------------------------------------------------------------------------------
/third_party/protobuf/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011-2014 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | PROTOBUF_VERSION := 2.5.0
17 | PROTOBUF := third_party/protobuf/protobuf-java-$(PROTOBUF_VERSION).jar
18 | PROTOBUF_BASE_URL := http://central.maven.org/maven2/com/google/protobuf/protobuf-java/$(PROTOBUF_VERSION)
19 |
20 | $(PROTOBUF): $(PROTOBUF).md5
21 | set dummy "$(PROTOBUF_BASE_URL)" "$(PROTOBUF)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(PROTOBUF)
24 |
--------------------------------------------------------------------------------
/third_party/zookeeper/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | ZOOKEEPER_VERSION := 3.3.6
17 | ZOOKEEPER := third_party/zookeeper/zookeeper-$(ZOOKEEPER_VERSION).jar
18 | ZOOKEEPER_BASE_URL := http://central.maven.org/maven2/org/apache/zookeeper/zookeeper/$(ZOOKEEPER_VERSION)
19 |
20 | $(ZOOKEEPER): $(ZOOKEEPER).md5
21 | set dummy "$(ZOOKEEPER_BASE_URL)" "$(ZOOKEEPER)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(ZOOKEEPER)
24 |
--------------------------------------------------------------------------------
/test/plugin/DummyPlugin.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2013-2014 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.plugin;
14 |
15 | import org.junit.Ignore;
16 |
17 | // need to ignore this class so JUnit doesn't try to run tests on it
18 | @Ignore
19 | public abstract class DummyPlugin {
20 | public String myname;
21 |
22 | public DummyPlugin() {
23 | myname = "";
24 | }
25 |
26 | public abstract String mustImplement();
27 | }
28 |
--------------------------------------------------------------------------------
/third_party/hbase/include.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011-2014 The OpenTSDB Authors.
2 | #
3 | # This library is free software: you can redistribute it and/or modify it
4 | # under the terms of the GNU Lesser General Public License as published
5 | # by the Free Software Foundation, either version 2.1 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This library is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this library. If not, see .
15 |
16 | ASYNCHBASE_VERSION := 1.6.0
17 | ASYNCHBASE := third_party/hbase/asynchbase-$(ASYNCHBASE_VERSION).jar
18 | ASYNCHBASE_BASE_URL := http://central.maven.org/maven2/org/hbase/asynchbase/$(ASYNCHBASE_VERSION)
19 |
20 | $(ASYNCHBASE): $(ASYNCHBASE).md5
21 | set dummy "$(ASYNCHBASE_BASE_URL)" "$(ASYNCHBASE)"; shift; $(FETCH_DEPENDENCY)
22 |
23 | THIRD_PARTY += $(ASYNCHBASE)
24 |
--------------------------------------------------------------------------------
/test/plugin/DummyPluginA.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2013-2014 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.plugin;
14 |
15 | import org.junit.Ignore;
16 |
17 | // need to ignore this class so JUnit doesn't try to run tests on it
18 | @Ignore
19 | public class DummyPluginA extends DummyPlugin {
20 |
21 | public DummyPluginA() {
22 | this.myname = "Dummy Plugin A";
23 | }
24 |
25 | public String mustImplement() {
26 | return this.myname;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/test/plugin/DummyPluginB.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2013-2014 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.plugin;
14 |
15 | import org.junit.Ignore;
16 |
17 | // need to ignore this class so JUnit doesn't try to run tests on it
18 | @Ignore
19 | public class DummyPluginB extends DummyPlugin {
20 |
21 | public DummyPluginB() {
22 | this.myname = "Dummy Plugin B";
23 | }
24 |
25 | public String mustImplement() {
26 | return this.myname;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/tsd/HttpRpc.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2010-2012 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.tsd;
14 |
15 | import java.io.IOException;
16 |
17 | import net.opentsdb.core.TSDB;
18 |
19 | /** Base interface for all HTTP query handlers. */
20 | interface HttpRpc {
21 |
22 | /**
23 | * Executes this RPC.
24 | * @param tsdb The TSDB to use.
25 | * @param query The HTTP query to execute.
26 | */
27 | void execute(TSDB tsdb, HttpQuery query) throws IOException;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/tsd/GnuplotException.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2010-2012 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.tsd;
14 |
15 | /**
16 | * Exception thrown when Gnuplot fails.
17 | */
18 | final class GnuplotException extends RuntimeException {
19 |
20 | public GnuplotException(final int gnuplot_return_value) {
21 | super("Gnuplot returned " + gnuplot_return_value);
22 | }
23 |
24 | public GnuplotException(final String gnuplot_stderr) {
25 | super("Gnuplot stderr:\n" + gnuplot_stderr);
26 | }
27 |
28 | static final long serialVersionUID = 1287770642;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/tsd/TelnetRpc.java:
--------------------------------------------------------------------------------
1 | // This file is part of OpenTSDB.
2 | // Copyright (C) 2010-2012 The OpenTSDB Authors.
3 | //
4 | // This program is free software: you can redistribute it and/or modify it
5 | // under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 2.1 of the License, or (at your
7 | // option) any later version. This program is distributed in the hope that it
8 | // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
10 | // General Public License for more details. You should have received a copy
11 | // of the GNU Lesser General Public License along with this program. If not,
12 | // see .
13 | package net.opentsdb.tsd;
14 |
15 | import com.stumbleupon.async.Deferred;
16 |
17 | import org.jboss.netty.channel.Channel;
18 |
19 | import net.opentsdb.core.TSDB;
20 |
21 | /** Base interface for all telnet-style RPC handlers. */
22 | interface TelnetRpc {
23 |
24 | /**
25 | * Executes this RPC.
26 | * @param tsdb The TSDB to use.
27 | * @param chan The channel on which the RPC was received.
28 | * @param command The command received, split.
29 | * @return A deferred result.
30 | */
31 | Deferred