You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "FangYongs (via GitHub)" <gi...@apache.org> on 2024/03/01 07:45:28 UTC
[PR] [core] Support configuring lock in paimon catalog [incubator-paimon]
FangYongs opened a new pull request, #2933:
URL: https://github.com/apache/incubator-paimon/pull/2933
### Purpose
Linked issue: close #2826
This PR aims to add lock in file system catalog
### Tests
Added test `FileSystemCatalogITCase#testCatalogWithLockForSchema`
### API and Format
no
### Documentation
no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Support configuring lock in paimon catalog [incubator-paimon]
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs merged PR #2933:
URL: https://github.com/apache/incubator-paimon/pull/2933
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Support configuring lock in paimon catalog [incubator-paimon]
Posted by "liming30 (via GitHub)" <gi...@apache.org>.
liming30 commented on code in PR #2933:
URL: https://github.com/apache/incubator-paimon/pull/2933#discussion_r1510545653
##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -694,11 +692,23 @@ public static Catalog createHiveCatalog(CatalogContext context) {
} catch (IOException e) {
throw new UncheckedIOException(e);
}
+
+ /** Hive catalog only support hive lock. */
+ if (options.getOptional(LOCK_ENABLED).orElse(false)) {
+ Optional<String> lockType = options.getOptional(LOCK_TYPE);
+ if (lockType.isPresent()) {
+ checkArgument(
+ LOCK_IDENTIFIER.equals(lockType.get()),
Review Comment:
We have abstracted `lockFactory` into `AbstractCatalog`. Do we still need such restrictions?
##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -694,11 +692,23 @@ public static Catalog createHiveCatalog(CatalogContext context) {
} catch (IOException e) {
throw new UncheckedIOException(e);
}
+
+ /** Hive catalog only support hive lock. */
+ if (options.getOptional(LOCK_ENABLED).orElse(false)) {
+ Optional<String> lockType = options.getOptional(LOCK_TYPE);
+ if (lockType.isPresent()) {
+ checkArgument(
+ LOCK_IDENTIFIER.equals(lockType.get()),
Review Comment:
At the same time, we can delete the `lockFactory` in `HiveCatalog`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Support configuring lock in paimon catalog [incubator-paimon]
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on code in PR #2933:
URL: https://github.com/apache/incubator-paimon/pull/2933#discussion_r1515495944
##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -694,11 +692,23 @@ public static Catalog createHiveCatalog(CatalogContext context) {
} catch (IOException e) {
throw new UncheckedIOException(e);
}
+
+ /** Hive catalog only support hive lock. */
+ if (options.getOptional(LOCK_ENABLED).orElse(false)) {
+ Optional<String> lockType = options.getOptional(LOCK_TYPE);
+ if (lockType.isPresent()) {
+ checkArgument(
+ LOCK_IDENTIFIER.equals(lockType.get()),
Review Comment:
I think we can set `hive` for `LOCK_TYPE` if there's no lock type in hive catalog, I will update this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org