You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Varun Vasudev (JIRA)" <ji...@apache.org> on 2016/07/21 09:52:20 UTC

[jira] [Commented] (YARN-3664) Federation PolicyStore APIs

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

Varun Vasudev commented on YARN-3664:
-------------------------------------

Thanks for the patch [~subru]! Some feedback -

1)
{code}
+  public FederationPolicyConfigurationGetResponse getPolicyConfigurationForQueue(
+      FederationPolicyConfigurationGetRequest request) throws YarnException;
{code}
Rename getPolicyConfigurationForQueue to getPolicyConfiguration

2)
{code}
+  public FederationPolicyConfigurationSetResponse setPolicyConfigurationForQueue(
+      FederationPolicyConfigurationSetRequest request) throws YarnException;
{code}
Rename setPolicyConfigurationForQueue to setPolicyConfiguration

3)
{code}
+  public Map<String, FederationPolicyConfiguration> getAllPolicies()
+      throws YarnException;
{code}
Rename getAllPolicies to getPoliciesConfigurations and the function should accept a GetPoliciesConfigurationsRequest and return a GetPoliciesConfigurationsResponse

4)
In FederationPolicyConfiguration, add an override for hashCode as well

5)
{code}
+  public abstract ByteBuffer getParams();
{code}
Can we use something other than ByteBuffer for getParams - this'll become a problem if you ever expose this information via REST API or wish to update the object via a REST API(marshalling/unmarshalling ByteBuffer can be painful)

6)
Rename FederationPolicyConfigurationGetRequest to GetFederationPolicyConfigurationRequest

7)
Rename FederationPolicyConfigurationGetResponse to GetFederationPolicyConfigurationResponse

8)
{code}
+  @Public
+  @Unstable
+  public abstract FederationPolicyConfiguration getPolicy();
+
+  /**
+   * Sets the policy configuration.
+   *
+   * @param policy the policy configuration for the specified queue
+   */
+  @Private
+  @Unstable
+  public abstract void setPolicy(FederationPolicyConfiguration policy);
+
+}
{code}
Rename getPolicy and setPolicy to getPolicyConfiguration and setPolicyConfiguration

9)
Rename FederationPolicyConfigurationSetRequest to SetFederationPolicyConfigurationRequest

10)
{code}
+  /**
+   * Get the policy configuration assigned to the queue.
+   *
+   * @return the policy for the specified queue
+   */
+  @Public
+  @Unstable
+  public abstract FederationPolicyConfiguration getPolicy();
+
+  /**
+   * Set the policy configuration for the queue.
+   *
+   * @param policy the policy for the specified queue
+   */
+  @Private
+  @Unstable
+  public abstract void setPolicy(FederationPolicyConfiguration policy);
{code}
Rename getPolicy and setPolicy to getPolicyConfiguration and setPolicyConfiguration

11)
Rename FederationPolicyConfigurationSetResponse to SetFederationPolicyConfigurationResponse


> Federation PolicyStore APIs
> ---------------------------
>
>                 Key: YARN-3664
>                 URL: https://issues.apache.org/jira/browse/YARN-3664
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Subru Krishnan
>            Assignee: Subru Krishnan
>         Attachments: YARN-3664-YARN-2915-v0.patch, YARN-3664-YARN-2915-v1.patch
>
>
> The federation Policy Store contains information about the capacity allocations made by users, their mapping to sub-clusters and the policies that each of the components (Router, AMRMPRoxy, RMs) should enforce



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org