Commit Graph

385 Commits

Author SHA1 Message Date
Takuya ASADA
8c32e4f8a4 dist/debian: add more versions of Debian/Ubuntu releases
This will add Debian 9(stretch) support, and also non-official support of
Debian testing/unstable and Ubuntu non-LTS versions.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1500501275-8419-1-git-send-email-syuu@scylladb.com>
2017-07-20 10:32:44 +03:00
Takuya ASADA
9147faed36 dist/debian: append 'scylla-jmx' prefix to pbuilder tgz and directories
We want to allocate pbuilder chroot image and build directories for each
scylla repository to make sure build environment is always clean.

So append 'scylla-jmx' prefix for them.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497902645-29487-2-git-send-email-syuu@scylladb.com>
2017-07-20 10:32:24 +03:00
Takuya ASADA
2b33ce558d dist/debian: no need to rm -rf non-existent file
This line copied from scylla-tools-java, and conf/hotspot_compiler does not
exist on scylla-jmx, so drop the entry.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497902645-29487-1-git-send-email-syuu@scylladb.com>
2017-07-20 10:32:23 +03:00
Takuya ASADA
956eac3972 dist/debian: add 'sudo' for run yum on redhat variants
Since this script allows to run in non-root mode, sudo is required for yum.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497891211-26574-2-git-send-email-syuu@scylladb.com>
2017-06-19 20:01:06 +03:00
Takuya ASADA
2a74a394a4 dist/debian: drop unused code for old versioning scheme
Since development version specified as "666.development", this code won't called anymore, so drop it.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497891211-26574-1-git-send-email-syuu@scylladb.com>
2017-06-19 20:01:06 +03:00
Takuya ASADA
2ca07ac215 dist/debian: drop meaningless lines on build script
These lines comes from scylla-tools-java's build_deb.sh, but does nothing.
So drop them.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20170616035130.16580-1-syuu@scylladb.com>
2017-06-19 12:31:52 +03:00
Takuya ASADA
8d404d8e9f dist/debian: Use pbuilder for Ubuntu/Debian debs
Enable pbuilder for Ubuntu/Debian to prevent build enviroment dependent issues.
Also support cross building by pbuilder.
(cross-building from Fedora 25 and Ubuntu 16.04 are tested)

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20170615100230.18239-1-syuu@scylladb.com>
2017-06-15 13:51:59 +03:00
Calle Wilund
e954db8444 TableMetrics: bugfix: local metrics registry is a proxy. It must proxy
Refs scylladb/scylla#2340 (trunk/1.7)

Must proxy "register" call, otherwise unregistration of mbeans
will instead try to double-register. Code for this somehow fell away.

Message-Id: <1494417610-9720-1-git-send-email-calle@scylladb.com>
2017-05-28 14:02:32 +03:00
Takuya ASADA
fa72ea29d3 dist/redhat: Use mock for CentOS/RHEL rpms
Enable mock for CentOS/RHEL, also support cross building by mock.

See scylladb/scylla#630

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20170522081759.8574-1-syuu@scylladb.com>
2017-05-23 12:09:03 +03:00
Tomasz Grabiec
8176d5729f Bring back old forceKeyspaceCompaction() overload
nodetool from scylla-tools-java still uses it. Currently `nodetool compact` fails like this:

