Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Zeta]job name Display error #6470 #6471

Merged
merged 7 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,26 @@ public void testGetErrorInfo() throws ExecutionException, InterruptedException {
}
}

@Test
public void testValidJobNameInJobConfig() throws ExecutionException, InterruptedException {
Common.setDeployMode(DeployMode.CLIENT);
String filePath = TestUtils.getResource("valid_job_name.conf");
JobConfig jobConfig = new JobConfig();
ClientConfig clientConfig = ConfigProvider.locateAndGetClientConfig();
clientConfig.setClusterName(TestUtils.getClusterName("JobExecutionIT"));
try (SeaTunnelClient engineClient = new SeaTunnelClient(clientConfig)) {
ClientJobExecutionEnvironment jobExecutionEnv =
engineClient.createExecutionContext(filePath, jobConfig, SEATUNNEL_CONFIG);
final ClientJobProxy clientJobProxy = jobExecutionEnv.execute();
CompletableFuture<JobStatus> completableFuture =
CompletableFuture.supplyAsync(clientJobProxy::waitForJobComplete);
await().atMost(600000, TimeUnit.MILLISECONDS)
.untilAsserted(() -> Assertions.assertTrue(completableFuture.isDone()));
String value = engineClient.getJobClient().listJobStatus(false);
Assertions.assertTrue(value.contains("\"jobName\":\"valid_job_name\""));
}
}

@Test
public void testGetUnKnownJobID() {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######
###### This config file is a demonstration of streaming processing in seatunnel config
######

env {
# You can set engine configuration here
job.mode = "BATCH"
job.name = "valid_job_name"
#execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}

source {
# This is a example source plugin **only for test and demonstrate the feature source plugin**
FakeSource {
result_table_name = "fake"
parallelism = 4
schema = {
fields {
name = "string"
age = "int"
}
}
}
}

transform {
}

sink {
console {
source_table_name="fake"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,13 @@ private void uploadActionPluginJar(List<Action> actions, Set<ConnectorJarIdentif
}

public ClientJobProxy execute() throws ExecutionException, InterruptedException {
LogicalDag logicalDag = getLogicalDag();
hailin0 marked this conversation as resolved.
Show resolved Hide resolved
JobImmutableInformation jobImmutableInformation =
new JobImmutableInformation(
Long.parseLong(jobConfig.getJobContext().getJobId()),
jobConfig.getName(),
isStartWithSavePoint,
seaTunnelHazelcastClient.getSerializationService().toData(getLogicalDag()),
seaTunnelHazelcastClient.getSerializationService().toData(logicalDag),
hailin0 marked this conversation as resolved.
Show resolved Hide resolved
jobConfig,
new ArrayList<>(jarUrls),
new ArrayList<>(connectorJarIdentifiers));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ void addCommonPluginJarsToAction(Action action) {
private void fillJobConfig() {
jobConfig.getJobContext().setJobMode(envOptions.get(EnvCommonOptions.JOB_MODE));
if (StringUtils.isEmpty(jobConfig.getName())
|| jobConfig.getName().equals(Constants.LOGO)) {
|| jobConfig.getName().equals(Constants.LOGO)
|| jobConfig.getName().equals(EnvCommonOptions.JOB_NAME.defaultValue())) {
jobConfig.setName(envOptions.get(EnvCommonOptions.JOB_NAME));
}
envOptions
Expand Down