提交 426d4c3c 编写于 作者: B barrierye

remove redundant code, and make executor exit when set a illegal queue size

上级 9c1a964a
......@@ -143,8 +143,7 @@ void PrepareReaders(std::vector<std::shared_ptr<DataFeed> >& readers,
readers.resize(thread_num);
for (size_t i = 0; i < readers.size(); ++i) {
readers[i] = DataFeedFactory::CreateDataFeed(data_feed_desc.name());
readers[i]->Init(data_feed_desc); // set batch size here
//readers[i]->SetQueueSize(32); // default is 32
readers[i]->Init(data_feed_desc); // set batch_size and queue_size here
}
readers[0]->SetFileList(filelist);
}
......
......@@ -60,7 +60,7 @@ bool DataFeed::SetFileList(const std::vector<std::string>& files) {
CheckInit();
if (files.size() == 0) {
LOG(ERROR) << "error: you have set an empty filelist";
return false;
exit(-1);
}
filelist_.assign(files.begin(), files.end());
file_idx_ = 0;
......@@ -100,7 +100,7 @@ template<typename T>
void PrivateQueueDataFeed<T>::SetQueueSize(int queue_size) {
if (queue_size <= 0) {
LOG(ERROR) << "error: illegal queue size: " << queue_size;
return;
exit(-1);
}
queue_size_ = queue_size;
queue_.ReCap(queue_size_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册