1
0

[HUDI-3686] Fix inline and async table service check in HoodieWriteConfig (#5307)

This commit is contained in:
Y Ethan Guo
2022-04-13 14:33:26 -07:00
committed by GitHub
parent c7f41f9018
commit bab691692e
2 changed files with 42 additions and 41 deletions

View File

@@ -2012,7 +2012,9 @@ public class HoodieWriteConfig extends HoodieConfig {
* @return True if any table services are configured to run inline, false otherwise.
*/
public Boolean areAnyTableServicesExecutedInline() {
return inlineClusteringEnabled() || inlineCompactionEnabled() || isAutoClean() || isAutoArchive();
return areTableServicesEnabled()
&& (inlineClusteringEnabled() || inlineCompactionEnabled()
|| (isAutoClean() && !isAsyncClean()) || (isAutoArchive() && !isAsyncArchive()));
}
/**
@@ -2021,9 +2023,10 @@ public class HoodieWriteConfig extends HoodieConfig {
* @return True if any table services are configured to run async, false otherwise.
*/
public Boolean areAnyTableServicesAsync() {
return isAsyncClusteringEnabled()
return areTableServicesEnabled()
&& (isAsyncClusteringEnabled()
|| (getTableType() == HoodieTableType.MERGE_ON_READ && !inlineCompactionEnabled())
|| isAsyncClean() || isAsyncArchive();
|| (isAutoClean() && isAsyncClean()) || (isAutoArchive() && isAsyncArchive()));
}
public Boolean areAnyTableServicesScheduledInline() {