[
https://issues.apache.org/jira/browse/TEZ-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17021623#comment-17021623
]
László Bodor edited comment on TEZ-4101 at 1/22/20 11:46 PM:
-------------------------------------------------------------
actually, there are very many occurrences of checkState/checkArgument, you just
cannot see them in this patch as I haven't changed the classname
Preconditions...so I'll go with encapsulating
{code}
grep -iRH "Preconditions.checkState" --include "*.java" | wc -l
207
grep -iRH "Preconditions.checkArgument" --include "*.java" | wc -l
286
{code}
2 separate files are because tez-common depends on tez-api, so I haven't had
the chance two put this only into tez-common...maybe I would go with this
duplicate now and create a separate issue for creating a real common module,
which would not depend on others
was (Author: abstractdog):
actually, there are very many occurrences of checkState/checkArgument, you just
cannot see them in this patch as I haven't changed the classname
Preconditions...so I'll go this encapsulating
{code}
grep -iRH "Preconditions.checkState" --include "*.java" | wc -l
207
grep -iRH "Preconditions.checkArgument" --include "*.java" | wc -l
286
{code}
2 separate files are because tez-common depends on tez-api, so I haven't had
the chance two put this only into tez-common...maybe I would go with this
duplicate now and create a separate issue for creating a real common module,
which would not depend on others
> Eliminate some guava dependencies by Java8+ features - Preconditions
> --------------------------------------------------------------------
>
> Key: TEZ-4101
> URL: https://issues.apache.org/jira/browse/TEZ-4101
> Project: Apache Tez
> Issue Type: Improvement
> Reporter: László Bodor
> Assignee: László Bodor
> Priority: Major
> Attachments: TEZ-4101.01.patch, TEZ-4101.02.patch, TEZ-4101.03.patch
>
>
> 1. Preconditions.checkNotNull -> Objects.requireNonNull
> 2. wrap others into a tez common class
--
This message was sent by Atlassian Jira
(v8.3.4#803005)