mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Address Lari's comment in PR#364.
This commit is contained in:
parent
eb5f42f46d
commit
265760d184
@ -12,7 +12,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.pulsar.client.admin.PulsarAdmin;
|
import org.apache.pulsar.client.admin.PulsarAdmin;
|
||||||
import org.apache.pulsar.client.admin.PulsarAdminException;
|
|
||||||
import org.apache.pulsar.client.api.Producer;
|
import org.apache.pulsar.client.api.Producer;
|
||||||
import org.apache.pulsar.client.api.Consumer;
|
import org.apache.pulsar.client.api.Consumer;
|
||||||
import org.apache.pulsar.client.api.Reader;
|
import org.apache.pulsar.client.api.Reader;
|
||||||
@ -459,7 +458,8 @@ public class ReadyPulsarOp implements OpDispenser<PulsarOp> {
|
|||||||
// - default to broker level deduplication setting
|
// - default to broker level deduplication setting
|
||||||
boolean nsMsgDedup = brokerMsgDupFunc.apply(l);
|
boolean nsMsgDedup = brokerMsgDupFunc.apply(l);
|
||||||
try {
|
try {
|
||||||
nsMsgDedup = pulsarAdmin.namespaces().getDeduplicationStatus(namespace);
|
Boolean dedupStatus = pulsarAdmin.namespaces().getDeduplicationStatus(namespace);
|
||||||
|
if (dedupStatus != null) nsMsgDedup = dedupStatus;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
// it is fine if we're unable to check namespace level setting; use default
|
// it is fine if we're unable to check namespace level setting; use default
|
||||||
@ -469,7 +469,8 @@ public class ReadyPulsarOp implements OpDispenser<PulsarOp> {
|
|||||||
// - default to namespace level deduplication setting
|
// - default to namespace level deduplication setting
|
||||||
boolean topicMsgDedup = nsMsgDedup;
|
boolean topicMsgDedup = nsMsgDedup;
|
||||||
try {
|
try {
|
||||||
topicMsgDedup = pulsarAdmin.topics().getDeduplicationStatus(topic);
|
Boolean dedupStatus = pulsarAdmin.topics().getDeduplicationStatus(namespace);
|
||||||
|
if (dedupStatus != null) topicMsgDedup = dedupStatus;
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
// it is fine if we're unable to check topic level setting; use default
|
// it is fine if we're unable to check topic level setting; use default
|
||||||
|
Loading…
Reference in New Issue
Block a user