Since systemd unit can override parameters using drop-in unit, we don't need
mustache template for them.
Also, drop --disttype option on install.sh since it does not required anymore,
introduce --sysconfdir instead for non-redhat distributions.
Move package build script from .rpm/.deb to single script, install.sh.
We need this to support nonroot mode, and also to keep package build script
consistent between .rpm/.deb.
"Fixes #76
Implements JMX level call for "sstable_info" REST api command.
Requires seastar patch:
json: Make date formatter use RFC8601/RFC3339 format
Requires scylla patch set "Implement sstable_info API command (info on sstables)"
Forwards call to REST sstable_info and packs the data
into CompositeData for JMX consumption."
* 'sstabledesc' of git://github.com/elcallio/scylla-jmx:
storage_service: Add "getSSTableInfo" command/attribute
service: Add objects for deserializing sstable_info json
scylla-apiclient: Add Date json serializer helper
APIClient: Add jackson JSON serializer support to client object
apiclient/pom.xml: Add jackson JSON support libs for REST client
Fixes#76
Requires seastar patch:
json: Make date formatter use RFC8601/RFC3339 format
Requires scylla patch set "Sstabledesc"
Forwards call to REST sstable_info and packs the data
into CompositeData for JMX consumption.
The PendingTasksByTableName metric should use the pending_tasks_by_table
API to get the real value of the pending compaction.
Fixes#74
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Cassandra 3.0 version of the JMX added a parameter that allows accepting
the parameter as hex.
This breaks the current implementation with a NoSuchMethodException.
This patch adds the missing implementation.
For a full support, a follow up patch in Scylla is needed, but for the
current functionality it would work.
After this patch usage example:
nodetool getsstables keyspace1 standard1 39303138374b4d343830
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
There's an effort to implement a version of "nodetool" that uses
Scylla's REST API directly, Let's make the API client a separate module,
so nodetool can use it.
* 'scylla-apiclient' of https://github.com/tarzanek/scylla-jmx:
fix README for building instructions
trigger build from parent maven to have the local repo properly set up
cleanup commented implicit steps in mvn
make scylla-apiclient a separate module so the jar can be reused
When calling nodetool toppartitions with size limit, finishLocalSampling
should respect that and limit the number of the results.
Example:
$ nodetool toppartitions -k 2 keyspace1 standard1 20
WRITES Sampler:
Cardinality: ~2 (256 capacity)
Top 2 partitions:
Partition Count +/-
38333032394d4f4d5030 4 3
4e353937383137503330 4 3
READS Sampler:
Cardinality: ~2 (256 capacity)
Top 2 partitions:
Nothing recorded during sampling period...
Fixes#66
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
delete commands do not return a value, still, it is possible that the
command will return a value different than OK.
In such a case, the error should be propagate to the caller via an
exception.
Fixes#65
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190618135312.2776-1-amnon@scylladb.com>
Since we cannot use dh --with=systemd because we don't want to
automatically enabling systemd units, manage them by our setup scripts,
we have to do 'systemctl daemon-reload' manually.
(On dh --with=systemd, systemd helper automatically provides such
scirpts)
See scylladb/scylla-enterprise#825
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190618000414.29142-1-syuu@scylladb.com>
Since scylla-jmx uses /usr/lib/scylla/jmx for program directory, we also
need to move them under /opt/scylladb.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190618122451.27721-1-syuu@scylladb.com>
When we add product name customization, we mistakenly defined the
parameter on each package build script.
Number of script is increasing since we recently added relocatable
python3 package, we should merge it in single place.
Also we should save the parameter on relocatable package, just like
version-release parameters.
So move the definition to SCYLLA-VERSION-GEN, save it to
build/SCYLLA-PRODUCT-FILE then archive it to relocatable package.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190422105304.23454-1-syuu@scylladb.com>
This patch adds the implementation for begin and finish local sampling
of a column family.
There is a difference in the implementation of Cassandra API and Scylla.
In Cassandra and the JMX an external source start and stop the sampling.
In Scylla, a single API call start the sampling and return with the
result. In Scylla the API call always return sampling of the read and of
the writes.
To bridge the difference, the begin sampling command will use a Future
when calling the API. The finish method will wait for the future to end.
Because of the different implementation, it is possible that two
consecutive calls will be made to start sampling one for the read and
one for the write, similarly, two calls will be made to finish for read
and write.
The implementation would ignore the second call to start and will
store the result, so the second call to finish will be served from the
stored result.
Note, that the use of future is only for safety, the way we expect it to
work, the caller to the begin sampling will sleep anyhow while waiting
for the result.
To avoid breaking the MBean compatibility we piggyback the duration on
top of the sampler string.
If no duration is given, a default duration will be taken, this is also
just as a precaution, we will modify the nodetool implementation to
pass that information.
There is a known issue with cardinality, that will need to be addressed.
Also we return a value in the raw column to match what Cassandra JMX
returns, but it's a duplication of the partition key.
See scylladb/scylla#2811
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190128143505.5241-1-amnon@scylladb.com>
On some Fedora environment dh build tries to run
dh_strip_nondeterminism, and fails sice Fedora does not provide such
command.
To prevent the build error we need to skip it.
Fixes#62
See 5bf9a03d65
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190125223351.20381-1-syuu@scylladb.com>
Current scylla.spec fails build on Fedora 27, since python2-pystache is
new package name that renamed on Fedora 28.
But Fedora 28's python2-pystache has tag "Provides: pystache",
so we can depends on old package name, this way we can build scylla.spec both
on Fedora 27/28.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20181028175757.32224-1-syuu@scylladb.com>
- we don't use mock anymore, so drop mock directory
- build_rpm.sh usage need to update
- build_rpm.sh should install rpmbuild
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20181024222136.3332-2-syuu@scylladb.com>
- we don't use pbuilder anymore, so drop pbuilderrc
- on build_deb.sh is_debian / is_ubuntu functions are unused now, drop them
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20181024222136.3332-1-syuu@scylladb.com>
"
This patchset adds relocatable package support for scylla-jmx, and also
support generating .rpm/.deb from relocatable package.
- Scripts are based on relocatable .rpm/.deb support patchset for main repo
(not merged https://github.com/syuu1228/scylla/tree/reloc_rpmdeb_v4)
- Single .rpm package provided for CentOS7/Fedora(unofficial)
- Single .deb package provided for Ubuntu 14/16/18, Debian 8/9
"
* 'reloc_v1' of https://github.com/syuu1228/scylla-jmx:
dist/debian: use relocatable package to produce .deb
dist/redhat: use relocatable package to produce .rpm
reloc: add support relocatable package
To align build system with scylla main repo, adding relocatable package
support.
On scylla-jmx, we don't provide libraries and linker since it's Java
program, just contains .jar file and dist/ directory.
Fixes#57
The usage of TableMetricsObjectName-yada-yada relies on translating the
"fake" objectname to a canonical one on remote
publication/serialization. However, the implementation of
ObjectName.getInstance has changed in JDK (micro) updates so it no
longer applies overridable methods -> wrong name published.
Fix by doing explicit ObjectName instansiation.
Message-Id: <20181023132005.23099-1-calle@scylladb.com>
We found on some Debian environment Ubuntu .deb build fails with
gpg error because lack of Ubuntu GPG key, so we need to install it before
start pbuilder.
Same as on Ubuntu, it needs to install Debian GPG key.
See scylladb/scylla#3823
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20181008110724.18335-1-syuu@scylladb.com>
To automatically rename packages on enterprise release, added package name
prefix as a variable on build_deb.sh.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180828010445.11920-2-syuu@scylladb.com>
To automatically rename packages on enterprise release, added package name
prefix as a variable on build_rpm.sh.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180822072105.9420-2-syuu@scylladb.com>
Almost 100% null implementations, which is ok for most purposes
currently used by scylla. Some of these new calls (like dropped
mutations etc) should perhaps however be implemented.
Tested with the nodetool dtests. So sparsely.
Needed when/if scylla-tools-java is upgraded to origin 3.11,
otherwise noodtool breaks.
Message-Id: <20180730113741.14952-1-calle@scylladb.com>
mock outputs files owned by root. This causes attempts
by scripts that want to junk the working directory (typically
continuous integration) to fail on permission errors.
Fixup those permissions after the fact.
Message-Id: <20180719163258.4393-1-avi@scylladb.com>
Use is_debian()/is_ubuntu() to detect target distribution, also install
pystache by path since package name is different between Fedora and
CentOS.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180703183211.3455-1-syuu@scylladb.com>
Currently we are using *.in files for templates, applying parameters by sed
command one-by-one.
This patch will replace them by Mustache, it's simple and easy syntax template
language.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180606183113.25275-1-syuu@scylladb.com>
On Ubuntu 18.04 build fails by java.security.InvalidAlgorithmParameterException,
while downloading .pom file from HTTPS URL.
Looks like it's ca-certs problem, can fix by running update-ca-certificates.
Fixed#52
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180601092954.28319-1-syuu@scylladb.com>
Before we were discarding the initial repository while
overriding it with TableRepository. This was a mistake that
caused dtests to fail. Proper solution is to keep the initial
repository inside TableRepository. That way whatever was registered
at the time of JmxMBeanServer creation is still handled properly.
Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com>
Message-Id: <22181859012fd20ddf37e049a145bc94a3a91a33.1527844328.git.piotr@scylladb.com>
"
Use more memory efficient MBeans repository and remove quadratic behaviour on startup.
This reduces memory usage for 2000 tables from 127M to 82M and reduces start time
from 270 seconds to 2 seconds.
Changes since last version:
1. Fix registered map to handle multiple JMX servers and to properly deregister mbeans
2. Clean up TableRepository code.
"
* 'speedup_2' of https://github.com/haaawk/scylla-jmx:
Use more efficient MBeans repository
Remove unnecessary quadratic algorithm from MetricsMBean.register