@Test public void uniqueExtendedRecordsTest() throws IOException { ExtendedRecord expectedOne = ExtendedRecord.newBuilder().setId("1").build(); ExtendedRecord expectedTwo = ExtendedRecord.newBuilder().setId("2").build(); ExtendedRecord expectedThree = ExtendedRecord.newBuilder().setId("3").build(); writeExtendedRecords(verbatimPath1, expectedOne, expectedTwo, expectedThree); Map<String, ExtendedRecord> result = AvroReader.readUniqueRecords("", "", ExtendedRecord.class, verbatimPath1.toString()); assertMap(result, expectedOne, expectedTwo, expectedThree); Files.deleteIfExists(Paths.get(verbatimPath1.toString())); }
public static <T extends Record> Map<String, T> readUniqueRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readUniqueRecords(fs, clazz, paths); }
AvroReader { public static <T extends Record> Map<String, T> readUniqueRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readUniqueRecords(fs, clazz, paths); } }
AvroReader { public static <T extends Record> Map<String, T> readUniqueRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readUniqueRecords(fs, clazz, paths); }  }
AvroReader { public static <T extends Record> Map<String, T> readUniqueRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readUniqueRecords(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> readUniqueRecords( String hdfsSiteConfig, String coreSiteConfig, Class<T> clazz, String path) { FileSystem fs = FsUtils.getFileSystem(hdfsSiteConfig, coreSiteConfig, path); List<Path> paths = parseWildcardPath(fs, path); return readUniqueRecords(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);  }