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

Method isReadable

java/tools/src/java/org/apache/orc/tools/FileDump.java:673–682  ·  view source on GitHub ↗
(final Path corruptPath, final Configuration conf,
      final long maxLen)

Source from the content-addressed store, hash-verified

671 }
672
673 private static boolean isReadable(final Path corruptPath, final Configuration conf,
674 final long maxLen) {
675 try {
676 OrcFile.createReader(corruptPath, OrcFile.readerOptions(conf).maxLength(maxLen));
677 return true;
678 } catch (Exception e) {
679 // ignore this exception as maxLen is unreadable
680 return false;
681 }
682 }
683
684 // search for byte pattern in another byte array
685 public static int indexOf(final byte[] data, final byte[] pattern, final int index) {

Callers 2

recoverFilesMethod · 0.95
recoverFileMethod · 0.95

Calls 3

createReaderMethod · 0.95
readerOptionsMethod · 0.95
maxLengthMethod · 0.80

Tested by

no test coverage detected