Skip to content

Conversation

@payert
Copy link

@payert payert commented Oct 12, 2020

What changes were proposed in this pull request?

The data migration code only looks for the metrics that are present in the whitelist file. This is true even in the case when the AMS Whitelisting is not enabled. The user will only have those metrics migrated that are present in the whitelist file, which is usually not all that are required.

The proposed change no 1:

  • If whitelist file parameter is provided then
    • migrate only the metrics that are in the whitelist file
  • if whitelist file parameter is not provided then
    • if whitelisting is enabled then
      • discover the whitelist file configured in AMS and
        migrate only the metrics that are in the whitelist file
    • if whitelisting is disabled then
      • migrate all the metrics present in the database

The proposed change no 2:
Furthermore, the migration process frequently dies silently while saving the metadata. To fix this, the change suggests removing the initiating of saving metadata from the shutdown hook and call it "normally" in a finally block.

The proposed change no 3:
Code cleanup.

How was this patch tested?

The patch was tested by manual data migrations.

Change-Id: I5754c9187a8786e9a3e2ae753174519b46777d45
@payert payert requested a review from aonishuk October 13, 2020 09:42
@payert
Copy link
Author

payert commented Oct 13, 2020

@sziszo Could you please review this PR ? Thx!

Change-Id: Id042aaa2d5d47107ba2629af1c40105600f2f0df
@payert payert merged commit 0817311 into apache:branch-2.7 Oct 20, 2020
@payert payert deleted the AMBARI-25569-branch-2.7 branch October 30, 2020 12:49
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.

1 participant