Unverified Commit e0ba0c54 authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Bug] [Flink]fix add jar some bug (#2974)

parent 757a298b
......@@ -46,9 +46,9 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# - name: Check Style
# run: |
# ./mvnw -T 4C -B --no-snapshot-updates clean spotless:check
# - name: Check Style
# run: |
# ./mvnw -T 4C -B --no-snapshot-updates clean spotless:check
- name: Build and Package
run: |
./mvnw -B clean install \
......@@ -114,7 +114,7 @@ jobs:
- uses: actions/checkout@v3
- name: Move Dockerfile
run: |
cp ./docker/Dockerfile* ./
cp -r ./docker/Dockerfile* ./
- name: Download math result for job 1
uses: actions/download-artifact@v3
with:
......@@ -173,7 +173,7 @@ jobs:
- uses: actions/checkout@v3
- name: Move Dockerfile
run: |
cp ./docker/Dockerfile* ./
cp -r ./docker/Dockerfile* ./
- uses: actions/checkout@v3
- name: set the flink_big_version
run: |
......@@ -204,7 +204,7 @@ jobs:
FLINK_VERSION=${{ matrix.FLINK_VERSION }}
DINKY_IMAGE=${{ matrix.url }}/${{ matrix.namespace }}/dinky-standalone-server:${{ inputs.version }}
FLINK_BIG_VERSION=${{ matrix.FLINK_BIG_VERSION }}
file: ./docker/DockerfileDinkyFlink
file: DockerfileDinkyFlink
context: .
push: true
tags: ${{ matrix.url }}/${{ matrix.namespace }}/dinky-standalone-server:${{ inputs.version }}-flink-${{matrix.FLINK_BIG_VERSION }}
......@@ -69,24 +69,12 @@ public class SinkBuilderFactory {
sinkBuilders.add(factory);
}
Map<String, Supplier<SinkBuilder>> plusSinkBuilder = sinkBuilders.stream()
.collect(Collectors.toMap(SinkBuilderFactory::getKeyWord, SinkBuilderFactory::getSupplier));
Map<String, Supplier<SinkBuilder>> plusSinkBuilder =
sinkBuilders.stream().collect(Collectors.toMap(SinkBuilderFactory::getKeyWord, x -> () -> x));
map.putAll(plusSinkBuilder);
return map;
}
@SuppressWarnings("unchecked")
private static Supplier<SinkBuilder> getSupplier(SinkBuilder clazz) {
return () -> {
try {
return SinkBuilder.class.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
logger.warn("Could not get constructor supplier : {}", e.getMessage());
}
return null;
};
}
public static String getKeyWord(SinkBuilder c) {
String fieldName = "KEY_WORD";
String result = null;
......
......@@ -209,7 +209,7 @@ public abstract class Executor {
Configuration configuration = tableEnvironment.getRootConfiguration();
List<String> jars = configuration.get(PipelineOptions.JARS);
if (jars == null) {
configuration.set(PipelineOptions.JARS, CollUtil.newArrayList(jarPath));
tableEnvironment.addConfiguration(PipelineOptions.JARS, CollUtil.newArrayList(jarPath));
} else {
CollUtil.addAll(jars, jarPath);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment