From b181a077c697033ab71063f49d2d388e0f2345ba Mon Sep 17 00:00:00 2001 From: Daniel Tu Date: Fri, 13 Dec 2024 19:14:05 -0800 Subject: [PATCH] format --- .../java/org/apache/xtable/spi/sync/ConversionTarget.java | 2 +- .../test/java/org/apache/xtable/delta/TestDeltaSync.java | 6 ++++-- .../apache/xtable/hudi/ITHudiConversionSourceTarget.java | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java b/xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java index a44dbaf58..476578cb6 100644 --- a/xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java +++ b/xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java @@ -97,7 +97,7 @@ public interface ConversionTarget { * * @param sourceIdentifier the unique identifier of the source table commit * @return an {@link Optional} containing the target commit identifier if a corresponding commit - * exists, or an empty {@link Optional} if no match is found + * exists, or an empty {@link Optional} if no match is found */ Optional getTargetCommitIdentifier(String sourceIdentifier); } diff --git a/xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSync.java b/xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSync.java index f770594ea..18108a727 100644 --- a/xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSync.java +++ b/xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSync.java @@ -166,14 +166,16 @@ public void testCreateSnapshotControlFlow() throws Exception { TableFormatSync.getInstance() .syncSnapshot(Collections.singletonList(conversionTarget), snapshot1); - Optional targetIdentifier1 = conversionTarget.getTargetCommitIdentifier(snapshot1.getSourceIdentifier()); + Optional targetIdentifier1 = + conversionTarget.getTargetCommitIdentifier(snapshot1.getSourceIdentifier()); validateDeltaTable(basePath, new HashSet<>(Arrays.asList(dataFile1, dataFile2)), null); assertTrue(targetIdentifier1.isPresent()); assertEquals("0", targetIdentifier1.get()); TableFormatSync.getInstance() .syncSnapshot(Collections.singletonList(conversionTarget), snapshot2); - Optional targetIdentifier2 = conversionTarget.getTargetCommitIdentifier(snapshot2.getSourceIdentifier()); + Optional targetIdentifier2 = + conversionTarget.getTargetCommitIdentifier(snapshot2.getSourceIdentifier()); validateDeltaTable(basePath, new HashSet<>(Arrays.asList(dataFile2, dataFile3)), null); assertTrue(targetIdentifier2.isPresent()); assertEquals("1", targetIdentifier2.get()); diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSourceTarget.java b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSourceTarget.java index 8e7235fc5..f599cf0db 100644 --- a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSourceTarget.java +++ b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSourceTarget.java @@ -392,7 +392,8 @@ CONTEXT, getHoodieWriteConfig(metaClient).getMetadataConfig(), tableBasePath, tr assertTrue(targetIdentifier5.isPresent()); // Case that return empty target identifier - Optional emptyTargetIdentifier = targetClient.getTargetCommitIdentifier("5", metaClient); + Optional emptyTargetIdentifier = + targetClient.getTargetCommitIdentifier("5", metaClient); assertFalse(emptyTargetIdentifier.isPresent()); // the first commit to the timeline should be archived