diff --git a/src/main/java/org/replicadb/cli/ToolOptions.java b/src/main/java/org/replicadb/cli/ToolOptions.java index 1cc7ec5..15fe34e 100644 --- a/src/main/java/org/replicadb/cli/ToolOptions.java +++ b/src/main/java/org/replicadb/cli/ToolOptions.java @@ -458,6 +458,7 @@ private void loadOptionsFile() throws IOException { setFetchSize(prop.getProperty("fetch.size")); setBandwidthThrottling(prop.getProperty("bandwidth.throttling")); setQuotedIdentifiers(Boolean.parseBoolean(prop.getProperty("quoted.identifiers"))); + setSourceFileFormat(prop.getProperty("source.file.format")); setSinkFileformat(prop.getProperty("sink.file.format")); setSentryDsn(prop.getProperty("sentry.dsn")); diff --git a/src/main/java/org/replicadb/manager/LocalFileManager.java b/src/main/java/org/replicadb/manager/LocalFileManager.java index a921f1c..f643f87 100644 --- a/src/main/java/org/replicadb/manager/LocalFileManager.java +++ b/src/main/java/org/replicadb/manager/LocalFileManager.java @@ -70,7 +70,7 @@ public int insertDataToTable(ResultSet resultSet, int taskId) throws Exception { // Temporal file name String randomFileUrl = options.getSinkConnect() + ".repdb." + (new Random().nextInt(9000) + 1000); - LOG.info("Temporal file path: " + randomFileUrl); + LOG.info("Temporal file path: {}",randomFileUrl); // Save the path of temp file FileManager.setTempFilePath(taskId,randomFileUrl); diff --git a/src/main/java/org/replicadb/manager/file/FileManagerFactory.java b/src/main/java/org/replicadb/manager/file/FileManagerFactory.java index eacf651..321166b 100644 --- a/src/main/java/org/replicadb/manager/file/FileManagerFactory.java +++ b/src/main/java/org/replicadb/manager/file/FileManagerFactory.java @@ -35,7 +35,9 @@ public FileManager accept(ToolOptions options, DataSourceType dsType) { LOG.info("return CsvFileManager"); return new CsvFileManager(options, dsType); } else { - throw new IllegalArgumentException("The file format " + options.getSinkFileformat() + " is not supported. "); + // CSV is the Default file format + LOG.warn("The file format is not defined, setting CSV as the default file format."); + return new CsvFileManager(options, dsType); } } }