mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-25 02:00:38 -06:00
Pulsar JMS driver type name change and package name typo fix
This commit is contained in:
parent
f75ccc1b09
commit
136c920e24
@ -8,7 +8,7 @@
|
||||
<relativePath>../mvn-defaults</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>driver-pulsar-jms</artifactId>
|
||||
<artifactId>driver-pulsarjms</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
@ -31,26 +31,9 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<properties>
|
||||
<pulsar.version>2.7.1</pulsar.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- core dependencies -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.pulsar</groupId>
|
||||
<artifactId>pulsar-client</artifactId>
|
||||
<version>${pulsar.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.pulsar</groupId>
|
||||
<artifactId>pulsar-client-admin</artifactId>
|
||||
<version>${pulsar.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>engine-api</artifactId>
|
||||
@ -63,27 +46,6 @@
|
||||
<version>4.15.45-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-configuration2 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.avro/avro -->
|
||||
<dependency>
|
||||
<groupId>org.apache.avro</groupId>
|
||||
<artifactId>avro</artifactId>
|
||||
<version>1.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@ -91,14 +53,12 @@
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<artifactId>pulsar-jms</artifactId>
|
||||
<groupId>com.datastax.oss</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -1,12 +1,9 @@
|
||||
package io.nosqlbench.driver.pularjms;
|
||||
package io.nosqlbench.driver.pulsarjms;
|
||||
|
||||
import com.codahale.metrics.Timer;
|
||||
import io.nosqlbench.driver.pularjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.driver.pulsarjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.engine.api.activityapi.core.SyncAction;
|
||||
import io.nosqlbench.engine.api.activityapi.errorhandling.modular.ErrorDetail;
|
||||
import io.nosqlbench.engine.api.activityapi.planning.OpSequence;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.activityimpl.OpDispenser;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package io.nosqlbench.driver.pularjms;
|
||||
package io.nosqlbench.driver.pulsarjms;
|
||||
|
||||
import com.codahale.metrics.Counter;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import com.codahale.metrics.Timer;
|
||||
import com.datastax.oss.pulsar.jms.PulsarConnectionFactory;
|
||||
import io.nosqlbench.driver.pularjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.driver.pularjms.util.PulsarJmsActivityUtil;
|
||||
import io.nosqlbench.driver.pulsarjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.driver.pulsarjms.util.PulsarJmsActivityUtil;
|
||||
import io.nosqlbench.engine.api.activityapi.errorhandling.modular.NBErrorHandler;
|
||||
import io.nosqlbench.engine.api.activityapi.planning.OpSequence;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
@ -83,8 +83,6 @@ public class PulsarJmsActivity extends SimpleActivity {
|
||||
|
||||
/**
|
||||
* If the JMS destination that corresponds to a topic exists, reuse it; Otherwise, create it
|
||||
*
|
||||
* @param pulsarTopic
|
||||
*/
|
||||
public Destination getOrCreateJmsDestination(String pulsarTopic) {
|
||||
String encodedTopicStr = PulsarJmsActivityUtil.encode(pulsarTopic);
|
||||
@ -131,6 +129,6 @@ public class PulsarJmsActivity extends SimpleActivity {
|
||||
}
|
||||
}
|
||||
public void asyncOperationFailed(Throwable ex) {
|
||||
this.asyncOperationFailure = asyncOperationFailure;
|
||||
this.asyncOperationFailure = ex;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.driver.pularjms;
|
||||
package io.nosqlbench.driver.pulsarjms;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.Action;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
|
||||
@ -6,7 +6,7 @@ import io.nosqlbench.engine.api.activityapi.core.ActivityType;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = ActivityType.class, selector = "pulsar_jms")
|
||||
@Service(value = ActivityType.class, selector = "pulsarjms")
|
||||
public class PulsarJmsActivityType implements ActivityType<PulsarJmsActivity> {
|
||||
@Override
|
||||
public ActionDispenser getActionDispenser(PulsarJmsActivity activity) {
|
@ -1,9 +1,8 @@
|
||||
package io.nosqlbench.driver.pularjms;
|
||||
package io.nosqlbench.driver.pulsarjms;
|
||||
|
||||
import com.datastax.oss.pulsar.jms.PulsarConnectionFactory;
|
||||
import io.nosqlbench.driver.pularjms.ops.PulsarJmsMsgSendMapper;
|
||||
import io.nosqlbench.driver.pularjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.driver.pularjms.util.PulsarJmsActivityUtil;
|
||||
import io.nosqlbench.driver.pulsarjms.ops.PulsarJmsMsgSendMapper;
|
||||
import io.nosqlbench.driver.pulsarjms.ops.PulsarJmsOp;
|
||||
import io.nosqlbench.driver.pulsarjms.util.PulsarJmsActivityUtil;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.engine.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.engine.api.templating.CommandTemplate;
|
||||
@ -61,7 +60,7 @@ public class ReadyPulsarJmsOp implements OpDispenser<PulsarJmsOp> {
|
||||
}
|
||||
|
||||
// Global: JMS destinaion
|
||||
LongFunction<Destination> jmsDestinationFunc = (l) -> null;
|
||||
LongFunction<Destination> jmsDestinationFunc;
|
||||
try {
|
||||
LongFunction<String> finalTopicUriFunc = topicUriFunc;
|
||||
jmsDestinationFunc = (l) -> pulsarJmsActivity.getOrCreateJmsDestination(finalTopicUriFunc.apply(l));
|
@ -1,10 +1,8 @@
|
||||
package io.nosqlbench.driver.pularjms.ops;
|
||||
package io.nosqlbench.driver.pulsarjms.ops;
|
||||
|
||||
import io.nosqlbench.driver.pularjms.PulsarJmsActivity;
|
||||
import io.nosqlbench.engine.api.templating.CommandTemplate;
|
||||
import io.nosqlbench.driver.pulsarjms.PulsarJmsActivity;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSContext;
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
/**
|
@ -1,8 +1,8 @@
|
||||
package io.nosqlbench.driver.pularjms.ops;
|
||||
package io.nosqlbench.driver.pulsarjms.ops;
|
||||
|
||||
import com.codahale.metrics.Counter;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import io.nosqlbench.driver.pularjms.PulsarJmsActivity;
|
||||
import io.nosqlbench.driver.pulsarjms.PulsarJmsActivity;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.driver.pularjms.ops;
|
||||
package io.nosqlbench.driver.pulsarjms.ops;
|
||||
|
||||
/**
|
||||
* Base type of all Pulsar Operations including Producers and Consumers.
|
||||
@ -8,7 +8,6 @@ public interface PulsarJmsOp {
|
||||
/**
|
||||
* Execute the operation, invoke the timeTracker when the operation ended.
|
||||
* The timeTracker can be invoked in a separate thread, it is only used for metrics.
|
||||
* @param timeTracker
|
||||
*/
|
||||
void run(Runnable timeTracker);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.driver.pularjms.ops;
|
||||
package io.nosqlbench.driver.pulsarjms.ops;
|
||||
|
||||
import io.nosqlbench.driver.pularjms.PulsarJmsActivity;
|
||||
import io.nosqlbench.driver.pulsarjms.PulsarJmsActivity;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import java.util.function.LongFunction;
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.driver.pularjms.ops;
|
||||
package io.nosqlbench.driver.pulsarjms.ops;
|
||||
|
||||
/**
|
||||
* Base type of all Sync Pulsar Operations including Producers and Consumers.
|
@ -1,23 +1,11 @@
|
||||
package io.nosqlbench.driver.pularjms.util;
|
||||
package io.nosqlbench.driver.pulsarjms.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.pulsar.client.api.Schema;
|
||||
import org.apache.pulsar.client.impl.schema.generic.GenericAvroSchema;
|
||||
import org.apache.pulsar.common.schema.SchemaInfo;
|
||||
import org.apache.pulsar.common.schema.SchemaType;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class PulsarJmsActivityUtil {
|
||||
|
Loading…
Reference in New Issue
Block a user