Skip to content

Commit

Permalink
Merge pull request #67 from Nasdaq/release-0.9.x
Browse files Browse the repository at this point in the history
Removing Strimzi dependency
  • Loading branch information
ruchirvaninasdaq authored May 1, 2024
2 parents 81332d2 + 7425110 commit 4dce1b6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 36 deletions.
8 changes: 1 addition & 7 deletions ncds-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.nasdaq.ncds</groupId>
<artifactId>ncds</artifactId>
<version>0.8.5</version>
<version>0.9.0</version>
</parent>

<artifactId>ncds-sdk</artifactId>
Expand Down Expand Up @@ -56,12 +56,6 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<!-- Kafka -auth -->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>kafka-oauth-common</artifactId>
</dependency>

<!-- Testing -->

<!-- Kafka -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.nasdaq.ncdsclient.internal.utils.IsItJunit;
import com.nasdaq.ncdsclient.internal.utils.KafkaConfigLoader;
import com.nasdaq.ncdsclient.news.NewsUtil;
import io.strimzi.kafka.oauth.common.ConfigProperties;
import org.apache.avro.Schema;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.KafkaConsumer;
Expand Down Expand Up @@ -216,14 +215,6 @@ public KafkaConsumer getNewsConsumer(String topic) throws Exception {
}
}

private String getDate(){
// Get Today's EST date
DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
dateformat.setTimeZone(TimeZone.getTimeZone("America/New_York"));
String date = dateformat.format(new Date());
return date;
}

private KafkaConsumer seekToMidNight(TopicPartition topicPartition){
Map<TopicPartition,Long> timestmaps = new HashMap();
timestmaps.put(topicPartition , getTodayMidNightTimeStamp());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.nasdaq.ncdsclient.internal.utils.IsItJunit;
import com.nasdaq.ncdsclient.internal.utils.KafkaConfigLoader;
import io.strimzi.kafka.oauth.common.ConfigProperties;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericRecord;
import org.apache.kafka.clients.consumer.*;
Expand Down Expand Up @@ -121,9 +120,9 @@ private KafkaAvroConsumer getConsumer(String cleindId) throws Exception {
//Properties kafkaProps = null;
try {

if(!IsItJunit.isJUnitTest()) {
ConfigProperties.resolveAndExportToSystemProperties(securityProps);
}
// if(!IsItJunit.isJUnitTest()) {
// ConfigProperties.resolveAndExportToSystemProperties(securityProps);
// }

Schema.Parser parser = new Schema.Parser();
//controlMessageSchema = parser.parse(ClassLoader.getSystemResourceAsStream("ControlMessageSchema.avsc"));
Expand All @@ -137,7 +136,7 @@ private KafkaAvroConsumer getConsumer(String cleindId) throws Exception {
kafkaProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, OffsetResetStrategy.EARLIEST.toString().toLowerCase());
kafkaProps.put(ConsumerConfig.GROUP_ID_CONFIG, cleindId);
kafkaProps.put(ConsumerConfig.MAX_PARTITION_FETCH_BYTES_CONFIG, "5048576");
ConfigProperties.resolve(kafkaProps);
// ConfigProperties.resolve(kafkaProps);
}
catch (Exception e) {
throw e;
Expand Down
15 changes: 15 additions & 0 deletions ncds-sdk/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG">
<Appenders>
<File name="LogToFile" fileName="logs/unittest/log.out" append="false" immediateFlush="true">
<PatternLayout>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n</Pattern>
</PatternLayout>
</File>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="LogToFile"/>
</Root>
</Loggers>
</Configuration>
2 changes: 1 addition & 1 deletion ncdssdk-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.nasdaq.ncds</groupId>
<artifactId>ncds</artifactId>
<version>0.8.5</version>
<version>0.9.0</version>
</parent>

<artifactId>ncdssdk-client</artifactId>
Expand Down
15 changes: 1 addition & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.nasdaq.ncds</groupId>
<artifactId>ncds</artifactId>
<version>0.8.5</version>
<version>0.9.0</version>
<packaging>pom</packaging>
<name>Nasdaq Cloud Data Service </name>

Expand All @@ -23,7 +23,6 @@
<log4j.version>2.20.0</log4j.version>
<netty.version>4.1.94.Final</netty.version>
<slf4jVersion>1.7.36</slf4jVersion>
<strimzi.oauth.version>0.12.0</strimzi.oauth.version>
<checkstyle.skip>true</checkstyle.skip>
<junit5.version>5.7.2</junit5.version>
<junit5PlatformProvider.version>1.3.2</junit5PlatformProvider.version>
Expand Down Expand Up @@ -116,18 +115,6 @@
<version>${kafka.version}</version>
</dependency>

<!--Kafka Auth Dependency-->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>kafka-oauth-client</artifactId>
<version>${strimzi.oauth.version}</version>
</dependency>
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>kafka-oauth-common</artifactId>
<version>${strimzi.oauth.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
Expand Down

0 comments on commit 4dce1b6

Please sign in to comment.