Skip to content
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.
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 @@ -24,6 +24,8 @@ private TaskConstants() {
}

public static final String APPLICATION_REGEX = "application_\\d+_\\d+";

public static final String SETVALUE_REGEX = "\\$\\{setValue\\(([^)]*)\\)}";

/**
* string false
Expand Down Expand Up @@ -369,4 +371,5 @@ private TaskConstants() {
* data.quality.error.output.path
*/
public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path";

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public abstract class AbstractCommandExecutor {
* rules for extracting application ID
*/
protected static final Pattern APPLICATION_REGEX = Pattern.compile(TaskConstants.APPLICATION_REGEX);

/**
* rules for extracting Var Pool
*/
protected static final Pattern SETVALUE_REGEX = Pattern.compile(TaskConstants.SETVALUE_REGEX);

protected StringBuilder varPool = new StringBuilder();
/**
Expand Down Expand Up @@ -318,7 +323,7 @@ private void parseProcessOutput(Process process) {
String line;
while ((line = inReader.readLine()) != null) {
if (line.startsWith("${setValue(")) {
varPool.append(line, "${setValue(".length(), line.length() - 2);
varPool.append(findVarPool(line));
varPool.append("$VarPool$");
} else {
logBuffer.add(line);
Expand Down Expand Up @@ -403,6 +408,19 @@ private List<String> convertFile2List(String filename) {

return lineList;
}

/**
* find var pool
* @param line
* @return
*/
private String findVarPool(String line){
Matcher matcher = SETVALUE_REGEX.matcher(line);
if (matcher.find()) {
return matcher.group(1);
}
return null;
}

/**
* find app id
Expand Down