You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2023/01/04 08:33:21 UTC
[flink-table-store] branch release-0.3 updated (eeb09ca1 -> 9cc9956c)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a change to branch release-0.3
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
from eeb09ca1 [FLINK-30522] Fix 'SHOW TBLPROPERTIES' can't read properties of table in Spark3
new 78e397fa [hotfix] fix typo in table-types
new 9cc9956c [FLINK-30389] Add retry to read hints
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/content/docs/features/table-types.md | 2 +-
.../flink/table/store/file/utils/SnapshotManager.java | 16 +++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
[flink-table-store] 02/02: [FLINK-30389] Add retry to read hints
Posted by lz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch release-0.3
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
commit 9cc9956c5bcdae3980b15b5d12bd4a5e2fcba377
Author: WencongLiu <10...@users.noreply.github.com>
AuthorDate: Wed Jan 4 16:31:51 2023 +0800
[FLINK-30389] Add retry to read hints
This closes #453
---
.../flink/table/store/file/utils/SnapshotManager.java | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java b/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java
index a7004afe..9b0f9ef3 100644
--- a/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java
+++ b/flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java
@@ -32,6 +32,7 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.Optional;
import java.util.UUID;
+import java.util.concurrent.TimeUnit;
import java.util.function.BinaryOperator;
import static org.apache.flink.table.store.file.utils.FileUtils.listVersionedFiles;
@@ -44,6 +45,8 @@ public class SnapshotManager {
private static final String SNAPSHOT_PREFIX = "snapshot-";
public static final String EARLIEST = "EARLIEST";
public static final String LATEST = "LATEST";
+ private static final int READ_HINT_RETRY_NUM = 3;
+ private static final int READ_HINT_RETRY_INTERVAL = 1;
private final Path tablePath;
@@ -214,13 +217,16 @@ public class SnapshotManager {
public Long readHint(String fileName) {
Path snapshotDir = snapshotDirectory();
Path path = new Path(snapshotDir, fileName);
- try {
- if (path.getFileSystem().exists(path)) {
+ int retryNumber = 0;
+ while (retryNumber++ < READ_HINT_RETRY_NUM) {
+ try {
return Long.parseLong(FileUtils.readFileUtf8(path));
+ } catch (Exception ignored) {
+ }
+ try {
+ TimeUnit.MILLISECONDS.sleep(READ_HINT_RETRY_INTERVAL);
+ } catch (InterruptedException ignored) {
}
- } catch (Exception e) {
- LOG.info(
- "Failed to read hint file " + fileName + ". Falling back to listing files.", e);
}
return null;
}
[flink-table-store] 01/02: [hotfix] fix typo in table-types
Posted by lz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch release-0.3
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
commit 78e397fa903535d03c2a4de4a4d7bf2de88b1353
Author: JunZhang <zh...@126.com>
AuthorDate: Wed Jan 4 13:17:06 2023 +0800
[hotfix] fix typo in table-types
This closes #455
---
docs/content/docs/features/table-types.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/content/docs/features/table-types.md b/docs/content/docs/features/table-types.md
index cd3f7aad..2826ab44 100644
--- a/docs/content/docs/features/table-types.md
+++ b/docs/content/docs/features/table-types.md
@@ -83,7 +83,7 @@ CREATE TABLE MyTable (
Field `price` will be aggregated by the `max` function, and field `sales` will be aggregated by the `sum` function. Given two input records `<1, 23.0, 15>` and `<1, 30.2, 20>`, the final result will be `<1, 30.2, 35>`.
-Current supported aggregate functions are data types are:
+Current supported aggregate functions and data types are:
* `sum`: supports DECIMAL, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT and DOUBLE.
* `min`/`max`: support DECIMAL, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DATE, TIME, TIMESTAMP and TIMESTAMP_LTZ.