Skip to content
Snippets Groups Projects
Commit 6cfe4c6c authored by brinn's avatar brinn
Browse files

fix: allow not to have a preprocessing by skipping the preprocessing...

fix: allow not to have a preprocessing by skipping the preprocessing configuration (provide a dummy implementation in this case)

SVN: 15918
parent 495d4c5b
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ import java.util.concurrent.Callable; ...@@ -24,7 +24,6 @@ import java.util.concurrent.Callable;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.logging.LogCategory; import ch.systemsx.cisd.common.logging.LogCategory;
import ch.systemsx.cisd.common.logging.LogFactory; import ch.systemsx.cisd.common.logging.LogFactory;
import ch.systemsx.cisd.common.process.CallableExecutor; import ch.systemsx.cisd.common.process.CallableExecutor;
...@@ -44,6 +43,21 @@ public class PreprocessingExecutor ...@@ -44,6 +43,21 @@ public class PreprocessingExecutor
private final static Logger machineLog = private final static Logger machineLog =
LogFactory.getLogger(LogCategory.MACHINE, PreprocessingExecutor.class); LogFactory.getLogger(LogCategory.MACHINE, PreprocessingExecutor.class);
private final static PreprocessingExecutor DUMMY = new PreprocessingExecutor(null, 0, 0L)
{
@Override
public boolean execute(String filePath)
{
return true;
}
@Override
public boolean executeOnce(String filePath)
{
return true;
}
};
/** /**
* A path to a script which should be called from command line for every dataset batch before it * A path to a script which should be called from command line for every dataset batch before it
...@@ -69,8 +83,9 @@ public class PreprocessingExecutor ...@@ -69,8 +83,9 @@ public class PreprocessingExecutor
millisToSleepOnFailure); millisToSleepOnFailure);
} else } else
{ {
throw EnvironmentFailureException.fromTemplate("Property '%s' is not set!", operationLog.info("No preprocessing script found, skipping preprocessing.");
PREPROCESSING_SCRIPT_PATH); // Return a dummy that always return true;
return DUMMY;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment