From 0bf4467457a9cb7168ff95eeeec3bde6c2bff938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Gra=CC=88tzer?= Date: Wed, 24 May 2017 19:21:23 +0200 Subject: [PATCH] small fixes --- arangosh/Import/ImportFeature.cpp | 3 ++- arangosh/Import/ImportHelper.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arangosh/Import/ImportFeature.cpp b/arangosh/Import/ImportFeature.cpp index def6f432d3..e052973199 100644 --- a/arangosh/Import/ImportFeature.cpp +++ b/arangosh/Import/ImportFeature.cpp @@ -193,7 +193,7 @@ void ImportFeature::validateOptions( _chunkSize = MaxBatchSize; } - if (_threadCount <= 1) { + if (_threadCount < 1) { // it's not sensible to use just one thread LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "capping --threads value to " << 1; @@ -309,6 +309,7 @@ void ImportFeature::start() { if (_typeImport == "csv" || _typeImport == "tsv") { std::cout << "separator: " << _separator << std::endl; } + std::cout << "threads: " << _threadCount << std::endl; std::cout << "connect timeout: " << client->connectionTimeout() << std::endl; diff --git a/arangosh/Import/ImportHelper.cpp b/arangosh/Import/ImportHelper.cpp index 8ecae8cac4..6de5c1c0c3 100644 --- a/arangosh/Import/ImportHelper.cpp +++ b/arangosh/Import/ImportHelper.cpp @@ -285,6 +285,8 @@ bool ImportHelper::importDelimited(std::string const& collectionName, } waitForSenders(); + reportProgress(totalLength, totalRead, nextProgress); + _outputBuffer.clear(); return !_hasError; } @@ -410,6 +412,8 @@ bool ImportHelper::importJson(std::string const& collectionName, } waitForSenders(); + reportProgress(totalLength, totalRead, nextProgress); + MUTEX_LOCKER(guard, _stats._mutex); // this is an approximation only. _numberLines is more meaningful for CSV // imports