#include #include #include "../shared/DatabaseWithRetry.h" #include "../shared/GlobalConfigFile.h" #include "NfsHelper.h" /* This is a tool for migrating data from the mysql database to the filesystem. * This goes with MiscNFS.[Ch]. This will only be used in the transition. * After that we will remove the layout column from the cloud_layout table, * so this program won't even run correctly after that. */ using namespace NfsHelper; int main(int argc, char **argv) { addConfigItemsFromFile("../../live_server/config_common.txt"); if (!addConfigItemsFromCommandLine(argv + 1)) { return 1; } configItemsComplete(); int64_t strategyId = getConfigItem("start_after", 0); std::cout<<"start_after="<::max(); const int64_t maxCount = getConfigItem("max_count", NO_LIMIT); std::cout<<"max_count="; if (maxCount == NO_LIMIT) std::cout<<"NO_LIMIT"; else std::cout<rowIsValid()) break; strategyId = result->getIntegerField(0, 0); std::cout<getStringField(1)); if (!errorMessage.empty()) { std::cout<<"unable to create file: "<<(std::string)errorMessage <