Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve] Upgrade bk to 4.16.0 for test v1 #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions distribution/server/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,35 +343,37 @@ The Apache Software License, Version 2.0
- org.apache.logging.log4j-log4j-slf4j-impl-2.18.0.jar
- org.apache.logging.log4j-log4j-web-2.18.0.jar
* Java Native Access JNA
- net.java.dev.jna-jna-5.12.1.jar
- net.java.dev.jna-jna-jpms-5.12.1.jar
- net.java.dev.jna-jna-platform-jpms-5.12.1.jar
* BookKeeper
- org.apache.bookkeeper-bookkeeper-common-4.15.4.jar
- org.apache.bookkeeper-bookkeeper-common-allocator-4.15.4.jar
- org.apache.bookkeeper-bookkeeper-proto-4.15.4.jar
- org.apache.bookkeeper-bookkeeper-server-4.15.4.jar
- org.apache.bookkeeper-bookkeeper-tools-framework-4.15.4.jar
- org.apache.bookkeeper-circe-checksum-4.15.4.jar
- org.apache.bookkeeper-cpu-affinity-4.15.4.jar
- org.apache.bookkeeper-statelib-4.15.4.jar
- org.apache.bookkeeper-stream-storage-api-4.15.4.jar
- org.apache.bookkeeper-stream-storage-common-4.15.4.jar
- org.apache.bookkeeper-stream-storage-java-client-4.15.4.jar
- org.apache.bookkeeper-stream-storage-java-client-base-4.15.4.jar
- org.apache.bookkeeper-stream-storage-proto-4.15.4.jar
- org.apache.bookkeeper-stream-storage-server-4.15.4.jar
- org.apache.bookkeeper-stream-storage-service-api-4.15.4.jar
- org.apache.bookkeeper-stream-storage-service-impl-4.15.4.jar
- org.apache.bookkeeper.http-http-server-4.15.4.jar
- org.apache.bookkeeper.http-vertx-http-server-4.15.4.jar
- org.apache.bookkeeper.stats-bookkeeper-stats-api-4.15.4.jar
- org.apache.bookkeeper.stats-prometheus-metrics-provider-4.15.4.jar
- org.apache.distributedlog-distributedlog-common-4.15.4.jar
- org.apache.distributedlog-distributedlog-core-4.15.4-tests.jar
- org.apache.distributedlog-distributedlog-core-4.15.4.jar
- org.apache.distributedlog-distributedlog-protocol-4.15.4.jar
- org.apache.bookkeeper.stats-codahale-metrics-provider-4.15.4.jar
- org.apache.bookkeeper-bookkeeper-common-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-common-allocator-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-proto-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-server-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-tools-framework-4.16.0.jar
- org.apache.bookkeeper-circe-checksum-4.16.0.jar
- org.apache.bookkeeper-cpu-affinity-4.16.0.jar
- org.apache.bookkeeper-statelib-4.16.0.jar
- org.apache.bookkeeper-stream-storage-api-4.16.0.jar
- org.apache.bookkeeper-stream-storage-common-4.16.0.jar
- org.apache.bookkeeper-stream-storage-java-client-4.16.0.jar
- org.apache.bookkeeper-stream-storage-java-client-base-4.16.0.jar
- org.apache.bookkeeper-stream-storage-proto-4.16.0.jar
- org.apache.bookkeeper-stream-storage-server-4.16.0.jar
- org.apache.bookkeeper-stream-storage-service-api-4.16.0.jar
- org.apache.bookkeeper-stream-storage-service-impl-4.16.0.jar
- org.apache.bookkeeper.http-http-server-4.16.0.jar
- org.apache.bookkeeper.http-vertx-http-server-4.16.0.jar
- org.apache.bookkeeper.stats-bookkeeper-stats-api-4.16.0.jar
- org.apache.bookkeeper.stats-prometheus-metrics-provider-4.16.0.jar
- org.apache.distributedlog-distributedlog-common-4.16.0.jar
- org.apache.distributedlog-distributedlog-core-4.16.0-tests.jar
- org.apache.distributedlog-distributedlog-core-4.16.0.jar
- org.apache.distributedlog-distributedlog-protocol-4.16.0.jar
- org.apache.bookkeeper.stats-codahale-metrics-provider-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-slogger-api-4.16.0.jar
- org.apache.bookkeeper-bookkeeper-slogger-slf4j-4.16.0.jar
- org.apache.bookkeeper-native-io-4.16.0.jar
* Apache HTTP Client
- org.apache.httpcomponents-httpclient-4.5.13.jar
- org.apache.httpcomponents-httpcore-4.4.15.jar
Expand Down
6 changes: 3 additions & 3 deletions distribution/shell/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ The Apache Software License, Version 2.0
- log4j-web-2.18.0.jar

* BookKeeper
- bookkeeper-common-allocator-4.15.4.jar
- cpu-affinity-4.15.4.jar
- circe-checksum-4.15.4.jar
- bookkeeper-common-allocator-4.16.0.jar
- cpu-affinity-4.16.0.jar
- circe-checksum-4.16.0.jar
* AirCompressor
- aircompressor-0.20.jar
* AsyncHttpClient
Expand Down
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ flexible messaging model and an intuitive client API.</description>
<!-- apache commons -->
<commons-compress.version>1.21</commons-compress.version>

<bookkeeper.version>4.15.4</bookkeeper.version>
<bookkeeper.version>4.16.0</bookkeeper.version>
<zookeeper.version>3.8.1</zookeeper.version>
<commons-cli.version>1.5.0</commons-cli.version>
<commons-text.version>1.10.0</commons-text.version>
Expand Down Expand Up @@ -2455,5 +2455,13 @@ flexible messaging model and an intuitive client API.</description>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>bk-staging</id>
<name>bk-staging</name>
<url>https://repository.apache.org/content/repositories/orgapachebookkeeper-1082/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.pulsar.broker.stats.prometheus.metrics;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.LongAdder;
import org.apache.bookkeeper.stats.Counter;

Expand Down Expand Up @@ -50,10 +51,16 @@ public void dec() {
}

