Skip to content

Commit a957b61

Browse files
Merge branch 'develop' into csa-1.12.0-cdh-7.1.9
2 parents dc2203b + 46d1071 commit a957b61

File tree

265 files changed

+28603
-3585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+28603
-3585
lines changed

.github/workflows/build_and_test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,26 @@ jobs:
2828
restore-keys: |
2929
${{ runner.os }}-maven-
3030
- name: Build and Test with Maven
31-
run: mvn -B package --file flink-cyber/pom.xml
31+
run: mvn -P '!add-depebdencies-for-IDEA,!full-build,!include-front-end' -B package --file flink-cyber/pom.xml
32+
3233
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3334
- name: Update dependency graph
34-
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
35+
uses: advanced-security/maven-dependency-submission-action@v3
3536
with:
3637
directory: /home/runner/work/cybersec/cybersec/flink-cyber
38+
build_and_test_angular:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Use Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20.x'
46+
- name: Install Angular CLI
47+
run: npm install -g @angular/cli
48+
- name: Install dependencies
49+
run: npm install
50+
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
51+
- name: Run test
52+
run: npm run test:headless
53+
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.idea/cybersec.iml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/workspace.xml

Lines changed: 0 additions & 53 deletions
This file was deleted.

flink-cyber/.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>com.cloudera.cyber</groupId>
6+
<artifactId>cyber-services</artifactId>
7+
<version>2.3.1</version>
8+
</parent>
9+
<artifactId>cyber-service-common</artifactId>
10+
<name>Archetype - cyber-service-common</name>
11+
<url>http://maven.apache.org</url>
12+
<properties>
13+
<commons-compress.version>1.24.0</commons-compress.version>
14+
</properties>
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.projectlombok</groupId>
18+
<artifactId>lombok</artifactId>
19+
<optional>true</optional>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.apache.commons</groupId>
23+
<artifactId>commons-lang3</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.apache.commons</groupId>
27+
<artifactId>commons-compress</artifactId>
28+
<version>${commons-compress.version}</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.assertj</groupId>
32+
<artifactId>assertj-core</artifactId>
33+
<scope>test</scope>
34+
<version>${assertj.version}</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>junit</groupId>
38+
<artifactId>junit</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-autoconfigure</artifactId>
44+
</dependency>
45+
</dependencies>
46+
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.cloudera.service.common;
2+
3+
import lombok.experimental.UtilityClass;
4+
import org.apache.commons.lang3.StringUtils;
5+
6+
import java.util.Arrays;
7+
import java.util.function.Function;
8+
9+
@UtilityClass
10+
public class Utils {
11+
12+
/**
13+
* Retrieves an enum constant of the specified enum type based on a case-insensitive search of a string representation,
14+
* using a custom mapping function to extract the string representation from the enum constant.
15+
*
16+
* @param <T> the enum type
17+
* @param name the string representation to search for
18+
* @param enumClass the Class object representing the enum type
19+
* @param nameFunction a function that extracts the string representation from an enum constant
20+
* @return the enum constant matching the provided string representation, or null if not found
21+
* @throws NullPointerException if {@code name}, {@code enumClass}, or {@code nameFunction} is null
22+
*/
23+
public static <T extends Enum<T>> T getEnumFromString(String name, Class<T> enumClass, Function<T, String> nameFunction) {
24+
return Arrays.stream(enumClass.getEnumConstants())
25+
.filter(type -> StringUtils.equalsIgnoreCase(name, nameFunction.apply(type)))
26+
.findFirst()
27+
.orElse(null);
28+
}
29+
30+
public static <T extends Enum<T>> T getEnumFromStringContains(String name, Class<T> enumClass, Function<T, String> nameFunction) {
31+
return Arrays.stream(enumClass.getEnumConstants())
32+
.filter(type -> StringUtils.containsIgnoreCase(name, nameFunction.apply(type)))
33+
.findFirst()
34+
.orElse(null);
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.cloudera.service.common.config.kafka;
2+
3+
import lombok.Getter;
4+
import lombok.Setter;
5+
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
6+
import org.springframework.boot.context.properties.ConfigurationProperties;
7+
import org.springframework.stereotype.Component;
8+
9+
@Getter
10+
@Setter
11+
public class ClouderaKafkaProperties extends KafkaProperties {
12+
private String replyTopic;
13+
private String requestTopic;
14+
}

0 commit comments

Comments
 (0)