Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

package org.apache.hudi.util;

import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.runtime.clusterframework.TaskExecutorProcessUtils;
import org.apache.hudi.client.FlinkTaskContextSupplier;
import org.apache.hudi.client.HoodieFlinkWriteClient;
import org.apache.hudi.client.common.HoodieFlinkEngineContext;
Expand Down Expand Up @@ -516,14 +514,6 @@ public static boolean haveSuccessfulCommits(HoodieTableMetaClient metaClient) {
* Returns the max compaction memory in bytes with given conf.
*/
public static long getMaxCompactionMemoryInBytes(Configuration conf) {
if (conf.contains(FlinkOptions.COMPACTION_MAX_MEMORY)) {
return conf.get(FlinkOptions.COMPACTION_MAX_MEMORY) * 1024 * 1024;
}
return (long)Math
.ceil(conf.getDouble(FlinkOptions.COMPACTION_MEMORY_FRACTION_PROP)
* TaskExecutorProcessUtils.processSpecFromConfig(
TaskExecutorProcessUtils.getConfigurationMapLegacyTaskManagerHeapSizeToConfigOption(
conf, TaskManagerOptions.TOTAL_PROCESS_MEMORY))
.getManagedMemorySize().getBytes());
return conf.getInteger(FlinkOptions.COMPACTION_MAX_MEMORY) * 1024 * 1024;
Comment thread
cuibo01 marked this conversation as resolved.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ void beforeEach() throws IOException {
this.conf = new Configuration();
this.conf.setString(FlinkOptions.PATH, tempFile.getAbsolutePath());
this.conf.setString(FlinkOptions.TABLE_NAME, "t1");
this.conf.set(FlinkOptions.COMPACTION_MAX_MEMORY, 1024);
StreamerUtil.initTableIfNotExists(this.conf);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public class TestHoodieTableSource {
void beforeEach() throws Exception {
final String path = tempFile.getAbsolutePath();
conf = TestConfigurations.getDefaultConf(path);
conf.set(FlinkOptions.COMPACTION_MAX_MEMORY, 1024);
TestData.writeData(TestData.DATA_SET_INSERT, conf);
}

Expand Down Expand Up @@ -123,7 +122,6 @@ void testGetTableAvroSchema() {
final String path = tempFile.getAbsolutePath();
conf = TestConfigurations.getDefaultConf(path);
conf.setBoolean(FlinkOptions.READ_AS_STREAMING, true);
conf.set(FlinkOptions.COMPACTION_MAX_MEMORY, 1024);

HoodieTableSource tableSource = new HoodieTableSource(
TestConfigurations.TABLE_SCHEMA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ void beforeEach(HoodieTableType tableType, Map<String, String> options) throws I
conf = TestConfigurations.getDefaultConf(tempFile.getAbsolutePath());
conf.setString(FlinkOptions.TABLE_TYPE, tableType.name());
conf.setBoolean(FlinkOptions.COMPACTION_ASYNC_ENABLED, false); // close the async compaction
conf.set(FlinkOptions.COMPACTION_MAX_MEMORY, 1024);
options.forEach((key, value) -> conf.setString(key, value));

StreamerUtil.initTableIfNotExists(conf);
Expand Down