(final Path corruptPath, final Configuration conf,
final long maxLen)
| 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) { |
no test coverage detected