Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-15198][Deployment / Mesos] remove mesos.resourcemanager.tasks.mem #10890

Closed

Conversation

PengTaoWW
Copy link

@PengTaoWW PengTaoWW commented Jan 17, 2020

fix https://issues.apache.org/jira/projects/FLINK/issues/FLINK-15198

What is the purpose of the change

In FLINK-15082, we deprecated 'mesos.resourcemanager.tasks.mem' in favour of the new unified option 'taskmanager.memory.total-process.size' from FLIP-49. We should remove it now in 1.11.
https://issues.apache.org/jira/projects/FLINK/issues/FLINK-15198?filter=allopenissues

Brief change log

modified the code and deleted the part that used 'mesos.resourcemanager.tasks.mem' in the code

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 17, 2020

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 1587714 (Fri Feb 28 21:49:11 UTC 2020)

✅no warnings

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 17, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@KarmaGYZ KarmaGYZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @PengTaoWW . However, I think you could not just change the key to the MESOS_RM_TASKS_MEMORY_MB. You need to provide another solution.

@@ -64,7 +64,7 @@
*/
@Deprecated
public static final ConfigOption<Integer> MESOS_RM_TASKS_MEMORY_MB =
key("mesos.resourcemanager.tasks.mem")
key("taskmanager.memory.total-process.size")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could not simply change the key.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from https://github.com/apache/flink/pull/10513/files#r356585015, just need to delete the code and comments that use MEMOS_RM_TASKS_MEMORY_MB?

@PengTaoWW
Copy link
Author

@KarmaGYZ I modified the code and deleted the part that used 'mesos.resourcemanager.tasks.mem' in the code。

@PengTaoWW
Copy link
Author

@flinkbot run travis

@@ -303,7 +303,7 @@
"-Djobmanager.rpc.address=$(hostname -f)"
"-Djobmanager.rpc.port=6123"
"-Dmesos.resourcemanager.tasks.cpus=1"
"-Dmesos.resourcemanager.tasks.mem=2048" ;; FLINK-15082: this option must be set instead of taskmanager.memory.process.size
"-Dtaskmanager.memory.process.size=2048m" ;; FLINK-15082: this option must be set instead of taskmanager.memory.process.size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this note could be removed after this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me fix it

if (configuration.contains(MESOS_RM_TASKS_MEMORY_MB) &&
configuration.contains(TaskManagerOptions.TOTAL_PROCESS_MEMORY) &&
!legacyTotalProcessMemory.equals(unifiedTotalProcessMemory)) {
if (!configuration.contains(TaskManagerOptions.TOTAL_PROCESS_MEMORY)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that the total process memory should be explicitly set here. According to the FLIP-49 Doc. User need either of these three options configured:

  • Task Heap Memory and Managed Memory
  • Total Flink Memory
  • Total Process Memory

After this PR, I think we could directly construct the TaskExecutorResourceSpec from the flinkConfig. @azagrebin Please correct me if I have any misunderstanding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, we do not need this method getTotalProcessMemory anymore.
TaskExecutorProcessUtils will parse the options in createContaineredTaskManagerParameters.
Subsequently, we do not need .withTotalProcessMemory(totalProcessMemory) in createContaineredTaskManagerParameters.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove .withTotalProcessMemory (totalProcessMemory) in createContaineredTaskManagerParameters and delete the getTotalProcessMemory method

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azagrebin Already modified

@PengTaoWW PengTaoWW force-pushed the removeMesosResourceManagerTasksMem branch from fbce565 to 0ec632d Compare January 22, 2020 07:54
@PengTaoWW
Copy link
Author

@flinkbot run travis

1 similar comment
@PengTaoWW
Copy link
Author

@flinkbot run travis

@azagrebin azagrebin force-pushed the removeMesosResourceManagerTasksMem branch from f683466 to 7c3dadd Compare February 25, 2020 09:50
@azagrebin
Copy link
Contributor

@PengTaoWW
We usually use git rebase on master instead of merge to fetch changes from master into PR.
I have done this for now, squashed the commits and force-pushed it into your branch.
Just for note, you will have to remove your branch locally and checkout it again from the updated remote one to work on this further.

Copy link
Contributor

@azagrebin azagrebin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @ptmagic !
I agree with @KarmaGYZ on his comment and added more thoughts there.
This comment has to be addressed before merging.
Otherwise, it looks good.

if (configuration.contains(MESOS_RM_TASKS_MEMORY_MB) &&
configuration.contains(TaskManagerOptions.TOTAL_PROCESS_MEMORY) &&
!legacyTotalProcessMemory.equals(unifiedTotalProcessMemory)) {
if (!configuration.contains(TaskManagerOptions.TOTAL_PROCESS_MEMORY)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, we do not need this method getTotalProcessMemory anymore.
TaskExecutorProcessUtils will parse the options in createContaineredTaskManagerParameters.
Subsequently, we do not need .withTotalProcessMemory(totalProcessMemory) in createContaineredTaskManagerParameters.

@PengTaoWW
Copy link
Author

@flinkbot run travis

fix https://issues.apache.org/jira/projects/FLINK/issues/FLINK-15198

Delete getTotalProcessMemory

remove .withTotalProcessMemory (totalProcessMemory) in createContaineredTaskManagerParameters and delete the getTotalProcessMemory method
@PengTaoWW PengTaoWW force-pushed the removeMesosResourceManagerTasksMem branch from 1c28ae3 to f5282a9 Compare February 26, 2020 11:55
@PengTaoWW
Copy link
Author

@flinkbot run travis

Copy link
Contributor

@azagrebin azagrebin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments @PengTaoWW , LGTM
I also pushed a small migration doc fix

Copy link
Contributor

@KarmaGYZ KarmaGYZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. @PengTaoWW . It generally LGTM. Just two minor comments.

@@ -134,7 +134,7 @@ but they still have the same semantics for the job manager process. See also [ho
The previous options which were responsible for the total memory used by Flink are `taskmanager.heap.size` or `taskmanager.heap.mb`.
Despite their naming, they included not only JVM heap but also other off-heap memory components. The options have been deprecated.

The Mesos integration also had a separate option with the same semantics: `mesos.resourcemanager.tasks.mem` which has also been deprecated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove this line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is a migration guide from Flink <= 1.9, the option always was in Flink <= 1.9, so I think it is still worth mentioning it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. +1 to merge this PR.

@@ -134,7 +134,7 @@ but they still have the same semantics for the job manager process. See also [ho
The previous options which were responsible for the total memory used by Flink are `taskmanager.heap.size` or `taskmanager.heap.mb`.
Despite their naming, they included not only JVM heap but also other off-heap memory components. The options have been deprecated.

The Mesos integration also had a separate option with the same semantics: `mesos.resourcemanager.tasks.mem` which has also been deprecated.
The Mesos integration also had a separate option with the same semantics: `mesos.resourcemanager.tasks.mem` which has also been removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@azagrebin azagrebin closed this in a8bb211 Feb 27, 2020
@ptmagic
Copy link
Contributor

ptmagic commented Feb 27, 2020

Thank you for your help, I will continue to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants