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

Todd Lipcon commented on MAPREDUCE-2836:
----------------------------------------

{code}
+  public final static String ALLOW_UNDECLARED_POOLS_KEY =
+    "mapred.fairscheduler.allow.undeclared.pools";   // A configuration 
property
+    // that controls the ability of submitting jobs to pools not declared in 
the
+    // scheduler allocation file.
+    private boolean allowUndeclaredPools = false;
{code}

Please convert the comment describing this variable to be a javadoc comment 
that proceeds the declaration.
Also, indentation is messed up on {{allowUndeclaredPools}}


{code}
+  private Boolean submitJob(String pool) throws IOException {
{code}
The result of this function is never used, so may as well make it {{void}}. Or, 
perhaps it should return {{boolean}} (unboxed) and then the callers should 
assert that the job was successful in testValidPoolName

{code}
+    if (pool != null)
+      conf.set(POOL_PROPERTY, pool);
{code}
Style nit: add braces

{code}
+      } catch (IOException ioe){
+        LOG.error("Problem in job submission: " + ioe);
+        throw ioe;
{code}
Would be nice if the log message here included the job ID.

{code}
+   * Subclasses can override to provide any scheduler-specific checking
+   * mechanism for job submission.
+   * @param job
+   * @return
+   * @throws IOException
{code}
No need for empty @return in the javadoc, since it's void.

{code}
+public class TestFairSchedulerPoolNames extends TestCase {
{code}
Should use JUnit 4 style test case - ie don't extend anything, then annotate 
the test methods with @Before, @After, and @Test.


Should also update src/docs/src/documentation/content/xdocs/fair_scheduler.xml 
to include the new parameter in the documentation, perhaps under the "Scheduler 
parameters in mapred-site.xml" section

> Provide option to fail jobs when submitted to non-existent pools.
> -----------------------------------------------------------------
>
>                 Key: MAPREDUCE-2836
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2836
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: contrib/fair-share
>            Reporter: Jeff Bean
>            Assignee: Ahmed Radwan
>            Priority: Minor
>         Attachments: MAPREDUCE-2836.patch, 
> MAPREDUCE-2836_0.20_security.patch, MAPREDUCE-2836_rev2.patch, 
> MAPREDUCE-2836_rev3.patch, MAPREDUCE-2836_rev4.patch, 
> MAPREDUCE-2836_rev5.patch, MAPREDUCE-2836_trunk.patch, 
> MAPREDUCE-2836_trunk_rev2.patch
>
>
> In some environments, it might be desirable to explicitly specify the fair 
> scheduler pools and to explicitly fail jobs that are not submitted to any of 
> the pools. 
> Current behavior of the fair scheduler is to submit jobs to a default pool if 
> a pool name isn't specified or to create a pool with the new name if the pool 
> name doesn't already exist. There should be a configuration option for the 
> fair scheduler that causes it to noisily fail the job if it's submitted to a 
> pool that isn't pre-specified or if the specified pool doesn't exist.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to