[X] I had searched in the issues and found no similar issues.
What happened
this code may be error when get ResourceName:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
args.add(resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
should be change to below to resolve:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
// args.add(resourceInfo.getResourceName().substring(1));
String path = resourceInfo.getResourceName();
String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path)
.getResourceAbsolutePathInLocal();
args.add(absolutePath);
// args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
What you expected to happen
this code may be error when get ResourceName:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
args.add(resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
should be change to below to resolve:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
// args.add(resourceInfo.getResourceName().substring(1));
String path = resourceInfo.getResourceName();
String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path)
.getResourceAbsolutePathInLocal();
args.add(absolutePath);
// args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
How to reproduce
this code may be error when get ResourceName:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
args.add(resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
should be change to below to resolve:
protected List<String> buildOptions() throws Exception {
List<String> args = new ArrayList<>();
if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) {
args.add(CONFIG_OPTIONS);
args.add(buildCustomConfigCommand());
} else {
seatunnelParameters.getResourceList().forEach(resourceInfo -> {
args.add(CONFIG_OPTIONS);
// TODO: Need further check for refactored resource center
// TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized
// args.add(resourceInfo.getResourceName().substring(1));
String path = resourceInfo.getResourceName();
String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path)
.getResourceAbsolutePathInLocal();
args.add(absolutePath);
// args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", ""));
});
}
return args;
}
Anything else
my env is docker with minio as resourcemanager to get resource
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
Search before asking
What happened
this code may be error when get ResourceName:
should be change to below to resolve:
What you expected to happen
this code may be error when get ResourceName:
should be change to below to resolve:
How to reproduce
this code may be error when get ResourceName:
should be change to below to resolve:
Anything else
my env is docker with minio as resourcemanager to get resource
Version
3.2.x
Are you willing to submit PR?
Code of Conduct