@Test public void testWrite() throws IOException { DataOutput out = mock(DataOutput.class); doNothing().when(out).writeByte(anyInt()); doNothing().when(out).writeInt(anyInt()); doNothing().when(out).write(any(byte[].class), anyInt(), anyInt()); doNothing().when(out).write(any(byte[].class)); split.write(out); InOrder inorder = inOrder(out); inorder.verify(out, times(1)).writeByte(eq(fileSplitName.length())); inorder.verify(out, times(1)).write(aryEq(Text.encode(fileSplitName).array()), eq(0), eq(fileSplitName.length())); inorder.verify(out, times(1)).writeInt(eq(basePath.length())); inorder.verify(out, times(1)).write(aryEq(basePath.getBytes(StandardCharsets.UTF_8))); inorder.verify(out, times(1)).writeInt(eq(maxCommitTime.length())); inorder.verify(out, times(1)).write(aryEq(maxCommitTime.getBytes(StandardCharsets.UTF_8))); inorder.verify(out, times(1)).writeInt(eq(deltaLogPaths.size())); inorder.verify(out, times(1)).writeInt(eq(deltaLogPaths.get(0).length())); inorder.verify(out, times(1)).write(aryEq(deltaLogPaths.get(0).getBytes(StandardCharsets.UTF_8))); inorder.verifyNoMoreInteractions(); }
@Override public void write(DataOutput out) throws IOException { super.write(out); writeToOutput(out); }
HoodieRealtimeFileSplit extends FileSplit implements RealtimeSplit { @Override public void write(DataOutput out) throws IOException { super.write(out); writeToOutput(out); } }
HoodieRealtimeFileSplit extends FileSplit implements RealtimeSplit { @Override public void write(DataOutput out) throws IOException { super.write(out); writeToOutput(out); } HoodieRealtimeFileSplit();  HoodieRealtimeFileSplit(FileSplit baseSplit, String basePath, List<String> deltaLogPaths, String maxCommitTime); }
HoodieRealtimeFileSplit extends FileSplit implements RealtimeSplit { @Override public void write(DataOutput out) throws IOException { super.write(out); writeToOutput(out); } HoodieRealtimeFileSplit();  HoodieRealtimeFileSplit(FileSplit baseSplit, String basePath, List<String> deltaLogPaths, String maxCommitTime); List<String> getDeltaLogPaths(); String getMaxCommitTime(); String getBasePath(); void setDeltaLogPaths(List<String> deltaLogPaths); void setMaxCommitTime(String maxCommitTime); void setBasePath(String basePath); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override String toString(); }
HoodieRealtimeFileSplit extends FileSplit implements RealtimeSplit { @Override public void write(DataOutput out) throws IOException { super.write(out); writeToOutput(out); } HoodieRealtimeFileSplit();  HoodieRealtimeFileSplit(FileSplit baseSplit, String basePath, List<String> deltaLogPaths, String maxCommitTime); List<String> getDeltaLogPaths(); String getMaxCommitTime(); String getBasePath(); void setDeltaLogPaths(List<String> deltaLogPaths); void setMaxCommitTime(String maxCommitTime); void setBasePath(String basePath); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override String toString();  }