You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Andrey (JIRA)" <ji...@apache.org> on 2016/10/28 21:01:01 UTC

[jira] [Commented] (REEF-1646) Allow optional configuration in ConfigurationBuilder

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

Andrey commented on REEF-1646:
------------------------------

based on PR discussion decided to just update Config Builder code to throw better exception.
To support optional configuration JobDefinition can use EMPTY configuration as default.
this way if the configuration is not explicitly set , REEF client should be able to use it w/o additional checks for null.

> Allow optional configuration in ConfigurationBuilder
> ----------------------------------------------------
>
>                 Key: REEF-1646
>                 URL: https://issues.apache.org/jira/browse/REEF-1646
>             Project: REEF
>          Issue Type: Improvement
>          Components: REEF
>            Reporter: Andrey
>            Assignee: Andrey
>            Priority: Minor
>
> Currently ConfigurationBuilder does not seem to have any support optional configuration.
> TangImpl.NewConfigurationBuilder(params IConfiguration[]) eventually calls ConfiguraitonBuilder constructor which expects all configs to be non-null (throws Null Reference Exception otherwise)
> In IMRU scenario code generating configs (JobDefinitionBuilder) and code assembling config (ReefClient) is separated and the client code is forced to double check if configuration in job definition was provided (if that configuration is optional) .
> It would be nice to provide allow optional configurations either implicitly (by ignoring null configs) or explicitly by adding specific API (AddOptionalConfiguration) which would ignore nulls.
> if we want to keep things as is force client to do the checks, we should probably fix the constructor to throw ArgumentException instead of NullReference exception.



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