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

YARN-11387. [GPG] YARN GPG mistakenly deleted applicationid. #6660

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

slfan1989
Copy link
Contributor

Description of PR

JIRA: YARN-11387. [GPG] YARN GPG mistakenly deleted applicationid.

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 18m 5s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 43m 38s trunk passed
+1 💚 compile 0m 27s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 26s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 27s trunk passed
+1 💚 mvnsite 0m 32s trunk passed
+1 💚 javadoc 0m 34s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 28s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 47s trunk passed
+1 💚 shadedclient 33m 3s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 20s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 20s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 14s the patch passed
+1 💚 mvnsite 0m 20s the patch passed
+1 💚 javadoc 0m 20s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 19s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 46s the patch passed
+1 💚 shadedclient 32m 50s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 1s hadoop-yarn-server-globalpolicygenerator in the patch passed.
+1 💚 asflicense 0m 37s The patch does not generate ASF License warnings.
140m 49s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/1/artifact/out/Dockerfile
GITHUB PR #6660
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 45f6a5950e77 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 2b20847
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/1/testReport/
Max. process+thread count 558 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@@ -46,47 +45,38 @@ public void run() {
LOG.info("Application cleaner run at time {}", now);

FederationStateStoreFacade facade = getGPGContext().getStateStoreFacade();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Step 1: Retrieve all applications stored in the StateStore, which represents all applications submitted to the Router.
Step 2: Use the Router's REST API to fetch all running tasks. This API will invoke applications from all active SubClusters.
Step 3: Compare the results of Step1 and Step2 to identify applications that exist in Step1 but not in Step2. Delete these applications.

There is a potential issue with this approach. If a particular SubCluster is undergoing maintenance, such as RM restart, Step2 will not be able to fetch the complete list of running applications. As a result, during the comparison in Step3, there is a risk of mistakenly deleting applications that are still running.

We have three SubClusters: subClusterA, subClusterB, and subClusterC, with an equal allocation ratio of 1:1:1.

We submit six applications through routerA.

app1 and app2 are allocated to subClusterA
app3 and app4 to subClusterB
app5 and app6 to subClusterC.
Among these, app1, app3, and app5 have completed their execution, and we expect to retain app2, app4, and app6 in the StateStore.

In the normal scenario:

Comparing the steps mentioned above:

Step 1: We will retrieve six applications [app1, app2, app3, app4, app5, app6] from the StateStore.
Step 2: We will fetch three applications [app2, app4, app6] from the Router's REST interface.
Step 3: By comparing Step 1 and Step 2, we can identify that applications [app1, app3, app5] should be deleted.

In the exceptional scenario:

Comparing the steps mentioned above:

Step 1: We will retrieve six applications [app1, app2, app3, app4, app5, app6] from the StateStore.
Step 2: We will fetch the list of running applications from the Router's REST interface. However, due to maintenance in subClusterB and subClusterC, we can only obtain the applications running in subClusterA [app2].
Step 3: By comparing Step 1 and Step 3, we can identify that applications [app1, app3, app4, app5, app6] should be deleted.

In this case, we had an error deletion.

@slfan1989
Copy link
Contributor Author

@goiri Can you help review this PR? Thank you very much!

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 57s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 45m 52s trunk passed
+1 💚 compile 0m 27s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 24s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 25s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 javadoc 0m 32s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 24s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 46s trunk passed
+1 💚 shadedclient 36m 5s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 19s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 18s the patch passed
+1 💚 compile 0m 17s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 17s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 13s the patch passed
+1 💚 mvnsite 0m 19s the patch passed
+1 💚 javadoc 0m 18s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 18s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 44s the patch passed
+1 💚 shadedclient 35m 28s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 58s hadoop-yarn-server-globalpolicygenerator in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
131m 22s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/2/artifact/out/Dockerfile
GITHUB PR #6660
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 0d8fa992c681 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 729bac3
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/2/testReport/
Max. process+thread count 557 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6660/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor Author

@goiri Can you help review this PR? Thank you very much!

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 97m 37s trunk passed
+1 💚 compile 4m 48s trunk passed
+1 💚 checkstyle 4m 45s trunk passed
+1 💚 mvnsite 4m 48s trunk passed
+1 💚 javadoc 4m 52s trunk passed
+1 💚 shadedclient 158m 18s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 22s the patch passed
+1 💚 compile 2m 08s the patch passed
+1 💚 javac 2m 08s the patch passed
+1 💚 blanks 0m 00s The patch has no blanks issues.
+1 💚 checkstyle 2m 03s the patch passed
+1 💚 mvnsite 2m 16s the patch passed
+1 💚 javadoc 2m 06s the patch passed
+1 💚 shadedclient 169m 47s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 43s The patch does not generate ASF License warnings.
448m 46s
Subsystem Report/Notes
GITHUB PR #6660
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 21b7d79e94d7 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / 729bac3
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6660/1/testReport/
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6660/1/console
versions git=2.44.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@myandpr
Copy link
Contributor

myandpr commented Nov 10, 2024

LGTM.

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.

3 participants