Commit 9769e893 authored by Michael Davis's avatar Michael Davis
Browse files

[migration] Implements --skip option

parent cc8e8534
......@@ -170,6 +170,14 @@ void EosImportFiles::preFlightCheck()
}
std::cerr << "done." << std::endl;
// Report NS check and skipped files
if(m_is_check) {
std::cerr << "EOS namespace metadata will be checked before injecting each file." << std::endl;
}
if(m_skip > 0) {
std::cerr << "Skipping first " << m_skip << " rows." << std::endl;
}
}
......@@ -627,6 +635,18 @@ void EosImportFiles::grpcInject()
continue;
}
// Skip rows
if(m_skip > m_files.size()) {
m_skip -= m_files.size();
m_total_files += m_files.size();
m_files.clear();
continue;
} else if (m_skip > 0) {
m_files.erase(m_files.begin(), m_files.begin() + m_skip);
m_total_files += m_skip;
m_skip = 0;
}
try {
// Inject files into EOS
int num_errors = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment