[HUDI-2559] Converting commit timestamp format to millisecs (#4024)
- Adds support for generating commit timestamps with millisecs granularity. - Older commit timestamps (in secs granularity) will be suffixed with 999 and parsed with millisecs format.
This commit is contained in:
committed by
GitHub
parent
89452063b4
commit
fc9ca6a07a
@@ -80,8 +80,9 @@ public class TestStreamerUtil {
|
||||
void testMedianInstantTime() {
|
||||
String higher = "20210705125921";
|
||||
String lower = "20210705125806";
|
||||
String expectedMedianInstant = "20210705125844499";
|
||||
String median1 = StreamerUtil.medianInstantTime(higher, lower).get();
|
||||
assertThat(median1, is("20210705125843"));
|
||||
assertThat(median1, is(expectedMedianInstant));
|
||||
// test symmetry
|
||||
assertThrows(IllegalArgumentException.class,
|
||||
() -> StreamerUtil.medianInstantTime(lower, higher),
|
||||
|
||||
Reference in New Issue
Block a user