Changed utc_offset from short to int so it doesn't overflow for GMT>9

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add the init.d service script for opentsdb RPM.

- Added the init.d service script for opentsdb.
- Makes opentsdb logs roll hourly.
  Configures the existing logback.xml with the RollingFileAppender class.
  Changes the init script to supply the log file prefix with the right
  directory and host name.
- Auto-restart on OOM & allow JVM args to be configured.
- Updated init to be smarter and use redhat init functions
- Added timestamp to RPM filename.

NOTE: Submitted on behalf of third-party contributors:
 * Kimoon Kim <kimoon@pepperdata.com>
 * Sean Suchter <ssuchter@pepperdata.com>
 * tthompso <tthompso@linkedin.com>

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Reorganize RPM package directories and support chaning to a non-root user.
- Renamed and moved src/opentsdb-init-d.sh to build-aux/init.d/opentsdb.
- Made the RPM directory structure similar to that of the Debian package.
- Copied build-aux/deb/opentsdb.conf to build-aux/rpm/opentsdb.conf.
- Copied jars to /usr/share/opentsdb/lib during installation.
- Left a TODO for the alternatives.
- Changed the owner of files touched by OpenTSDB.
*** For the existing OpenTSDB installations, we should modify the init script
symbolic links to point to the new target.

New directory structure:
-----------
rpmbuildroot/usr/share/opentsdb:
  bin/  etc/  lib/  static/  tools/
rpmbuildroot/usr/share/opentsdb/etc:
  init.d/  opentsdb/
rpmbuildroot/var/cache:
  opentsdb/

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Revert src/logback.xml
Add logback.xml from deb package to rpm directory
Move opentsdb_restart.py to tools directory
Create symlinks during RPM installation

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Kill trailing whitespaces.
Upgrade Guava to 16.0.1.
Upgrade Jackson to 2.1.5.
Upgrade to Netty 3.9.0 and stop using newly deprecated Netty APIs.
Upgrade SLF4J to 1.7.7.
Upgrade to GWT 2.6.0.
Create %{_datarootdir}/opentsdb/plugins in rpm.

The folder %{_datarootdir}/opentsdb/plugins is required for opentsdb to
start and should be created by the rpm when installing.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix CLIQuery usage command for downsampling per #314

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Change short to int in Span.java to fix precision loss and support larger
sets

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update Thanks and News for RC3

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix incorrect downsampling unit
The bug incorrectly assumed the downsampling unit was second while computing
start and end time of HBase scan.
- Fixed the math.
- Suffixed the field name with _ms.
- Added unit tests to address the bug.
  * downsample and downsampleMilliseconds.
- Added a nested helper class for unit tests to access private methods.
- Factored out the unit tests related to downsampling from the huge
  TestTsdbQuery.java. It was too big for Eclipse to run.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Merge remote-tracking branch 'remotes/origin/next' into next_ws