@Override
public void add(long delta) {
public void addCount(long delta) {
counter.add(delta);
}

@Override
public void addLatency(long eventLatency, TimeUnit unit) {
long valueMillis = unit.toMillis(eventLatency);
counter.add(valueMillis);
}

@Override
public Long get() {
return counter.sum();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import io.netty.util.concurrent.DefaultThreadFactory;

import org.apache.bookkeeper.common.util.OrderedExecutor;
import org.apache.bookkeeper.common.util.SafeRunnable;
import org.apache.bookkeeper.stats.NullStatsLogger;

public class SameThreadOrderedSafeExecutor extends OrderedExecutor {
Expand All @@ -46,12 +45,12 @@ public void execute(Runnable r) {
}

@Override
public void executeOrdered(int orderingKey, SafeRunnable r) {
public void executeOrdered(int orderingKey, Runnable r) {
r.run();
}

@Override
public void executeOrdered(long orderingKey, SafeRunnable r) {
public void executeOrdered(long orderingKey, Runnable r) {
r.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,24 +1204,7 @@ public void testManagedLedgerBookieClientStats() throws Exception {
System.out.println(e.getKey() + ": " + e.getValue())
);

List<Metric> cm = (List<Metric>) metrics.get(keyNameBySubstrings(metrics,
"pulsar_managedLedger_client", "bookkeeper_ml_scheduler_completed_tasks"));
assertEquals(cm.size(), 1);
assertEquals(cm.get(0).tags.get("cluster"), "test");

cm = (List<Metric>) metrics.get(
keyNameBySubstrings(metrics,
"pulsar_managedLedger_client", "bookkeeper_ml_scheduler_queue"));
assertEquals(cm.size(), 1);
assertEquals(cm.get(0).tags.get("cluster"), "test");

cm = (List<Metric>) metrics.get(
keyNameBySubstrings(metrics,
"pulsar_managedLedger_client", "bookkeeper_ml_scheduler_total_tasks"));
assertEquals(cm.size(), 1);
assertEquals(cm.get(0).tags.get("cluster"), "test");

cm = (List<Metric>) metrics.get(
List<Metric> cm = (List<Metric>) metrics.get(
keyNameBySubstrings(metrics,
"pulsar_managedLedger_client", "bookkeeper_ml_scheduler_threads"));
assertEquals(cm.size(), 1);
Expand Down
29 changes: 17 additions & 12 deletions pulsar-sql/presto-distribution/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -424,18 +424,21 @@ The Apache Software License, Version 2.0
- async-http-client-2.12.1.jar
- async-http-client-netty-utils-2.12.1.jar
* Apache Bookkeeper
- bookkeeper-common-4.15.4.jar
- bookkeeper-common-allocator-4.15.4.jar
- bookkeeper-proto-4.15.4.jar
- bookkeeper-server-4.15.4.jar
- bookkeeper-stats-api-4.15.4.jar
- bookkeeper-tools-framework-4.15.4.jar
- circe-checksum-4.15.4.jar
- codahale-metrics-provider-4.15.4.jar
- cpu-affinity-4.15.4.jar
- http-server-4.15.4.jar
- prometheus-metrics-provider-4.15.4.jar
- codahale-metrics-provider-4.15.4.jar
- bookkeeper-common-4.16.0.jar
- bookkeeper-common-allocator-4.16.0.jar
- bookkeeper-proto-4.16.0.jar
- bookkeeper-server-4.16.0.jar
- bookkeeper-stats-api-4.16.0.jar
- bookkeeper-tools-framework-4.16.0.jar
- circe-checksum-4.16.0.jar
- codahale-metrics-provider-4.16.0.jar
- cpu-affinity-4.16.0.jar
- http-server-4.16.0.jar
- prometheus-metrics-provider-4.16.0.jar
- codahale-metrics-provider-4.16.0.jar
- bookkeeper-slogger-api-4.16.0.jar
- bookkeeper-slogger-slf4j-4.16.0.jar
- native-io-4.16.0.jar
* Apache Commons
- commons-cli-1.5.0.jar
- commons-codec-1.15.jar
Expand Down Expand Up @@ -476,6 +479,8 @@ The Apache Software License, Version 2.0
- amqp-client-5.5.3.jar
* Stream Lib
- stream-2.9.5.jar
* High Performance Primitive Collections for Java
- hppc-0.9.1.jar


Protocol Buffers License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void end_ENTRY_QUEUE_DEQUEUE_WAIT_TIME() {
public void register_BYTES_READ(long bytes) {
if (statsLogger != null) {
bytesReadSum += bytes;
statsLoggerBytesRead.add(bytes);
statsLoggerBytesRead.addCount(bytes);
}
}

Expand Down Expand Up @@ -220,7 +220,7 @@ public void end_MESSAGE_QUEUE_ENQUEUE_WAIT_TIME() {
public void incr_NUM_MESSAGES_DESERIALIZED_PER_ENTRY() {
if (statsLogger != null) {
numMessagedDerserializedPerBatch++;
statsLoggerNumMessagesDeserialized.add(1);
statsLoggerNumMessagesDeserialized.addCount(1);
}
}

Expand Down Expand Up @@ -295,7 +295,7 @@ public void end_RECORD_DESERIALIZE_TIME() {

public void incr_NUM_RECORD_DESERIALIZED() {
if (statsLogger != null) {
statsLoggerNumRecordDeserialized.add(1);
statsLoggerNumRecordDeserialized.addCount(1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ public void dec() {
}

@Override
public void add(long delta) {
public void addCount(long delta) {
updateMax(val.addAndGet(delta));
}

@Override
public void addLatency(long eventLatency, TimeUnit unit) {
long valueMillis = unit.toMillis(eventLatency);
updateMax(val.addAndGet(valueMillis));
}

@Override
public Long get() {
return val.get();
Expand Down