Skip to content

Commit

Permalink
Merge pull request #9 from Klarrio/feature/container-vulnerabilities
Browse files Browse the repository at this point in the history
alleviate vulnerabilities
  • Loading branch information
rafhuys-klarrio authored Apr 29, 2022
2 parents 578c12c + 10c45a4 commit ec6f9c6
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ allprojects {
}

dependencies {
compile 'net.sourceforge.argparse4j:argparse4j:0.5.0'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.0'
compile 'org.apache.avro:avro:1.4.1'
compile 'org.json:json:20140107'
compile 'net.sourceforge.argparse4j:argparse4j:0.9.0'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
compile 'org.apache.avro:avro:1.11.0'
compile 'org.json:json:20220320'
compile 'org.jolokia:jolokia-jvm:1.6.2'
compile 'net.savantly:graphite-client:1.1.0-RELEASE'
compile 'com.timgroup:java-statsd-client:3.0.1'
compile 'com.signalfx.public:signalfx-codahale:0.0.47'
compile 'com.signalfx.public:signalfx-codahale:1.0.17'
compile 'com.fasterxml.jackson.module:jackson-module-scala_2.12:2.13.2'
compile 'io.netty:netty-handler:4.1.76.Final'
compile 'org.apache.commons:commons-lang3:3.12.0'
compile group: 'org.apache.kafka', name: 'kafka_2.12', version: '2.7.1'
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '2.7.1'
testCompile 'org.mockito:mockito-core:2.24.0'
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
# limitations under the License.


FROM anapsix/alpine-java
FROM azul/zulu-openjdk-alpine:8-jre

MAINTAINER [email protected]

RUN apk add --no-cache bash

WORKDIR /opt/kafka-monitor
ADD build/ build/
ADD bin/xinfra-monitor-start.sh bin/xinfra-monitor-start.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/kafka-monitor-docker-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ sleep 10

bin/xinfra-monitor-start.sh config/xinfra-monitor.properties &

wait $!
wait $!
4 changes: 2 additions & 2 deletions src/main/java/com/linkedin/xinfra/monitor/common/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.JsonEncoder;
import org.apache.avro.io.EncoderFactory;
import org.apache.kafka.clients.admin.AdminClient;
import org.apache.kafka.clients.admin.CreateTopicsResult;
import org.apache.kafka.clients.admin.ListPartitionReassignmentsResult;
Expand Down Expand Up @@ -240,7 +240,7 @@ public static String jsonFromGenericRecord(GenericRecord record) {
GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(DefaultTopicSchema.MESSAGE_V0);

try {
Encoder encoder = new JsonEncoder(DefaultTopicSchema.MESSAGE_V0, out);
Encoder encoder = EncoderFactory.get().jsonEncoder(DefaultTopicSchema.MESSAGE_V0, out);
writer.write(record, encoder);
encoder.flush();
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import net.savantly.graphite.GraphiteClient;
import net.savantly.graphite.GraphiteClientFactory;
import net.savantly.graphite.impl.SimpleCarbonMetric;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import kafka.tools.ConsoleProducer;
import org.apache.kafka.clients.ApiVersions;
import org.apache.kafka.clients.ClientDnsLookup;
import org.apache.kafka.clients.ClientResponse;
Expand All @@ -40,7 +39,6 @@
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient;
import org.apache.kafka.clients.consumer.internals.RequestFuture;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.Node;
import org.apache.kafka.common.internals.ClusterResourceListeners;
import org.apache.kafka.common.message.OffsetCommitRequestData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down

0 comments on commit ec6f9c6

Please sign in to comment.