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

Method printMetaData

java/tools/src/java/org/apache/orc/tools/FileDump.java:274–300  ·  view source on GitHub ↗
(List<String> files, Configuration conf,
      List<Integer> rowIndexCols, boolean printTimeZone, final boolean recover,
      final String backupPath, final boolean printColumnType)

Source from the content-addressed store, hash-verified

272 }
273
274 private static void printMetaData(List<String> files, Configuration conf,
275 List<Integer> rowIndexCols, boolean printTimeZone, final boolean recover,
276 final String backupPath, final boolean printColumnType)
277 throws IOException {
278 List<String> corruptFiles = new ArrayList<>();
279 for (String filename : files) {
280 printMetaDataImpl(filename, conf, rowIndexCols, printTimeZone, corruptFiles, printColumnType);
281 System.out.println(SEPARATOR);
282 }
283
284 if (!corruptFiles.isEmpty()) {
285 if (recover) {
286 recoverFiles(corruptFiles, conf, backupPath);
287 } else {
288 System.err.println(corruptFiles.size() + " file(s) are corrupted." +
289 " Run the following command to recover corrupted files.\n");
290 StringBuilder buffer = new StringBuilder();
291 buffer.append("hive --orcfiledump --recover --skip-dump");
292 for(String file: corruptFiles) {
293 buffer.append(' ');
294 buffer.append(file);
295 }
296 System.err.println(buffer);
297 System.out.println(SEPARATOR);
298 }
299 }
300 }
301
302 static void printColumnsType(TypeDescription schema) {
303 int maximumId = schema.getMaximumId();

Callers 1

mainMethod · 0.95

Calls 4

printMetaDataImplMethod · 0.95
recoverFilesMethod · 0.95
sizeMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected