[ 
https://issues.apache.org/jira/browse/YARN-11561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791655#comment-17791655
 ] 

ASF GitHub Bot commented on YARN-11561:
---------------------------------------

slfan1989 commented on code in PR #6300:
URL: https://github.com/apache/hadoop/pull/6300#discussion_r1410751816


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator/src/main/java/org/apache/hadoop/yarn/server/globalpolicygenerator/GlobalPolicyGenerator.java:
##########
@@ -366,4 +365,15 @@ public WebApp getWebApp() {
   private static void printUsage(PrintStream out) {
     out.println("Usage: yarn gpg [-format-policy-store]");
   }
+
+  private static void handFormatPolicyStateStore(Configuration conf) {
+    try {
+      System.out.println("Deleting Federation policy state store.");
+      FederationStateStoreFacade facade = 
FederationStateStoreFacade.getInstance(conf);
+      System.out.println("Federation policy state store has been cleaned.");
+      facade.deleteAllPoliciesConfigurations();
+    } catch (Exception e) {
+      System.err.println("Delete Federation policy state store error, 
exception = " + e);

Review Comment:
   Thanks for your suggestion!  We should use `LOG`. I will improve this part 
of the code.





> [Federation] GPG Supports Format PolicyStateStore.
> --------------------------------------------------
>
>                 Key: YARN-11561
>                 URL: https://issues.apache.org/jira/browse/YARN-11561
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: federation
>    Affects Versions: 3.4.0
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to