@Test public void regularExtendedRecordsWildcardTest() throws IOException { ExtendedRecord expectedOne = ExtendedRecord.newBuilder().setId("1").build(); ExtendedRecord expectedTwo = ExtendedRecord.newBuilder().setId("2").build(); ExtendedRecord expectedThree = ExtendedRecord.newBuilder().setId("3").build(); ExtendedRecord expectedFour = ExtendedRecord.newBuilder().setId("4").build(); ExtendedRecord expectedFive = ExtendedRecord.newBuilder().setId("5").build(); ExtendedRecord expectedSix = ExtendedRecord.newBuilder().setId("6").build(); writeExtendedRecords(verbatimPath1, expectedOne, expectedTwo, expectedThree); writeExtendedRecords(verbatimPath2, expectedFour, expectedFive, expectedSix); Map<String, ExtendedRecord> result = AvroReader.readRecords( "", "", ExtendedRecord.class, new Path("target/verbatim*.avro").toString()); assertMap( result, expectedOne, expectedTwo, expectedThree, expectedFour, expectedFive, expectedSix); Files.deleteIfExists(Paths.get(verbatimPath1.toString())); Files.deleteIfExists(Paths.get(verbatimPath2.toString())); }
public static <T extends Record> Map<String, T> readRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readRecords(fs, clazz, paths); }
AvroReader { public static <T extends Record> Map<String, T> readRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readRecords(fs, clazz, paths); } }
AvroReader { public static <T extends Record> Map<String, T> readRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readRecords(fs, clazz, paths); }  }
AvroReader { public static <T extends Record> Map<String, T> readRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readRecords(fs, clazz, paths); }  static Map<String, T> readUniqueRecords(
      String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path); static Map<String, T> readRecords(
      String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path); }
AvroReader { public static <T extends Record> Map<String, T> readRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readRecords(fs, clazz, paths); }  static Map<String, T> readUniqueRecords(
      String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path); static Map<String, T> readRecords(
      String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path);  }