Elffuss BraidHub

kikocis/java-driver public

JAVA-1233: Update HdrHistogram to 2.1.9.

Also adds a test to validate that it can be used in an OSGI environment.
Changesetb6014e61df4c799ce7f06c7e623d1bc5c56185b76ec12843f3043d5cf5659d42
Authorolim7t <omichallat+github@gmail.com> · 2016-06-29 10:52 -07:00
Committerolim7t <omichallat+github@gmail.com> · 2016-07-14 15:50 -07:00
Parentsbbd5e272a157

Browse the files at this changeset

5 files changed

modified changelog/README.md +1 −1
@@ -4,7 +4,7 @@
44
55 - [new feature] JAVA-1153: Add PER PARTITION LIMIT to Select QueryBuilder.
66 - [improvement] JAVA-743: Add JSON support to QueryBuilder.
7-
7+- [improvement] JAVA-1233: Update HdrHistogram to 2.1.9.
88
99 Merged from 3.0.x branch:
1010
modified driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +13 −0
@@ -63,6 +63,19 @@
6363 };
6464 }
6565
66+ public static CompositeOption hdrHistogramBundle() {
67+ return new CompositeOption() {
68+
69+ @Override
70+ public Option[] getOptions() {
71+ return options(
72+ systemProperty("cassandra.usePercentileSpeculativeExecutionPolicy").value("true"),
73+ mavenBundle("org.hdrhistogram", "HdrHistogram", "2.1.9")
74+ );
75+ }
76+ };
77+ }
78+
6679 public static CompositeOption nettyBundles() {
6780 final String nettyVersion = "4.0.33.Final";
6881 return new CompositeOption() {
added driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceHdrHistogramIT.java +58 −0
@@ -0,0 +1,58 @@
1+/*
2+ * Copyright (C) 2012-2015 DataStax Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+package com.datastax.driver.osgi;
17+
18+import com.datastax.driver.osgi.api.MailboxException;
19+import org.ops4j.pax.exam.Configuration;
20+import org.ops4j.pax.exam.Option;
21+import org.ops4j.pax.exam.testng.listener.PaxExam;
22+import org.testng.annotations.Listeners;
23+import org.testng.annotations.Test;
24+
25+import static com.datastax.driver.osgi.BundleOptions.*;
26+import static org.ops4j.pax.exam.CoreOptions.options;
27+
28+@Listeners({CCMBridgeListener.class, PaxExam.class})
29+public class MailboxServiceHdrHistogramIT extends MailboxServiceTests {
30+
31+ @Configuration
32+ public Option[] hdrHistogramConfig() {
33+ return options(
34+ defaultOptions(),
35+ hdrHistogramBundle(),
36+ nettyBundles(),
37+ guavaBundle(),
38+ extrasBundle(),
39+ mappingBundle(),
40+ driverBundle(),
41+ mailboxBundle()
42+ );
43+ }
44+
45+ /**
46+ * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with
47+ * LZ4 compression activated.
48+ *
49+ * @test_category packaging
50+ * @expected_result Can create, retrieve and delete data using the mailbox service.
51+ * @jira_ticket JAVA-1200
52+ * @since 3.1.0
53+ */
54+ @Test(groups = "short")
55+ public void test_hdr() throws MailboxException {
56+ checkService();
57+ }
58+}
modified manual/speculative_execution/README.md +1 −1
@@ -117,7 +117,7 @@
117117 <dependency>
118118 <groupId>org.hdrhistogram</groupId>
119119 <artifactId>HdrHistogram</artifactId>
120- <version>2.1.4</version>
120+ <version>2.1.9</version>
121121 </dependency>
122122 ```
123123
modified pom.xml +1 −1
@@ -56,7 +56,7 @@
5656 <metrics.version>3.1.2</metrics.version>
5757 <snappy.version>1.0.5</snappy.version>
5858 <lz4.version>1.3.0</lz4.version>
59- <hdr.version>2.1.4</hdr.version>
59+ <hdr.version>2.1.9</hdr.version>
6060 <!-- driver-extras module -->
6161 <jackson.version>2.6.3</jackson.version>
6262 <joda.version>2.9.1</joda.version>