Added documentation

This commit is contained in:
Maksim Kita 2021-03-01 12:32:13 +03:00
parent 6b69d859c1
commit c773afb659
2 changed files with 10 additions and 4 deletions

View File

@ -64,7 +64,7 @@ ExecutablePoolDictionarySource::ExecutablePoolDictionarySource(
throw Exception("ExecutablePoolDictionarySource cannot have pool of size 0", ErrorCodes::BAD_ARGUMENTS);
for (size_t i = 0; i < pool_size; ++i)
process_pool->emplace(ShellCommand::execute(command, false, true));
process_pool->emplace(ShellCommand::execute(command));
}
ExecutablePoolDictionarySource::ExecutablePoolDictionarySource(const ExecutablePoolDictionarySource & other)
@ -81,7 +81,7 @@ ExecutablePoolDictionarySource::ExecutablePoolDictionarySource(const ExecutableP
, process_pool(std::make_shared<ProcessPool>(pool_size))
{
for (size_t i = 0; i < pool_size; ++i)
process_pool->emplace(ShellCommand::execute(command, false, true));
process_pool->emplace(ShellCommand::execute(command));
}
BlockInputStreamPtr ExecutablePoolDictionarySource::loadAll()

View File

@ -15,8 +15,14 @@ namespace DB
using ProcessPool = ConcurrentBoundedQueue<std::unique_ptr<ShellCommand>>;
/// Allows loading data from pool of processes
/// TODO: Add documentation
/** ExecutablePoolDictionarySource allows loading data from pool of processes.
* When client requests ids or keys source get process from ProcessPool
* and create stream based on source format from process stdout.
* It is important that stream format will expect only rows that were requested.
* When stream is finished process is returned back to the ProcessPool.
* If there are no processes in pool during request client will be blocked
* until some process will be retunred to pool.
*/
class ExecutablePoolDictionarySource final : public IDictionarySource
{
public: