refactor(executor-task): 优化pulsar扫描任务
调整pulsar source并行度设置,优化pulsar时间分段长度
This commit is contained in:
@@ -15,6 +15,8 @@ import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.flink.client.cli.ClientOptions;
|
||||
import org.apache.flink.configuration.*;
|
||||
import org.apache.flink.yarn.configuration.YarnConfigOptions;
|
||||
@@ -176,9 +178,17 @@ public class TaskService {
|
||||
}
|
||||
}
|
||||
}
|
||||
Pattern dateRegex = Pattern.compile("(\\w+) (\\d{17}) (.+)");
|
||||
return results
|
||||
.reject(StrUtil::isBlank)
|
||||
.collect(StrUtil::trim)
|
||||
.sortThisBy(line -> {
|
||||
Matcher matcher = dateRegex.matcher(line);
|
||||
if (matcher.matches()) {
|
||||
return Long.valueOf(matcher.group(2));
|
||||
}
|
||||
return 0L;
|
||||
})
|
||||
.toImmutable();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user