You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2022/05/09 14:28:00 UTC

[jira] [Updated] (HDDS-6713) Avoid the need to cast to MiniOzoneHAClusterImpl

     [ https://issues.apache.org/jira/browse/HDDS-6713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Doroszlai updated HDDS-6713:
-----------------------------------
    Description: 
{{MiniOzoneHAClusterImpl.Builder}} should return HA-specific implementation to avoid forcing test cases to cast the return value.

{code:title=https://github.com/apache/ozone/blob/d9c56aec00d57a6d26b3b8ec3946e7eb93531ed0/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java#L393}
    public MiniOzoneCluster build() throws IOException {
{code}

To allow chained method calls, it should also change return type in methods inherited from the parent class, e.g.:

{code:title=https://github.com/apache/ozone/blob/d9c56aec00d57a6d26b3b8ec3946e7eb93531ed0/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java#L362}
    public Builder setClusterId(String id) {
{code}

  was:
{{MiniOzoneHAClusterImpl.Builder}} should return HA-specific implementation to avoid forcing test cases to cast the return value.

{code:title=https://github.com/apache/ozone/blob/d9c56aec00d57a6d26b3b8ec3946e7eb93531ed0/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java#L393}
    public MiniOzoneCluster build() throws IOException {
{code}

To allow chained method calls, it should also change return type in methods inherited from the parent class:

{code:title=}
    public Builder setClusterId(String id) {
{code}


> Avoid the need to cast to MiniOzoneHAClusterImpl
> ------------------------------------------------
>
>                 Key: HDDS-6713
>                 URL: https://issues.apache.org/jira/browse/HDDS-6713
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: test
>            Reporter: Attila Doroszlai
>            Priority: Major
>
> {{MiniOzoneHAClusterImpl.Builder}} should return HA-specific implementation to avoid forcing test cases to cast the return value.
> {code:title=https://github.com/apache/ozone/blob/d9c56aec00d57a6d26b3b8ec3946e7eb93531ed0/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java#L393}
>     public MiniOzoneCluster build() throws IOException {
> {code}
> To allow chained method calls, it should also change return type in methods inherited from the parent class, e.g.:
> {code:title=https://github.com/apache/ozone/blob/d9c56aec00d57a6d26b3b8ec3946e7eb93531ed0/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java#L362}
>     public Builder setClusterId(String id) {
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org