Skip to content

Commit

Permalink
merge in CSA 1.12.0 with 7.1.9 CDH
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynduby committed May 16, 2024
2 parents 46f8087 + 629a2c1 commit 2c00a1d
Show file tree
Hide file tree
Showing 37 changed files with 459 additions and 180 deletions.
7 changes: 7 additions & 0 deletions flink-cyber/caracal-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
<artifactId>flink-connector-kafka</artifactId>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<scope>provided</scope>
<version>${flink.version}</version>
</dependency>

<dependency>
<groupId>com.hortonworks.smm</groupId>
<artifactId>monitoring-interceptors</artifactId>
Expand Down
13 changes: 11 additions & 2 deletions flink-cyber/caracal-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<version>${flink.version}</version>
<artifactId>flink-connector-cloudera-registry</artifactId>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -164,6 +168,11 @@
<artifactId>flink-orc</artifactId>
</dependency>

<dependency>
<groupId>org.apache.orc</groupId>
<artifactId>orc-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-avro</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public long getTs() {
return message.getTs();
}

public static final Schema SCHEMA$ = AvroSchemas.createRecordBuilder(ScoredMessage.class.getPackage().getName(), ScoredMessage.class.getName())
public static final Schema SCHEMA$ = AvroSchemas.createRecordBuilder(ScoredMessage.class.getPackage().getName(), ScoredMessage.class.getName(), null)
.fields()
.name("message").type(Message.SCHEMA$).noDefault()
.name("cyberScoresDetails").type(Schema.createArray(Scores.SCHEMA$)).noDefault()
Expand Down
5 changes: 5 additions & 0 deletions flink-cyber/flink-alert-scoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
<groupId>org.apache.flink</groupId>
<artifactId>flink-statebackend-rocksdb</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
<build>
Expand Down
12 changes: 5 additions & 7 deletions flink-cyber/flink-commands/json-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -70,15 +69,14 @@
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
18 changes: 18 additions & 0 deletions flink-cyber/flink-commands/scoring-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
<version>${jackson.datatype.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<!-- Logging and Metrics -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -90,6 +98,10 @@
<artifactId>avro</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -128,6 +140,12 @@
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.google.</pattern>
<shadedPattern>com.cloudera.cyber.com.google.</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.cloudera.cyber.scoring.ScoringJobKafka</mainClass>
Expand Down
15 changes: 14 additions & 1 deletion flink-cyber/flink-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,22 @@
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-cloudera-registry</artifactId>
</dependency>
<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<artifactId>flink-connector-base</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
Expand Down
20 changes: 19 additions & 1 deletion flink-cyber/flink-cyber-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand All @@ -55,10 +68,15 @@
<artifactId>flink-table-common</artifactId>
</dependency>


<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.apache.avro.LogicalTypes;
import org.apache.avro.Schema;
import org.apache.avro.SchemaBuilder;
import org.apache.avro.specific.SpecificRecord;
Expand Down Expand Up @@ -56,7 +57,7 @@ public class Message extends SpecificRecordBase implements SpecificRecord, Ident
public static final Schema SCHEMA$ = AvroSchemas.createRecordBuilder(Message.class.getPackage().getName(), Message.class.getName())
.fields()
.requiredString("id")
.requiredLong("ts")
.name("ts").type(LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG))).noDefault()
.name("originalSource").type(SignedSourceKey.SCHEMA$).noDefault()
.requiredString("message")
.name("threats").type().optional().type(SchemaBuilder.map().values(SchemaBuilder.array().items(ThreatIntelligence.SCHEMA$)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@
public class AvroSchemas {

public static SchemaBuilder.RecordBuilder<org.apache.avro.Schema> createRecordBuilder(String namespace, String recordName) {
return SchemaBuilder.record(recordName).namespace(namespace)
.prop("ssb.rowtimeAttribute", "ts")
.prop("ssb.watermarkExpression", "`ts` - INTERVAL '30' SECOND");
return createRecordBuilder(namespace, recordName, "ts");
}

public static SchemaBuilder.RecordBuilder<org.apache.avro.Schema> createRecordBuilder(String namespace, String recordName, String tsFieldName) {
SchemaBuilder.RecordBuilder<org.apache.avro.Schema> recordBuilder = SchemaBuilder.record(recordName).namespace(namespace);
if (tsFieldName != null) {
recordBuilder
.prop("ssb.rowtimeAttribute", tsFieldName)
.prop("ssb.watermarkExpression", String.format("`%s` - INTERVAL '30' SECOND", tsFieldName));
}
return recordBuilder;
}
}
7 changes: 6 additions & 1 deletion flink-cyber/flink-dedupe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<artifactId>flink-connector-cloudera-registry</artifactId>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>

<dependency>
Expand Down
5 changes: 5 additions & 0 deletions flink-cyber/flink-enrichment/flink-enrichment-cidr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
<classifier>tests</classifier>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>com.hortonworks.smm</groupId>
<artifactId>monitoring-interceptors</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions flink-cyber/flink-enrichment/flink-enrichment-geocode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@
<version>${commons-validator.version}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
18 changes: 6 additions & 12 deletions flink-cyber/flink-enrichment/flink-enrichment-load/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,19 @@
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hbase-${flink.hbase.version}</artifactId>
<version>${flink.version}</version>
<exclusions>
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<artifactId>flink-connector-cloudera-registry</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>

<dependency>
<groupId>com.cloudera.cyber</groupId>
<artifactId>flink-cyber-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,19 @@
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hbase-${flink.hbase.version}</artifactId>
<version>${flink.version}</version>
<exclusions>
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<artifactId>flink-connector-cloudera-registry</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>

<dependency>
<groupId>com.cloudera.cyber</groupId>
<artifactId>flink-cyber-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cloudera-registry</artifactId>
<artifactId>flink-connector-cloudera-registry</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-serdes</artifactId>
</dependency>

<dependency>
<groupId>com.cloudera.cyber</groupId>
<artifactId>flink-cyber-api</artifactId>
Expand Down
Loading

0 comments on commit 2c00a1d

Please sign in to comment.