You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/07/21 02:40:26 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #9247: [HUDI-6546] Set AutoAdjustLockConfigs for flink writer config
danny0405 commented on code in PR #9247:
URL: https://github.com/apache/hudi/pull/9247#discussion_r1270172390
##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/utils/TestFlinkWriteClients.java:
##########
@@ -55,7 +57,19 @@ void testAutoSetupLockProvider() throws Exception {
conf.setBoolean(FlinkOptions.METADATA_ENABLED, true);
StreamerUtil.initTableIfNotExists(conf);
HoodieWriteConfig writeConfig = FlinkWriteClients.getHoodieClientConfig(conf, false, false);
- assertThat(writeConfig.getLockProviderClass(), is(FileSystemBasedLockProvider.class.getName()));
+ Assertions.assertTrue(writeConfig.isLockRequired());
+ assertThat(writeConfig.getLockProviderClass(), is(InProcessLockProvider.class.getName()));
+ assertThat(writeConfig.getWriteConcurrencyMode(), is(WriteConcurrencyMode.SINGLE_WRITER));
+ }
+
+ @Test
+ void testAutoSetupLockProviderWithoutTableService() throws Exception {
+ conf.setBoolean(FlinkOptions.METADATA_ENABLED, true);
+ conf.setBoolean("hoodie.table.services.enabled", false);
+ StreamerUtil.initTableIfNotExists(conf);
Review Comment:
We can not use in-progress lock for Flink, it does not work well in distributed env.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org