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

Ahmed Hussein commented on HADOOP-17930:
----------------------------------------

Thanks [~bhalchandrap]  for pointing that out. This is very helpful as we could 
use it as reference.
 My approach so far in those non-guava classes is:
 * minimizing the delta changes by using the same API name. I initially went 
for {{Validate.java}}, but we changed it later to {{Preconditions.java}}.
 * not introducing dependency
 * implement the minimum necessary to cover all the calls through the hadoop 
code.
 * avoid introducing exceptions that could change the original behavior 
(illformatted strings..bla..bla).

 

> implement non-guava Precondition checkState
> -------------------------------------------
>
>                 Key: HADOOP-17930
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17930
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.4.0, 3.2.3, 3.3.2
>            Reporter: Ahmed Hussein
>            Assignee: Ahmed Hussein
>            Priority: Major
>
> As part In order to replace Guava Preconditions, we need to implement our own 
> versions of the API.
>  This Jira is to add the implementation {{checkState}} to the existing class 
> {{org.apache.hadoop.util.Preconditions}}
> +The plan is as follows+
>  * implement {{org.apache.hadoop.util.Preconditions.checkState}} with the 
> minimum set of interface used in the current hadoop repo.
>  * we can replace {{guava.Preconditions}} by 
> {{org.apache.hadoop.util.Preconditions}} once all the interfaces have been 
> implemented (both this jira and HADOOP-17929 are complete).
>  * We need the change to be easily to be backported in 3.x.
> previous jiras:
>  * HADOOP-17126 was created to implement CheckNotNull.
>  * HADOOP-17929 implementing checkArgument.
> CC: [[email protected]], [~vjasani]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to