Skip to content

Commit 75f0094

Browse files
Fix SonarLint issues
1 parent a1210e7 commit 75f0094

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

pubsubplus-connector-spark_3.x/src/docs/sections/general/configuration/spark-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
| int
5656
| 0 - 60000
5757
| 3000
58-
| How much time in (MS) to wait between each attempt to connect or reconnect to a host. If a connect or reconnect attempt to host is not successful, the API waits for the amount of time set for reconnectRetryWaitInMillis, and then makes another connect or reconnect attempt.
58+
| How much time in (MS) to wait between each attempt to connect or reconnect to a host. If connect or reconnect attempt to host is not successful, the API waits for the amount of time set for reconnectRetryWaitInMillis, and then makes another connect or reconnect attempt.
5959

6060
| solace.apiProperties.<Property>
6161
| any

pubsubplus-connector-spark_3.x/src/main/java/com/solacecoe/connectors/spark/streaming/solace/SolaceBroker.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public class SolaceBroker implements Serializable {
2929
private boolean isAccessTokenSourceModified = true;
3030
private boolean isOAuth = false;
3131
private final Map<String, String> properties;
32-
private boolean initiateReplay = false; // required when multiple consumers bind to a queue.
3332
public SolaceBroker(Map<String, String> properties, boolean initiateReplay) {
3433
eventListeners = new CopyOnWriteArrayList<>();
3534
flowReceivers = new CopyOnWriteArrayList<>();
@@ -151,7 +150,6 @@ private void setReceiver(EventListener eventListener) {
151150

152151
flowProp.setEndpoint(listenQueue);
153152
if(replayStart != null) {
154-
this.initiateReplay = true;
155153
flowProp.setReplayStartLocation(replayStart);
156154
}
157155
flowProp.setAckMode(JCSMPProperties.SUPPORTED_MESSAGE_ACK_CLIENT);
@@ -166,7 +164,6 @@ private void setReceiver(EventListener eventListener) {
166164
log.info("SolaceSparkConnector - Consumer flow started to listen for messages on queue {} ", this.queue);
167165
flowReceivers.add(cons);
168166
} catch (Exception e) {
169-
this.initiateReplay = false;
170167
handleException("SolaceSparkConnector - Consumer received exception. Shutting down consumer ", e);
171168
}
172169
}

pubsubplus-connector-spark_3.x/src/test/java/com/solacecoe/connectors/spark/SolaceSparkStreamingMessageReplayIT.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.nio.file.Path;
2424
import java.nio.file.Paths;
2525
import java.sql.Timestamp;
26-
import java.text.Format;
2726
import java.text.SimpleDateFormat;
2827
import java.util.Date;
2928
import java.util.TimeZone;
@@ -34,7 +33,7 @@
3433
@Testcontainers
3534
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
3635
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
37-
public class SolaceSparkStreamingMessageReplayIT {
36+
class SolaceSparkStreamingMessageReplayIT {
3837
private SempV2Api sempV2Api = null;
3938
private SolaceContainer solaceContainer = new SolaceContainer("solace/solace-pubsub-standard:latest").withExposedPorts(8080, 55555);
4039
private SparkSession sparkSession;
@@ -111,7 +110,7 @@ public void handleErrorEx(Object o, JCSMPException e, long l) {
111110

112111
@Test
113112
@Order(1)
114-
public void Should_ProcessData() throws TimeoutException, StreamingQueryException {
113+
void Should_ProcessData() throws TimeoutException, StreamingQueryException {
115114
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
116115
// SparkSession sparkSession = SparkSession.builder()
117116
// .appName("data_source_test")
@@ -175,7 +174,7 @@ public void Should_ProcessData() throws TimeoutException, StreamingQueryExceptio
175174

176175
@Test
177176
@Order(2)
178-
public void Should_InitiateReplay_ALL_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
177+
void Should_InitiateReplay_ALL_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
179178
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
180179
// SparkSession sparkSession = SparkSession.builder()
181180
// .appName("data_source_test")
@@ -229,7 +228,7 @@ public void Should_InitiateReplay_ALL_STRATEGY_And_ProcessData() throws TimeoutE
229228

230229
@Test
231230
@Order(3)
232-
public void Should_InitiateReplay_TIMEBASED_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
231+
void Should_InitiateReplay_TIMEBASED_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
233232
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
234233
// SparkSession sparkSession = SparkSession.builder()
235234
// .appName("data_source_test")
@@ -284,7 +283,7 @@ public void Should_InitiateReplay_TIMEBASED_STRATEGY_And_ProcessData() throws Ti
284283

285284
@Test
286285
@Order(4)
287-
public void Should_InitiateReplay_REPLICATIONGROUPMESSAGEID_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
286+
void Should_InitiateReplay_REPLICATIONGROUPMESSAGEID_STRATEGY_And_ProcessData() throws TimeoutException, StreamingQueryException {
288287
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
289288
// SparkSession sparkSession = SparkSession.builder()
290289
// .appName("data_source_test")

0 commit comments

Comments
 (0)