MCPcopy Index your code
hub / github.com/apache/orc / main

Function main

tools/src/CSVFileImport.cc:266–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266int main(int argc, char* argv[]) {
267 std::string input;
268 std::string output;
269 std::string schema;
270 std::string timezoneName = "GMT";
271 uint64_t stripeSize = (128 << 20); // 128M
272 uint64_t blockSize = 64 << 10; // 64K
273 uint64_t batchSize = 1024;
274 orc::CompressionKind compression = orc::CompressionKind_ZLIB;
275
276 static struct option longOptions[] = {{"help", no_argument, nullptr, 'h'},
277 {"metrics", no_argument, nullptr, 'm'},
278 {"delimiter", required_argument, nullptr, 'd'},
279 {"stripe", required_argument, nullptr, 's'},
280 {"block", required_argument, nullptr, 'c'},
281 {"batch", required_argument, nullptr, 'b'},
282 {"timezone", required_argument, nullptr, 't'},
283 {nullptr, 0, nullptr, 0}};
284 bool helpFlag = false;
285 bool showMetrics = false;
286 int opt;
287 char* tail;
288 do {
289 opt = getopt_long(argc, argv, "d:s:c:b:t:mh", longOptions, nullptr);
290 switch (opt) {
291 case 'h':
292 helpFlag = true;
293 opt = -1;
294 break;
295 case 'm':
296 showMetrics = true;
297 break;
298 case 'd':
299 gDelimiter = optarg[0];
300 break;
301 case 's':
302 stripeSize = strtoul(optarg, &tail, 10);
303 if (*tail != '\0') {
304 fprintf(stderr, "The --stripe parameter requires an integer option.\n");
305 return 1;
306 }
307 break;
308 case 'c':
309 blockSize = strtoul(optarg, &tail, 10);
310 if (*tail != '\0') {
311 fprintf(stderr, "The --block parameter requires an integer option.\n");
312 return 1;
313 }
314 break;
315 case 'b':
316 batchSize = strtoul(optarg, &tail, 10);
317 if (*tail != '\0') {
318 fprintf(stderr, "The --batch parameter requires an integer option.\n");
319 return 1;
320 }
321 break;
322 case 't':
323 timezoneName = std::string(optarg);

Callers

nothing calls this directly

Calls 15

usageFunction · 0.85
GetDateFunction · 0.85
writeLocalFileFunction · 0.85
fillLongValuesFunction · 0.85
getDefaultPoolFunction · 0.85
fillStringValuesFunction · 0.85
fillDoubleValuesFunction · 0.85
fillDecimalValuesFunction · 0.85
fillBoolValuesFunction · 0.85
fillDateValuesFunction · 0.85
fillTimestampValuesFunction · 0.85
getSubtypeMethod · 0.80

Tested by

no test coverage detected