error: forceKeyspaceCompaction(java.lang.String, [Ljava.lang.String;)
-- StackTrace --
java.lang.NoSuchMethodException: forceKeyspaceCompaction(java.lang.String, [Ljava.lang.String;)

Fixes scylladb/scylla#2261

Probably broken by 3e146845b4

Message-Id: <1491470483-6147-1-git-send-email-tgrabiec@scylladb.com>
2017-04-06 12:59:52 +03:00
Amnon Heiman
0c541d73e7 MetricsRegistry: Solving empty histograms in nodetool
This patch fixes two issues with the histogram implementation:
* Need to all update before trying to read values from the histogram.
* The histogram values return from the API in microseconds and not nano.

See Scylladb/scylla#2155

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20170315130725.22261-1-amnon@scylladb.com>
2017-03-20 12:33:45 +02:00
Pekka Enberg
34c10fc91c README update
Fix the last remaining mention of "Urchin" and clean up the instructions on how to run it.
2017-03-03 12:35:00 +02:00
Amnon Heiman
9c11768b9d APIClient: Snapshot disk size should be long
When parsing the snapshot disk sizes, it should be long and not int.

See scylladb/scylla#2104

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1487760019-1354-1-git-send-email-amnon@scylladb.com>
2017-02-22 15:13:13 +02:00
Takuya ASADA
962a42dbd5 dist/debian: install ca-certificates-java/jessie-backports for Debian8
openjdk-8-jre-headless/jessie-backports requires
ca-certificates-java/jessie-backports, but apt doesn't override
ca-certificates-java/jessie by default.

So install it before installing openjdk-8.

Fixes #40

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1487269613-21196-1-git-send-email-syuu@scylladb.com>
2017-02-16 23:22:34 +02:00
Takuya ASADA
db711b4b53 dist/debian: install python for git-archive-all
Since git-archive-all is python script, we need to install python if it's
unavailable.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1487054303-11556-1-git-send-email-syuu@scylladb.com>
2017-02-14 09:08:52 +02:00
Takuya ASADA
7f63fabeee dist: rename dist/ubuntu to dist/debian
Now we supported both Ubuntu and Debian on dist/ubuntu, and Ubuntu is one of
Debian variant, so dist/debian is better naming.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1486547332-3247-1-git-send-email-syuu@scylladb.com>
2017-02-08 17:31:24 +02:00
Calle Wilund
2ae7ccf945 scylla-jmx: Fix RMI bind address when using local only connector
Message-Id: <1486382699-25556-1-git-send-email-calle@scylladb.com>
2017-02-06 14:15:43 +02:00
Calle Wilund
ac8743269c scylla-jmx: Allow ssl, auth etc options for JMX connector
Actually removes a bunch of code to manage the JMX connector,
since as of jdk8u102, the standard jmx connector answers to
property setting bind address -> can restrict access.
Note that the RMI connector will now (as is jdk normal)
_bind_ to 0.0.0.0, but it will not answer non-local requests
if "remote" is not enabled. This is the default jdk behaviour.

In any case, we rely on setting the appropriate properties
instead, and also allow pass-through of -D flags to java,
which in turn means those who wish can turn on both auth
and ssl, set key/trust stores etc etc.

Message-Id: <1485357178-20714-1-git-send-email-calle@scylladb.com>
2017-02-02 16:09:07 +02:00
Pekka Enberg
557b346c07 dist/redhat: Require Java 8
The build requires Java 8 since commit
9c2d6cec51 ("Remove yammer/codehale
dependencies and augumentations").

Message-Id: <1485437777-23626-1-git-send-email-penberg@scylladb.com>
2017-01-26 16:52:04 +02:00
Takuya ASADA
79b3f989fc dist/ubuntu: generate Ubuntu/Debian revision correctly
Ubuntu Packaging Guide says if there's no upstream package (means it's not
ported from Debian), revision should be "0ubuntu1", not "ubuntu1" which is we
currently using.

On Debian, Debian Policy Manual says it's conventional to restart revision from 1 when upstream version increased, so we should specify it to "1".

To do it in single script, we will generate the revision on building time.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483499161-22557-1-git-send-email-syuu@scylladb.com>
2017-01-09 09:46:21 +02:00
Takuya ASADA
ee0e460b26 dist/ubuntu: Fix package build error on Ubuntu 14.04/Debian 8
Since we moved to Java 8, we need to provide additional repository for
distributions which doesn't have Java 8 on default repository.

Fixes #37

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483377878-17987-1-git-send-email-syuu@scylladb.com>
2017-01-02 19:37:53 +02:00
Pekka Enberg
cc8f5e275b Merge "getTokenToEndpointMap should be sorted by the API" from Amnon
"This series change getTokenToEndpointMap implementation, so that the result
 will be sorted by the API.

 The API returns the tokens sorted according to their type. The APIClient helper
 method was change to keep the original order and getTokenToEndpointMap was
 change so it will return the map as is, without re-sorting it."
2016-12-30 14:14:48 +02:00
Takuya ASADA
7f936862d2 dist/ubuntu: check existance of build tools
It normally won't be problem because scylla-jmx usually build after scylla building.
However some tools we required for build_deb.sh doesn't installed on minimal installation, so we should check and install it.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483004036-2824-1-git-send-email-syuu@scylladb.com>
2016-12-30 10:25:32 +02:00
Takuya ASADA
db635738ad scripts: chmod a+rx git-archive-all to prevent building package
build_deb.sh fails to run because git-archive-all doesn't have execution bit,
to prevent build error we need to add the bit.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483002191-30263-1-git-send-email-syuu@scylladb.com>
2016-12-30 10:18:52 +02:00
Amnon Heiman
0c7afef8f4 Keep tokensEndPointMap sorted by the API order
This patch change the sorting of tokensEndpointMap so it will use the
order returned by the API.

See Scylladb/scylla#1945

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2016-12-28 12:48:03 +02:00
Amnon Heiman
b9328960cc APIClient: Keep the map order return from the API
The getMapStrValue return a map from the API. This change the
implementation to use linkedHashMap so the map will be sorted according
to the API order.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2016-12-28 12:45:33 +02:00
Calle Wilund
6f916b9d8e scylla-jmx: Add dummy "compactionId" to compation info
To keep nodetool happy. Should maybe add actual Ids to compations.
Message-Id: <1482335118-9595-2-git-send-email-calle@scylladb.com>
2016-12-22 14:17:38 +02:00
Calle Wilund
85c3293ef1 scylla-jmx: Missing getter in MBean interface.
It got lost somewhere.
Message-Id: <1482335118-9595-1-git-send-email-calle@scylladb.com>
2016-12-22 14:17:13 +02:00
Pekka Enberg
3838921ca3 Merge branch 'cassandra3' into next 2016-12-16 12:35:06 +02:00
Pekka Enberg
de20954fd6 Revert "APIMbeanServer: Show column family in jconsole"
This reverts commit b9986396bb.
2016-12-16 12:35:04 +02:00
Amnon Heiman
b9986396bb APIMbeanServer: Show column family in jconsole
The nodetool looks for column family with by their name. When using
JConsole, it search for all MBeans.

This patch adds a check for column family and stream with null query
(wild card).

This way the column family will appear in the JConsole.

Fixes #35

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1479227289-15031-1-git-send-email-amnon@scylladb.com>
2016-11-16 09:39:50 +02:00
Pekka Enberg
1931b4b24c Fix SCYLLA-VERSION-GEN permissions
Commit 434ce947b0 ("Code formatting + source
cleanup (eclipse)") changed permissions of SCYLLA-VERSION-GEN for no reason.
Fix them up.
2016-11-09 11:07:29 +02:00
Pekka Enberg
12ba9915a2 Merge "Cassandra 3.x compatibility" from Calle
"This is a pretty hefty change set. Base goal is to update JMX impl to
 Cassandra 3.x compatibility. While the base MBeans are easy enough, the
 metrics parts of the stew are trickier, since Cassandra 3 changed a
 number of things around.  To that end, and to clean up this code
 somewhat, this basically changes all about metrics management in
 scylla-jmx. Some background:

 Cassandra uses codehaul metrics for actual measurement. Now,
 obviously, in this proxy project we need not measure anything, since
 actual happenings are in the Scylla process. Previous version of the
 code however still utilized a (not-so-pretty reflection-hacked-into)
 version of codehaul metrics because they also provided the system for
 exposing the data through JMX. I.e. we added a bunch of stuff we
 really did not need, to avoid dealing with some of that we did.

 In Cassandra 3, v3 of codehaul is used, which the Cassandra devs
 apparently did not like the JMX integration of. Thus they decided to
 deal with JMX exposure themselves. which makes sense, because they
 want to control the syntax/structure. But given this, we no longer
 have any reason to utilize codehaul, since it does nothing for us.

 These change sets instead adapts the cassandra JMX bindings somewhat,
 and adds a wholly own structure of metric point binding, using
 java.util.function interfaces to provide flexible and late-ish binding
 to actual data query objects. End result is a much slimmer set of
 objects/functions to bind metrics (which of course are just queries to
 Scylla API).

 Also, MX4J has been dropped, since it is at best broken. Instead, we
 use simple wrapping of the system management server object to deal with
 dynamically populating transients objects like column families.

 Removed most statefulness (beyond binding) in MBean impls, all
 "bookeeping" of sub-objects and bind status now uses the actual mbean
 server. I.e. remove race conditions + lighter bookkeep.

 Since this is Java, and everything is tied together in a ball of yarn,
 most of the changes here are not self-contained. I.e. some of these
 will, applied individually, break the build. They are still kept as
 individual patches though, mainly for readability."
2016-11-09 11:03:53 +02:00
Pekka Enberg
b61a5b8439 Revert "Implement deprecated metrics in CommitLog and CompactionManager"
This reverts commit 9b63a35da6 in
preparation for Cassandra 3.x compatibility changes.
2016-11-09 11:03:31 +02:00
Pekka Enberg
c08442b158 Revert "Adding missing method implementation"
This reverts commit 8e5d649048 in
preparation for Cassandra 3.x compatibility changes.
2016-11-09 11:03:07 +02:00
Amnon Heiman
8e5d649048 Adding missing method implementation
This series fill some missing functionality by using already existing
API.

The idea is to use existing code in places that it was not used.

Also, in places were a stub value is in place, the methods returns a
stab value.
Message-Id: <1478619479-10023-1-git-send-email-amnon@scylladb.com>
2016-11-09 10:29:46 +02:00
Pekka Enberg
9b63a35da6 Implement deprecated metrics in CommitLog and CompactionManager
Implement some deprecated metrics in CommitLog and CompactionManager,
that can easily just be a wrapper to the non-deprecated metrics API.

Message-Id: <1478591291-30344-1-git-send-email-penberg@scylladb.com>
2016-11-08 10:59:41 +02:00
Calle Wilund
ae6a000807 ColumnFamilyStore: Remove compaction parameter API usage
Do manual mangling of in/out data in JMX instead. Saves on
controversy over more or less pointless API additions.
2016-11-01 09:44:17 +00:00
Pekka Enberg
954f40e550 Revert "scylla-jmx.service.in: Depend on scylla-server"
This reverts commit 4672cd360f.

Fixes #34
2016-10-31 14:02:22 +02:00
elcallio
434ce947b0 Code formatting + source cleanup (eclipse) 2016-10-24 11:43:52 +00:00
elcallio
9c2d6cec51 Remove yammer/codehale dependencies and augumentations 2016-10-24 11:43:52 +00:00
elcallio
824638594b Clean up and simplify Main startup 2016-10-24 11:43:52 +00:00
elcallio
1709ff2d02 API accessor
* Make config an instance object
* Add functional interfaces
* http options
* Remove dead code
* Clean up/format
2016-10-24 11:43:52 +00:00
elcallio
f4f3c44dc1 Rework StreamManager 2016-10-24 11:43:52 +00:00
Calle Wilund
4ed049739a Storage service: Fix 3.x style notifications (repair) 2016-10-24 11:43:51 +00:00
elcallio
4ec7d58249 Rework service.* beans 2016-10-24 11:43:51 +00:00
elcallio
fec8b44942 Rework MessagingService 2016-10-24 11:43:51 +00:00
Calle Wilund
3fe9cfc232 EndpointSnitchInfo: Fix getRack/DC host handling
I.e. our localhost might be (and probably is) different from scyllas
"fb::broadcast", and if not, try to get numerical asap.
2016-10-24 11:43:51 +00:00
elcallio
21a343d003 Rework EnpointSnitchInfo 2016-10-24 11:43:51 +00:00
elcallio
80762eb60a Rework gms beans 2016-10-24 11:43:51 +00:00