com.cloudera.api.v3
Interface CmPeersResource

All Known Subinterfaces:
CmPeersResourceV11

public interface CmPeersResource


Method Summary
 ApiCmPeer createPeer(ApiCmPeer peer)
          Create a new Cloudera Manager peer.
 ApiCmPeer deletePeer(String peerName)
          Delete Cloudera Manager peer.
 ApiCmPeerList listPeers()
          Retrieves all configured Cloudera Manager peers.
 ApiCmPeer readPeer(String peerName)
          Fetch information about an existing Cloudera Manager peer.
 ApiCommand testPeer(String peerName)
          Test the connectivity of a peer.
 ApiCmPeer updatePeer(String peerName, ApiCmPeer peer)
          Update information for a Cloudera Manager peer.
 

Method Detail

listPeers

@Path(value="/")
ApiCmPeerList listPeers()
Retrieves all configured Cloudera Manager peers.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

When accessed via API version before v11, only REPLICATION type peers will be returned.

Returns:
List of Cloudera Manager peers.

createPeer

@Path(value="/")
ApiCmPeer createPeer(ApiCmPeer peer)
Create a new Cloudera Manager peer.

The remote server will be contacted so that a user can be created for use by the new peer. The username and password properties of the provided peer object should contain credentials of a valid admin user on the remote server. A timeout of 10 seconds is enforced when contacting the remote server.

It is recommended to run the remote server with TLS enabled, since creating and using peers involve transferring credentials over the network.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Type field in ApiCmPeer is available since API v11. if not specified when making createPeer() call, 'REPLICATION' type peer will be created.

Parameters:
peer - Peer to create (see above).
Returns:
Information about the created peer.

readPeer

@Path(value="/{peerName}")
ApiCmPeer readPeer(String peerName)
Fetch information about an existing Cloudera Manager peer.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Parameters:
peerName - Name of peer to retrieve.
Returns:
Peer information.

deletePeer

@Path(value="/{peerName}")
ApiCmPeer deletePeer(String peerName)
Delete Cloudera Manager peer.

An attempt will be made to contact the peer server, so that the configured user can be deleted.. Errors while contacting the remote server are non-fatal.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Parameters:
peerName - Name of peer to delete.
Returns:
Information about the deleted peer.

updatePeer

@Path(value="/{peerName}")
ApiCmPeer updatePeer(String peerName,
                          ApiCmPeer peer)
Update information for a Cloudera Manager peer.

In administrator credentials are provided in the peer information, they will be used to establish new credentials with the remote server. This can be used in case the old credentials are not working anymore. An attempt will be made to delete the old credentials if new ones are successfully created.

If changing the peer's URL, an attempt will be made to contact the old Cloudera Manager to delete the existing credentials.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Parameters:
peerName - Name of peer to update.
peer - Updated peer information.
Returns:
The updated peer information.

testPeer

@Path(value="/{peerName}/commands/test")
ApiCommand testPeer(String peerName)
Test the connectivity of a peer.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Parameters:
peerName - Name of peer to test.
Returns:
Information about the submitted command.


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.