@Test public void testRowCreateHandle() throws IOException { HoodieWriteConfig cfg = SparkDatasetTestUtils.getConfigBuilder(basePath).build(); HoodieTable table = HoodieSparkTable.create(cfg, context, metaClient); List<String> fileNames = new ArrayList<>(); List<String> fileAbsPaths = new ArrayList<>(); Dataset<Row> totalInputRows = null; for (int i = 0; i < 5; i++) { String partitionPath = HoodieTestDataGenerator.DEFAULT_PARTITION_PATHS[i % 3]; String fileId = UUID.randomUUID().toString(); String instantTime = "000"; HoodieRowCreateHandle handle = new HoodieRowCreateHandle(table, cfg, partitionPath, fileId, instantTime, RANDOM.nextInt(100000), RANDOM.nextLong(), RANDOM.nextLong(), SparkDatasetTestUtils.STRUCT_TYPE); int size = 10 + RANDOM.nextInt(1000); Dataset<Row> inputRows = SparkDatasetTestUtils.getRandomRows(sqlContext, size, partitionPath, false); if (totalInputRows == null) { totalInputRows = inputRows; } else { totalInputRows = totalInputRows.union(inputRows); } HoodieInternalWriteStatus writeStatus = writeAndGetWriteStatus(inputRows, handle); fileAbsPaths.add(basePath + "/" + writeStatus.getStat().getPath()); fileNames.add(handle.getFileName()); assertOutput(writeStatus, size, fileId, partitionPath, instantTime, totalInputRows, fileNames, fileAbsPaths); } }
public String getFileName() { return path.getName(); }
HoodieRowCreateHandle implements Serializable { public String getFileName() { return path.getName(); } }
HoodieRowCreateHandle implements Serializable { public String getFileName() { return path.getName(); } HoodieRowCreateHandle(HoodieTable table, HoodieWriteConfig writeConfig, String partitionPath, String fileId,
      String instantTime, int taskPartitionId, long taskId, long taskEpochId,
      StructType structType); }
HoodieRowCreateHandle implements Serializable { public String getFileName() { return path.getName(); } HoodieRowCreateHandle(HoodieTable table, HoodieWriteConfig writeConfig, String partitionPath, String fileId,
      String instantTime, int taskPartitionId, long taskId, long taskEpochId,
      StructType structType); void write(InternalRow record); boolean canWrite(); HoodieInternalWriteStatus close(); String getFileName(); }
HoodieRowCreateHandle implements Serializable { public String getFileName() { return path.getName(); } HoodieRowCreateHandle(HoodieTable table, HoodieWriteConfig writeConfig, String partitionPath, String fileId,
      String instantTime, int taskPartitionId, long taskId, long taskEpochId,
      StructType structType); void write(InternalRow record); boolean canWrite(); HoodieInternalWriteStatus close(); String getFileName();  }