(List<String> files, Configuration conf,
List<Integer> rowIndexCols, boolean printTimeZone, final boolean recover,
final String backupPath, final boolean printColumnType)
| 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(); |
no test coverage detected