Commit 96684b21 authored by Matija Obreza's avatar Matija Obreza
Browse files

Increase batch size and worker count

parent 40541a95
......@@ -262,6 +262,7 @@ public class RowConverter {
}
}
try {
if (rdfValues == null) {
containerNode.set(fieldName, null);
} else if (rdfValues instanceof ArrayList<?>) {
......@@ -279,6 +280,10 @@ public class RowConverter {
containerNode.set(fieldName, coerce(jsonField, rdfValues));
}
}
} catch (NullPointerException e) {
_log.error("Error converting " + rdfValues);
throw e;
}
}
static ObjectNode ensureNode(ObjectNode parentNode, String nodeName) throws JsonGenerationException {
......
......@@ -70,7 +70,7 @@ import swing2swt.layout.BorderLayout;
public class PushDialog extends Dialog {
private static final Logger _log = Logger.getLogger(PushDialog.class);
protected static final int BATCH_SIZE = 50;
protected static final int BATCH_SIZE = 100;
public static enum GenesysOp {
UPSERT, DELETE
......@@ -88,8 +88,8 @@ public class PushDialog extends Dialog {
@Autowired
protected DataSourceLoader dataSourceLoader;
BlockingQueue<Runnable> linkedBlockingDeque = new LinkedBlockingDeque<Runnable>(4);
private ThreadPoolExecutor executorService = new ThreadPoolExecutor(1, 4, 30, TimeUnit.SECONDS, linkedBlockingDeque, new ThreadPoolExecutor.CallerRunsPolicy());
BlockingQueue<Runnable> linkedBlockingDeque = new LinkedBlockingDeque<Runnable>(10);
private ThreadPoolExecutor executorService = new ThreadPoolExecutor(1, 10, 30, TimeUnit.SECONDS, linkedBlockingDeque, new ThreadPoolExecutor.CallerRunsPolicy());
protected Object result;
protected Shell shell;
......@@ -411,6 +411,7 @@ public class PushDialog extends Dialog {
_log.info("Execution was interrupted");
} catch (Throwable e) {
_log.error(e.getMessage(), e);
e.printStackTrace();
} finally {
_log.info("Reader finished.");
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment