Skip to content

v0.2.49..v0.2.50 changeset OsmApiDbBulkInserter.cpp

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmApiDbBulkInserter.cpp b/hoot-core/src/main/cpp/hoot/core/io/OsmApiDbBulkInserter.cpp
index 1919b3f..6343680 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmApiDbBulkInserter.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmApiDbBulkInserter.cpp
@@ -363,7 +363,7 @@ void OsmApiDbBulkInserter::finalizePartial()
     StringUtils::formatLargeNumber(_getTotalFeaturesWritten()) <<
     " input records parsed (data pass #" << _fileDataPassCtr << " of " <<
     _numberOfFileDataPasses() << ").  Time elapsed: " <<
-    StringUtils::secondsToDhms(_timer->elapsed()));
+    StringUtils::millisecondsToDhms(_timer->elapsed()));
 
   //go ahead and clear out some of the data structures we don't need anymore
   _clearIdCollections();
@@ -428,7 +428,7 @@ void OsmApiDbBulkInserter::finalizePartial()
 
 bool OsmApiDbBulkInserter::_destinationIsDatabase() const
 {
-  return _outputUrl.toLower().startsWith("osmapidb://");
+  return _outputUrl.toLower().startsWith(MetadataTags::OsmApiDbScheme() + "://");
 }
 
 void OsmApiDbBulkInserter::_writeDataToDbPsql()
@@ -448,7 +448,7 @@ void OsmApiDbBulkInserter::_writeDataToDbPsql()
   ApiDb::execSqlFile(_outputUrl, _sqlOutputCombinedFile->fileName());
 
   LOG_INFO(
-    "SQL execution complete.  Time elapsed: " << StringUtils::secondsToDhms(_timer->elapsed()));
+    "SQL execution complete.  Time elapsed: " << StringUtils::millisecondsToDhms(_timer->elapsed()));
 }
 
 void OsmApiDbBulkInserter::_writeDataToDb()
@@ -636,7 +636,7 @@ void OsmApiDbBulkInserter::_writeCombinedSqlFile()
   LOG_INFO(
     "SQL file write complete.  (data pass #" << _fileDataPassCtr << " of " <<
     _numberOfFileDataPasses() << ").  Time elapsed: " <<
-    StringUtils::secondsToDhms(_timer->elapsed()));
+    StringUtils::millisecondsToDhms(_timer->elapsed()));
   LOG_DEBUG("Parsed " << StringUtils::formatLargeNumber(recordCtr) << " total SQL file lines.");
   QFileInfo outputInfo(_sqlOutputCombinedFile->fileName());
   LOG_VART(Tgs::SystemInfo::humanReadable(outputInfo.size()));
Clone this wiki locally