Skip to content

Conversation

@devmadhuu
Copy link
Contributor

@devmadhuu devmadhuu commented Mar 13, 2024

What changes were proposed in this pull request?

This PR provides the details information of all datanodes for which decommissioning is initiated.

This PR change has added two API endpoints to provide information of all datanodes for which decommissioning is initiated.

API: /api/v1/datanodes/decommission/info
Type: GET
This API provides information about all datanodes

{
        "datanodeDetails": {
            "uuid": "f04ed2ee-5d70-4e9b-88a8-d54dd59d2828",
            "hostname": "ozone-ha-datanode-1.ozone-ha_default",
            "lastHeartbeat": 0,
            "networkLocation": "/default-rack",
            "ipAddress": "192.168.208.12"
        },
        "metrics": {
            "decommissionStartTime": "13/03/2024 02:52:29 UTC",
            "numOfUnclosedPipelines": 2,
            "numOfUnderReplicatedContainers": 0.0,
            "numOfUnclosedContainers": 0.0
        },
        "containers": {
            "UnderReplicated": [],
            "UnClosed": [#6, #10, #17]
        }
    }

API: /api/v1/datanodes/decommission/info/<uuid>
Type: GET
This API provides information about a specific datanode for which decommissioning is initiated.

{
        "datanodeDetails": {
            "uuid": "f04ed2ee-5d70-4e9b-88a8-d54dd59d2828",
            "hostname": "ozone-ha-datanode-1.ozone-ha_default",
            "lastHeartbeat": 0,
            "networkLocation": "/default-rack",
            "ipAddress": "192.168.208.12"
        },
        "metrics": {
            "decommissionStartTime": "13/03/2024 02:52:29 UTC",
            "numOfUnclosedPipelines": 2,
            "numOfUnderReplicatedContainers": 0.0,
            "numOfUnclosedContainers": 0.0
        },
        "containers": {
            "UnderReplicated": [],
            "UnClosed": [#6, #10, #17]
        }
    }

Above information will be consumed by UI to display in Recon.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10514

How was this patch tested?

This patch is tested with integration test as well as APIs endpoints Junit test cases.

@devmadhuu
Copy link
Contributor Author

@dombizita @ArafatKhan2198 @sumitagrawl Kindly review.

@devmadhuu devmadhuu marked this pull request as ready for review March 15, 2024 06:20
@devmadhuu devmadhuu marked this pull request as draft March 15, 2024 16:23
@devmadhuu devmadhuu marked this pull request as ready for review March 18, 2024 07:41
@devmadhuu
Copy link
Contributor Author

This PR is dependent on #6369

@devmadhuu devmadhuu marked this pull request as draft March 18, 2024 10:27
@devmadhuu devmadhuu marked this pull request as ready for review March 18, 2024 11:56
import java.util.UUID;

/**
* This is custom jackson deserializer class for DetanodeDetails class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo here for DatanodeDetails

Suggested change
* This is custom jackson deserializer class for DetanodeDetails class.
* This is custom jackson deserializer class for DatanodeDetails class.

import java.io.IOException;

/**
* This is custom jackson serializer class for DetanodeDetails class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here too

Suggested change
* This is custom jackson serializer class for DetanodeDetails class.
* This is custom jackson serializer class for DatanodeDetails class.

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devmadhuu given few comments

@smitajoshi12
Copy link
Contributor

@devmadhuu
image

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devmadhuu Thanks for working over this, have few minor comments

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sumitagrawl sumitagrawl merged commit 6486be8 into apache:master May 19, 2024
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request May 23, 2024
errose28 added a commit to errose28/ozone that referenced this pull request May 28, 2024
…concile-cli

* HDDS-10239-container-reconciliation: (296 commits)
  HDDS-10897. Refactor OzoneQuota (apache#6714)
  HDDS-10422. Fix some warnings about exposing internal representation in hdds-common (apache#6351)
  HDDS-10899. Refactor Lease callbacks (apache#6715)
  HDDS-10890. Increase default value for hdds.container.ratis.log.appender.queue.num-elements (apache#6711)
  HDDS-10832. Client should switch to streaming based on OpenKeySession replication (apache#6683)
  HDDS-10435. Support S3 object tags for existing requests (apache#6607)
  HDDS-10883. Improve logging in Recon for finalising DN logic. (apache#6704)
  HDDS-8752. Enable TestOzoneRpcClientAbstract#testOverWriteKeyWithAndWithOutVersioning (apache#6702)
  HDDS-10875. XceiverRatisServer#getRaftPeersInPipeline should be called before XceiverRatisServer#removeGroup (apache#6696)
  HDDS-10514. Recon - Provide DN decommissioning detailed status and info inline with current CLI command output. (apache#6376)
  HDDS-10878. Bump zstd-jni to 1.5.6-3 (apache#6701)
  HDDS-10877. Bump Dropwizard metrics to 3.2.6 (apache#6699)
  HDDS-10876. Bump jackson to 2.16.2 (apache#6697)
  HDDS-6116. Remove flaky tag from TestSCMInstallSnapshot (apache#6695)
  HDDS-2643. TestOzoneDelegationTokenSecretManager#testRenewTokenFailureRenewalTime fails intermittently.
  HDDS-10699. Refactor ContainerBalancerTask and TestContainerBalancerTask (apache#6537)
  HDDS-10861. Ozone cli supports default ozone.om.service.id (apache#6680)
  HDDS-10859. Improve error messages when decommission and maintenance fail-early (apache#6678)
  HDDS-9031. Upgrade acceptance tests to Docker Compose v2 (apache#6667)
  HDDS-10559. Add a warning or a check to run repair tool as System user (apache#6574)
  ...

Conflicts:
    hadoop-ozone/dist/src/main/smoketest/admincli/container.robot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants