File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
chunjun-clients/src/main/java/com/dtstack/chunjun/client/yarn Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 2929import org .apache .flink .client .program .ClusterClientProvider ;
3030import org .apache .flink .configuration .Configuration ;
3131import org .apache .flink .configuration .JobManagerOptions ;
32+ import org .apache .flink .configuration .MemorySize ;
3233import org .apache .flink .configuration .TaskManagerOptions ;
3334import org .apache .flink .runtime .jobgraph .JobGraph ;
3435import org .apache .flink .runtime .jobgraph .SavepointRestoreSettings ;
@@ -182,20 +183,21 @@ private ClusterSpecification createClusterSpecification(JobDeployer jobDeployer)
182183 jobManagerMemoryMb =
183184 Math .max (
184185 MIN_JM_MEMORY ,
185- ValueUtil .getInt (
186- conProp .getProperty (
187- JobManagerOptions .TOTAL_PROCESS_MEMORY .key ())));
188- jobManagerMemoryMb = jobManagerMemoryMb >> 20 ;
186+ MemorySize .parse (
187+ conProp .getProperty (
188+ JobManagerOptions .TOTAL_PROCESS_MEMORY
189+ .key ()))
190+ .getMebiBytes ());
189191 }
190192 if (conProp .containsKey (TaskManagerOptions .TOTAL_PROCESS_MEMORY .key ())) {
191193 taskManagerMemoryMb =
192194 Math .max (
193195 MIN_TM_MEMORY ,
194- ValueUtil . getInt (
195- conProp .getProperty (
196- TaskManagerOptions .TOTAL_PROCESS_MEMORY . key ())));
197-
198- taskManagerMemoryMb = taskManagerMemoryMb >> 20 ;
196+ MemorySize . parse (
197+ conProp .getProperty (
198+ TaskManagerOptions .TOTAL_PROCESS_MEMORY
199+ . key ()))
200+ . getMebiBytes ()) ;
199201 }
200202 if (conProp .containsKey (NUM_TASK_SLOTS .key ())) {
201203 slotsPerTaskManager = ValueUtil .getInt (conProp .get (NUM_TASK_SLOTS .key ()));
You can’t perform that action at this time.
0 commit comments