From ba690d63ba4a42be228f535e1ba99f864f4a530d Mon Sep 17 00:00:00 2001 From: yantian Date: Thu, 19 Dec 2024 17:50:38 +0800 Subject: [PATCH] fix checkstyle error --- .../flink/sink/cdc/CdcRecordStoreMultiWriteOperator.java | 3 ++- .../apache/paimon/flink/action/CompactDatabaseAction.java | 4 +++- .../org/apache/paimon/flink/clone/CopyFileOperator.java | 6 ++++-- .../flink/source/operator/CombinedUnawareBatchSource.java | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/sink/cdc/CdcRecordStoreMultiWriteOperator.java b/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/sink/cdc/CdcRecordStoreMultiWriteOperator.java index 75c2d69894f2..002bff10b057 100644 --- a/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/sink/cdc/CdcRecordStoreMultiWriteOperator.java +++ b/paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/sink/cdc/CdcRecordStoreMultiWriteOperator.java @@ -178,7 +178,8 @@ public void processElement(StreamRecord element) throws Exce } } - private FileStoreTable getTable(Identifier tableId) throws InterruptedException, Catalog.TableNoPermissionException { + private FileStoreTable getTable(Identifier tableId) + throws InterruptedException, Catalog.TableNoPermissionException { FileStoreTable table = tables.get(tableId); if (table == null) { while (true) { diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java index c527e1261dc6..fc3109d9f349 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/CompactDatabaseAction.java @@ -177,7 +177,9 @@ private void buildForDividedMode() { } } } - } catch (Catalog.DatabaseNotExistException | Catalog.TableNotExistException | Catalog.TableNoPermissionException e) { + } catch (Catalog.DatabaseNotExistException + | Catalog.TableNotExistException + | Catalog.TableNoPermissionException e) { throw new RuntimeException(e); } diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/clone/CopyFileOperator.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/clone/CopyFileOperator.java index 6f6c2e8d3511..1a6be73f3886 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/clone/CopyFileOperator.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/clone/CopyFileOperator.java @@ -82,7 +82,8 @@ public void processElement(StreamRecord streamRecord) throws Exce try { return pathOfTable( sourceCatalog.getTable(Identifier.fromString(key))); - } catch (Catalog.TableNotExistException | Catalog.TableNoPermissionException e) { + } catch (Catalog.TableNotExistException + | Catalog.TableNoPermissionException e) { throw new RuntimeException(e); } }); @@ -93,7 +94,8 @@ public void processElement(StreamRecord streamRecord) throws Exce try { return pathOfTable( targetCatalog.getTable(Identifier.fromString(key))); - } catch (Catalog.TableNotExistException | Catalog.TableNoPermissionException e) { + } catch (Catalog.TableNotExistException + | Catalog.TableNoPermissionException e) { throw new RuntimeException(e); } }); diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/operator/CombinedUnawareBatchSource.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/operator/CombinedUnawareBatchSource.java index 01a231469e9f..779144caeb6d 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/operator/CombinedUnawareBatchSource.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/operator/CombinedUnawareBatchSource.java @@ -178,9 +178,9 @@ private static Long getPartitionInfo( PartitionEntry::lastFileCreationTime)); multiTablesPartitionInfo.put(tableIdentifier, partitionInfo); } catch (Catalog.TableNotExistException e) { - LOGGER.error(String.format("table: %s not found.", tableIdentifier.getFullName())); + LOGGER.error("table: {} not found.", tableIdentifier.getFullName()); } catch (Catalog.TableNoPermissionException e) { - LOGGER.error(String.format("table: %s no permission.", tableIdentifier.getFullName())); + LOGGER.error("table: {} no permission.", tableIdentifier.getFullName()); } } return partitionInfo.get(partition);