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

doris illegal label fix #421

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ public LabelGenerator(String labelPrefix, boolean enable2PC, int subtaskId) {

public String generateTableLabel(long chkId) {
Preconditions.checkState(tableIdentifier != null);
// The label of stream load can not contain `-` , replace all "-" by "_"
String label = String.format("%s_%s_%s_%s", labelPrefix, tableIdentifier, subtaskId, chkId);
return enable2PC ? label : label + "_" + UUID.randomUUID();
String uuid = UUID.randomUUID().toString().replace("-", "_");
return enable2PC ? label : label + "_" + uuid;
}

public String generateBatchLabel(String table) {
return String.format("%s_%s_%s", labelPrefix, table, UUID.randomUUID());
// The label of stream load can not contain `-` , replace all "-" by "_"
String uuid = UUID.randomUUID().toString().replace("-", "_");
return String.format("%s_%s_%s", labelPrefix, table, uuid);
}

public String generateCopyBatchLabel(String table, long chkId, int fileNum) {
Expand Down