You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/31 11:29:01 UTC

[jira] [Commented] (FLINK-6189) Do not use yarn client config to do sanity check

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

ASF GitHub Bot commented on FLINK-6189:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3614#discussion_r130315320
  
    --- Diff: flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java ---
    @@ -51,57 +51,23 @@ public void beforeTest() throws IOException {
     	}
     
     	@Test
    -	public void testFailIfTaskSlotsHigherThanMaxVcores() {
    -
    -		YarnClusterDescriptor clusterDescriptor = new YarnClusterDescriptor();
    -
    -		clusterDescriptor.setLocalJarPath(new Path(flinkJar.getPath()));
    -		clusterDescriptor.setFlinkConfiguration(new Configuration());
    -		clusterDescriptor.setConfigurationDirectory(temporaryFolder.getRoot().getAbsolutePath());
    -		clusterDescriptor.setConfigurationFilePath(new Path(flinkConf.getPath()));
    -
    -		// configure slots too high
    -		clusterDescriptor.setTaskManagerSlots(Integer.MAX_VALUE);
    -
    -		try {
    -			clusterDescriptor.deploy();
    -
    -			fail("The deploy call should have failed.");
    -		} catch (RuntimeException e) {
    -			// we expect the cause to be an IllegalConfigurationException
    -			if (!(e.getCause() instanceof IllegalConfigurationException)) {
    -				throw e;
    -			}
    -		}
    -	}
    -
    -	@Test
     	public void testConfigOverwrite() {
     
     		YarnClusterDescriptor clusterDescriptor = new YarnClusterDescriptor();
     
     		Configuration configuration = new Configuration();
    -		// overwrite vcores in config
    +		// configure slots in config
     		configuration.setInteger(ConfigConstants.YARN_VCORES, Integer.MAX_VALUE);
     
     		clusterDescriptor.setLocalJarPath(new Path(flinkJar.getPath()));
     		clusterDescriptor.setFlinkConfiguration(configuration);
     		clusterDescriptor.setConfigurationDirectory(temporaryFolder.getRoot().getAbsolutePath());
     		clusterDescriptor.setConfigurationFilePath(new Path(flinkConf.getPath()));
     
    -		// configure slots
    +		// overwrite vcores
    --- End diff --
    
    The comment does not match the following statement


> Do not use yarn client config to do sanity check
> ------------------------------------------------
>
>                 Key: FLINK-6189
>                 URL: https://issues.apache.org/jira/browse/FLINK-6189
>             Project: Flink
>          Issue Type: Sub-task
>          Components: YARN
>            Reporter: Tao Wang
>            Assignee: Tao Wang
>
> Now in client, if #slots is greater than then number of "yarn.nodemanager.resource.cpu-vcores" in yarn client config, the submission will be rejected.
> It makes no sense as the actual vcores of node manager is decided in cluster side, but not in client side. If we don't set the config or don't set the right value of it(indeed this config is not a mandatory), it should not affect flink submission.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)