"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/rapidminer/operator/ScriptingOperator.java" between
rapidminer-studio-9.4.1-src.tar.gz and rapidminer-studio-9.5.0-src.tar.gz

About: RapidMiner Studio is a code-free environment for designing advanced analytic processes with machine learning, data mining, text mining, predictive analytics and business analytics. Java source.

ScriptingOperator.java  (rapidminer-studio-9.4.1-src):ScriptingOperator.java  (rapidminer-studio-9.5.0-src)
skipping to change at line 228 skipping to change at line 228
imports.append("import com.rapidminer.example.set.*;\n"); imports.append("import com.rapidminer.example.set.*;\n");
imports.append("import com.rapidminer.example.table.*;\n" ); imports.append("import com.rapidminer.example.table.*;\n" );
imports.append("import com.rapidminer.operator.*;\n"); imports.append("import com.rapidminer.operator.*;\n");
imports.append("import com.rapidminer.tools.Tools;\n"); imports.append("import com.rapidminer.tools.Tools;\n");
imports.append("import java.util.*;\n"); imports.append("import java.util.*;\n");
script = imports.toString() + script; script = imports.toString() + script;
} }
List<IOObject> input = inExtender.getData(IOObject.class, false); List<IOObject> input = inExtender.getData(IOObject.class, false);
convertIOTables(input); try {
convertIOTables(input);
} catch (BeltConverter.ConversionException e) {
throw new UserError(this, "scriptingOperator.custom_colum
ns", e.getColumnName(), e.getType().customTypeID());
}
Object result; Object result;
try { try {
// cache access is synchronized on a per-script basis to prevent Execute Script // cache access is synchronized on a per-script basis to prevent Execute Script
// inside a loop to start many parsings at the same time // inside a loop to start many parsings at the same time
Object lock; Object lock;
synchronized (LOCK_MAP) { synchronized (LOCK_MAP) {
lock = LOCK_MAP.computeIfAbsent(script, s -> new Object()); lock = LOCK_MAP.computeIfAbsent(script, s -> new Object());
} }
Script cachedScript; Script cachedScript;
skipping to change at line 297 skipping to change at line 301
} else { } else {
getLogger().warning("Unknown result: " + result.getClass() + ": " + result); getLogger().warning("Unknown result: " + result.getClass() + ": " + result);
} }
} }
} }
} }
/** /**
* Since the script does unchecked casts to {@link com.rapidminer.example .ExampleSet}s, we need to convert belt * Since the script does unchecked casts to {@link com.rapidminer.example .ExampleSet}s, we need to convert belt
* tables here. Later, when more operators return belt tables, we should introduce a compatibility level for this. * tables here. Later, when more operators return belt tables, we should introduce a compatibility level for this.
*
* @throws BeltConverter.ConversionException
* if a table cannot be converted because it contains custom
columns
*/ */
private void convertIOTables(List<IOObject> input) { private void convertIOTables(List<IOObject> input) {
ConcurrencyContext concurrencyContext = Resources.getConcurrencyC ontext(this); ConcurrencyContext concurrencyContext = Resources.getConcurrencyC ontext(this);
for (int i = 0; i < input.size(); i++) { for (int i = 0; i < input.size(); i++) {
IOObject object = input.get(i); IOObject object = input.get(i);
if (object instanceof IOTable) { if (object instanceof IOTable) {
input.set(i, BeltConverter.convert((IOTable) obje ct, concurrencyContext)); input.set(i, BeltConverter.convert((IOTable) obje ct, concurrencyContext));
} }
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)