cm_client.ReplicationsResourceApi

All URIs are relative to https://localhost/api/v55

Method HTTP request Description
add_h_base_replication_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/addReplicationPeer Starts a command that adds a new replication peer to HBase.
add_tables_to_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/addTablesToHBasePeer Starts a command that adds tables and column families to an existing HBase replication peer.
check_h_base_tables_exist POST /clusters/{clusterName}/services/{serviceName}/replications/operations/checkTables Starts a command that checks if the specified tables exist in HBase.
collect_diagnostic_data POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/collectDiagnosticData Collect diagnostic data for a schedule, optionally for a subset of commands on that schedule, matched by schedule ID.
create_cloud_credstore_on_hdfs POST /clusters/{clusterName}/services/{serviceName}/replications/createCloudCredstoreOnHdfs Creates a credstore provider jceks file on HDFS for the given service.
create_credstore POST /clusters/{clusterName}/services/{serviceName}/replications/createCredstore Use the following API endpoint instead:.
create_schedules POST /clusters/{clusterName}/services/{serviceName}/replications Creates one or more replication schedules.
delete_all_schedules DELETE /clusters/{clusterName}/services/{serviceName}/replications Deletes all existing replication schedules.
delete_schedule DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId} Deletes an existing replication schedule.
export_ranger_services POST /clusters/{clusterName}/services/{serviceName}/replications/exportRangerServices Exports the given Ranger services and policies (defined in the API body) to a zipped file.
fetch_h_base_column_families POST /clusters/{clusterName}/services/{serviceName}/replications/operations/fetchColumnFamilies Starts a command that fetches column families for the desired tables.
fetch_h_base_peer_info POST /clusters/{clusterName}/services/{serviceName}/replications/operations/fetchHBasePeerInfo Starts a command that fetches information about an HBase peer by its ID.
force_delete_schedule DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/forcedDelete Deletes an existing replication schedule only from the DB.
generate_cloud_repl_credstore_password POST /clusters/{clusterName}/services/{serviceName}/replications/generateCloudReplCredstorePassword (Re)generates the cloud credential provider password, used by the given service, for replicating to the cloud.
get_replication_state GET /clusters/{clusterName}/services/{serviceName}/replications/replicationState returns the replication state.
is_hive3_reverse_direction_enabled GET /clusters/{clusterName}/services/{serviceName}/replications/isHive3ReverseDirectionEnabled This API endpoint checks if there is an ENABLED Hive3 replication policy on this server that replicates for the reverse direction.
list_h_base_namespaces GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listNamespaces Starts a command that lists all namespaces in HBase.
list_h_base_peers GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listPeers Starts a command that retrieves all peers registered in the HBase service.
list_h_base_tables GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listTables Starts a command that lists tables from the HBase service.
read_history GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/history Returns a list of commands triggered by a schedule.
read_schedule GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId} Returns information for a specific replication schedule.
read_schedules GET /clusters/{clusterName}/services/{serviceName}/replications Retrieves information about replication schedules.
recreate_cloud_credstores_on_hdfs POST /clusters/{clusterName}/services/{serviceName}/replications/recreateCloudCredstoresOnHdfs Recreates the existing credential provider jceks files on HDFS, that are used by the given service, for replicating to the cloud.
remove_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/removeHBasePeer Starts a command that removes the specified HBase replication peer from the local HBase service.
remove_tables_from_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/removeTablesFromHBasePeer Starts a command that removes tables and column families from an existing HBase replication peer.
reschedule_hive3_replication_metrics_getter POST /clusters/{clusterName}/services/{serviceName}/replications/rescheduleHive3ReplicationMetricsGetter Set the Hive3 Replication Metrics Getter next start time.
run_copy_listing POST /clusters/{clusterName}/services/{serviceName}/replications/hdfsCopyListing Run the hdfs copy listing command.
run_h_base_replication_retry_failed_snapshots POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/runHBaseReplicationRetryFailedSnapshots Executes a command to run a HBase replication retry on failed snapshots for the given schedule ID.
run_h_base_replication_security_tool POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationSecurityTool Run the hbase replication security tool.
run_h_base_replication_validation_tool POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationValidationTool Executes a command, which validates if HBase replication works properly for the given hbasePeerId.
run_hive_replication_query POST /clusters/{clusterName}/services/{serviceName}/replications/hiveReplicationQuery Execute a hive replication query on local HS2 service instance.
run_schedule POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/run Run the schedule immediately.
set_c_fs_replication_scope POST /clusters/{clusterName}/services/{serviceName}/replications/operations/setCFsReplicationScope Starts a command that set the replication scope of the provided column families to the desired value.
update_h_base_peer_state PUT /clusters/{clusterName}/services/{serviceName}/replications/updateHBasePeerState Update HBase peer state ('DISABLE' or 'ENABLE'),.
update_h_base_replication_peer_state POST /clusters/{clusterName}/services/{serviceName}/replications/operations/updateReplicationPeerState Starts a command that updates the state of an existing HBase replication peer.
update_schedule PUT /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId} Updates an existing replication schedule.

add_h_base_replication_peer

ApiCommand add_h_base_replication_peer(cluster_name, service_name, body=body)

Starts a command that adds a new replication peer to HBase.

Starts a command that adds a new replication peer to HBase.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBaseAddReplicationPeerInput() # ApiHBaseAddReplicationPeerInput | Information for peer creation. (optional)

try:
    # Starts a command that adds a new replication peer to HBase.
    api_response = api_instance.add_h_base_replication_peer(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->add_h_base_replication_peer: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBaseAddReplicationPeerInput Information for peer creation. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

add_tables_to_h_base_peer

ApiCommand add_tables_to_h_base_peer(cluster_name, service_name, body=body)

Starts a command that adds tables and column families to an existing HBase replication peer.

Starts a command that adds tables and column families to an existing HBase replication peer.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBasePeerIdWithTableCFs() # ApiHBasePeerIdWithTableCFs | Arguments for the operation. (optional)

try:
    # Starts a command that adds tables and column families to an existing HBase replication peer.
    api_response = api_instance.add_tables_to_h_base_peer(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->add_tables_to_h_base_peer: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBasePeerIdWithTableCFs Arguments for the operation. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

check_h_base_tables_exist

ApiCommand check_h_base_tables_exist(cluster_name, service_name, body=body)

Starts a command that checks if the specified tables exist in HBase.

Starts a command that checks if the specified tables exist in HBase.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBaseTableNames() # ApiHBaseTableNames | Names of the tables to be checked. (optional)

try:
    # Starts a command that checks if the specified tables exist in HBase.
    api_response = api_instance.check_h_base_tables_exist(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->check_h_base_tables_exist: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBaseTableNames Names of the tables to be checked. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

collect_diagnostic_data

ApiCommand collect_diagnostic_data(cluster_name, schedule_id, service_name, view=view, body=body)

Collect diagnostic data for a schedule, optionally for a subset of commands on that schedule, matched by schedule ID.

Collect diagnostic data for a schedule, optionally for a subset of commands on that schedule, matched by schedule ID. The returned command's resultDataUrl property, upon the commands completion, will refer to the generated diagnostic data. Available since API v11.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Schedule ID
service_name = 'service_name_example' # str | The service name.
view = 'summary' # str | view to materialize (optional) (default to summary)
body = cm_client.ApiReplicationDiagnosticsCollectionArgs() # ApiReplicationDiagnosticsCollectionArgs | Replication collection arguments (optional)

try:
    # Collect diagnostic data for a schedule, optionally for a subset of commands on that schedule, matched by schedule ID.
    api_response = api_instance.collect_diagnostic_data(cluster_name, schedule_id, service_name, view=view, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->collect_diagnostic_data: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Schedule ID
service_name str The service name.
view str view to materialize [optional] [default to summary]
body ApiReplicationDiagnosticsCollectionArgs Replication collection arguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_cloud_credstore_on_hdfs

ApiCommand create_cloud_credstore_on_hdfs(cluster_name, service_name, force=force, source_account=source_account)

Creates a credstore provider jceks file on HDFS for the given service.

Creates a credstore provider jceks file on HDFS for the given service. The file will store credential information for the given sourceAccount.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
force = true # bool | if the jceks file already exists on HDFS and this parameter is set to true then it will be recreated, otherwise left untouched (optional)
source_account = 'source_account_example' # str | the External Account that has been already added to this CM, for which the credstore provider jceks file will be generated (optional)

try:
    # Creates a credstore provider jceks file on HDFS for the given service.
    api_response = api_instance.create_cloud_credstore_on_hdfs(cluster_name, service_name, force=force, source_account=source_account)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->create_cloud_credstore_on_hdfs: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
force bool if the jceks file already exists on HDFS and this parameter is set to true then it will be recreated, otherwise left untouched [optional]
source_account str the External Account that has been already added to this CM, for which the credstore provider jceks file will be generated [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_credstore

ApiCommand create_credstore(cluster_name, service_name, credstore_dir_path=credstore_dir_path, force=force, source_account=source_account)

Use the following API endpoint instead:.

Use the following API endpoint instead: com.cloudera.api.v50.ReplicationsResourceV50#createCloudCredstoreOnHdfs(String, boolean)

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
credstore_dir_path = 'credstore_dir_path_example' # str |  (optional)
force = true # bool |  (optional)
source_account = 'source_account_example' # str |  (optional)

try:
    # Use the following API endpoint instead:.
    api_response = api_instance.create_credstore(cluster_name, service_name, credstore_dir_path=credstore_dir_path, force=force, source_account=source_account)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->create_credstore: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
credstore_dir_path str [optional]
force bool [optional]
source_account str [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_schedules

ApiReplicationScheduleList create_schedules(cluster_name, service_name, body=body)

Creates one or more replication schedules.

Creates one or more replication schedules.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiReplicationScheduleList() # ApiReplicationScheduleList | List of the replication schedules to create. (optional)

try:
    # Creates one or more replication schedules.
    api_response = api_instance.create_schedules(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->create_schedules: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiReplicationScheduleList List of the replication schedules to create. [optional]

Return type

ApiReplicationScheduleList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_all_schedules

ApiReplicationScheduleList delete_all_schedules(cluster_name, service_name)

Deletes all existing replication schedules.

Deletes all existing replication schedules.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.

try:
    # Deletes all existing replication schedules.
    api_response = api_instance.delete_all_schedules(cluster_name, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->delete_all_schedules: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.

Return type

ApiReplicationScheduleList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_schedule

ApiReplicationSchedule delete_schedule(cluster_name, schedule_id, service_name)

Deletes an existing replication schedule.

Deletes an existing replication schedule.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.

try:
    # Deletes an existing replication schedule.
    api_response = api_instance.delete_schedule(cluster_name, schedule_id, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->delete_schedule: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Id of an existing replication schedule.
service_name str The service name.

Return type

ApiReplicationSchedule

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

export_ranger_services

ApiCommand export_ranger_services(cluster_name, service_name, body=body)

Exports the given Ranger services and policies (defined in the API body) to a zipped file.

Exports the given Ranger services and policies (defined in the API body) to a zipped file.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiRangerReplicationExportArgs() # ApiRangerReplicationExportArgs | the arguments for the export operation. Contains the Ranger services to be exported. (optional)

try:
    # Exports the given Ranger services and policies (defined in the API body) to a zipped file.
    api_response = api_instance.export_ranger_services(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->export_ranger_services: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiRangerReplicationExportArgs the arguments for the export operation. Contains the Ranger services to be exported. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_h_base_column_families

ApiCommand fetch_h_base_column_families(cluster_name, service_name, where_replication_set=where_replication_set, body=body)

Starts a command that fetches column families for the desired tables.

Starts a command that fetches column families for the desired tables.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
where_replication_set = false # bool | Whether to retrieve column families of only those tables where there is at least one column family with replication scope set to 1. (optional) (default to false)
body = cm_client.ApiHBaseTableNames() # ApiHBaseTableNames | Names of tables to query for column families. (optional)

try:
    # Starts a command that fetches column families for the desired tables.
    api_response = api_instance.fetch_h_base_column_families(cluster_name, service_name, where_replication_set=where_replication_set, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->fetch_h_base_column_families: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
where_replication_set bool Whether to retrieve column families of only those tables where there is at least one column family with replication scope set to 1. [optional] [default to false]
body ApiHBaseTableNames Names of tables to query for column families. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_h_base_peer_info

ApiCommand fetch_h_base_peer_info(cluster_name, service_name, body=body)

Starts a command that fetches information about an HBase peer by its ID.

Starts a command that fetches information about an HBase peer by its ID.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBasePeerId() # ApiHBasePeerId | ID of the fetched peer. (optional)

try:
    # Starts a command that fetches information about an HBase peer by its ID.
    api_response = api_instance.fetch_h_base_peer_info(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->fetch_h_base_peer_info: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBasePeerId ID of the fetched peer. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

force_delete_schedule

ApiReplicationSchedule force_delete_schedule(cluster_name, schedule_id, service_name)

Deletes an existing replication schedule only from the DB.

Deletes an existing replication schedule only from the DB.

Only the DB schedule reference is deleted with no further cleanup on the source or target side. Typically this endpoint can be used when the source cluster is not available any more and normal policy delete fails during cleanup. Available since API v46. Only available with Cloudera Manager Enterprise Edition.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.

try:
    # Deletes an existing replication schedule only from the DB.
    api_response = api_instance.force_delete_schedule(cluster_name, schedule_id, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->force_delete_schedule: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Id of an existing replication schedule.
service_name str The service name.

Return type

ApiReplicationSchedule

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

generate_cloud_repl_credstore_password

bool generate_cloud_repl_credstore_password(cluster_name, service_name, password_generate_mode=password_generate_mode)

(Re)generates the cloud credential provider password, used by the given service, for replicating to the cloud.

(Re)generates the cloud credential provider password, used by the given service, for replicating to the cloud.
Calling this API endpoint may cause staleness for the given service.
NOTE: If this API endpoint REGENERATED the credstore password successfully and there are existing credstore provider jceks files on HDFS, protected by this password, then these jceks files should be recreated by using the following API endpoint: #recreateCloudCredstoresOnHdfs().

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
password_generate_mode = 'password_generate_mode_example' # str | the CloudReplPasswordGenerateMode to be used for regenerating the password. (optional)

try:
    # (Re)generates the cloud credential provider password, used by the given service, for replicating to the cloud.
    api_response = api_instance.generate_cloud_repl_credstore_password(cluster_name, service_name, password_generate_mode=password_generate_mode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->generate_cloud_repl_credstore_password: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
password_generate_mode str the CloudReplPasswordGenerateMode to be used for regenerating the password. [optional]

Return type

bool

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_replication_state

ApiReplicationState get_replication_state(cluster_name, service_name, view=view)

returns the replication state.

returns the replication state. for example if incremental export is enabled, etc

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
view = 'summary' # str | view to materialize (optional) (default to summary)

try:
    # returns the replication state.
    api_response = api_instance.get_replication_state(cluster_name, service_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->get_replication_state: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
view str view to materialize [optional] [default to summary]

Return type

ApiReplicationState

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

is_hive3_reverse_direction_enabled

bool is_hive3_reverse_direction_enabled(cluster_name, service_name, cluster_uuid_on_remote=cluster_uuid_on_remote, service_name_on_remote=service_name_on_remote, source_db_name_on_remote=source_db_name_on_remote, target_db_name_on_remote=target_db_name_on_remote)

This API endpoint checks if there is an ENABLED Hive3 replication policy on this server that replicates for the reverse direction.

This API endpoint checks if there is an ENABLED Hive3 replication policy on this server that replicates for the reverse direction. Bidirectional Hive3 replication policies are allowed, but only one direction can be ENABLED at the same time.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
cluster_uuid_on_remote = 'cluster_uuid_on_remote_example' # str | the uuid of the cluster on the remote CM server (optional)
service_name_on_remote = 'service_name_on_remote_example' # str | the Hive3 service name on the remote CM server, more specifically on the cluster specified by clusterUuidOnRemote (optional)
source_db_name_on_remote = 'source_db_name_on_remote_example' # str | the name of the source database on the remote CM server (optional)
target_db_name_on_remote = 'target_db_name_on_remote_example' # str | the name of the target database on the remote CM server (optional)

try:
    # This API endpoint checks if there is an ENABLED Hive3 replication policy on this server that replicates for the reverse direction.
    api_response = api_instance.is_hive3_reverse_direction_enabled(cluster_name, service_name, cluster_uuid_on_remote=cluster_uuid_on_remote, service_name_on_remote=service_name_on_remote, source_db_name_on_remote=source_db_name_on_remote, target_db_name_on_remote=target_db_name_on_remote)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->is_hive3_reverse_direction_enabled: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
cluster_uuid_on_remote str the uuid of the cluster on the remote CM server [optional]
service_name_on_remote str the Hive3 service name on the remote CM server, more specifically on the cluster specified by clusterUuidOnRemote [optional]
source_db_name_on_remote str the name of the source database on the remote CM server [optional]
target_db_name_on_remote str the name of the target database on the remote CM server [optional]

Return type

bool

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_h_base_namespaces

ApiCommand list_h_base_namespaces(cluster_name, service_name)

Starts a command that lists all namespaces in HBase.

Starts a command that lists all namespaces in HBase.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.

try:
    # Starts a command that lists all namespaces in HBase.
    api_response = api_instance.list_h_base_namespaces(cluster_name, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->list_h_base_namespaces: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_h_base_peers

ApiCommand list_h_base_peers(cluster_name, service_name)

Starts a command that retrieves all peers registered in the HBase service.

Starts a command that retrieves all peers registered in the HBase service.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.

try:
    # Starts a command that retrieves all peers registered in the HBase service.
    api_response = api_instance.list_h_base_peers(cluster_name, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->list_h_base_peers: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_h_base_tables

ApiCommand list_h_base_tables(cluster_name, service_name)

Starts a command that lists tables from the HBase service.

Starts a command that lists tables from the HBase service.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.

try:
    # Starts a command that lists tables from the HBase service.
    api_response = api_instance.list_h_base_tables(cluster_name, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->list_h_base_tables: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_history

ApiReplicationCommandList read_history(cluster_name, schedule_id, service_name, limit=limit, offset=offset, sort=sort, status=status, view=view)

Returns a list of commands triggered by a schedule.

Returns a list of commands triggered by a schedule.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | ID of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
limit = 20 # int | Maximum number of commands to retrieve. Optional, default value is 20. (optional) (default to 20)
offset = 0 # int | Index of first command to retrieve. Optional, default value is 0. (optional) (default to 0)
sort = 'sort_example' # str | The list of fields to order by. The value passed should be in the format of orderBy=field1:asc,field2:desc, where field1 will have the highest precedence. For every field provided, asc or  also has to be provided. This param is optional, default behaviour is descending ordering by start time. (optional)
status = 'status_example' # str | Desired status of retrieved commands. Optional, default behaviour is not applying any filtering, and returning all commands. Check ApiReplicationHistoryItemStatus for possible values. (optional)
view = 'summary' # str | The view to materialize. Optional, default is summary. (optional) (default to summary)

try:
    # Returns a list of commands triggered by a schedule.
    api_response = api_instance.read_history(cluster_name, schedule_id, service_name, limit=limit, offset=offset, sort=sort, status=status, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->read_history: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int ID of an existing replication schedule.
service_name str The service name.
limit int Maximum number of commands to retrieve. Optional, default value is 20. [optional] [default to 20]
offset int Index of first command to retrieve. Optional, default value is 0. [optional] [default to 0]
sort str The list of fields to order by. The value passed should be in the format of orderBy=field1:asc,field2:desc, where field1 will have the highest precedence. For every field provided, asc or also has to be provided. This param is optional, default behaviour is descending ordering by start time. [optional]
status str Desired status of retrieved commands. Optional, default behaviour is not applying any filtering, and returning all commands. Check ApiReplicationHistoryItemStatus for possible values. [optional]
view str The view to materialize. Optional, default is summary. [optional] [default to summary]

Return type

ApiReplicationCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_schedule

ApiReplicationSchedule read_schedule(cluster_name, schedule_id, service_name, view=view)

Returns information for a specific replication schedule.

Returns information for a specific replication schedule.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
view = 'summary' # str | The view to materialize. (optional) (default to summary)

try:
    # Returns information for a specific replication schedule.
    api_response = api_instance.read_schedule(cluster_name, schedule_id, service_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->read_schedule: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Id of an existing replication schedule.
service_name str The service name.
view str The view to materialize. [optional] [default to summary]

Return type

ApiReplicationSchedule

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_schedules

ApiReplicationScheduleList read_schedules(cluster_name, service_name, max_commands=max_commands, max_errors=max_errors, max_schedules=max_schedules, max_tables=max_tables, view=view)

Retrieves information about replication schedules.

Retrieves information about replication schedules.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
max_commands = 0 # int | Maximum number of commands to include in the history of replication schedules. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional) (default to 0)
max_errors = 0 # int | Maximum number of errors per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional) (default to 0)
max_schedules = 0 # int | Maximum number of replication schedules to be included in the response. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional) (default to 0)
max_tables = 0 # int | Maximum number of tables per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional) (default to 0)
view = 'summary' # str | The view to materialize. (optional) (default to summary)

try:
    # Retrieves information about replication schedules.
    api_response = api_instance.read_schedules(cluster_name, service_name, max_commands=max_commands, max_errors=max_errors, max_schedules=max_schedules, max_tables=max_tables, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->read_schedules: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
max_commands int Maximum number of commands to include in the history of replication schedules. By default, it has no limit. Pass 0 to explicitly set to unlimited. [optional] [default to 0]
max_errors int Maximum number of errors per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. [optional] [default to 0]
max_schedules int Maximum number of replication schedules to be included in the response. By default, it has no limit. Pass 0 to explicitly set to unlimited. [optional] [default to 0]
max_tables int Maximum number of tables per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. [optional] [default to 0]
view str The view to materialize. [optional] [default to summary]

Return type

ApiReplicationScheduleList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

recreate_cloud_credstores_on_hdfs

ApiCommand recreate_cloud_credstores_on_hdfs(cluster_name, service_name)

Recreates the existing credential provider jceks files on HDFS, that are used by the given service, for replicating to the cloud.

Recreates the existing credential provider jceks files on HDFS, that are used by the given service, for replicating to the cloud.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.

try:
    # Recreates the existing credential provider jceks files on HDFS, that are used by the given service, for replicating to the cloud.
    api_response = api_instance.recreate_cloud_credstores_on_hdfs(cluster_name, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->recreate_cloud_credstores_on_hdfs: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_h_base_peer

ApiCommand remove_h_base_peer(cluster_name, service_name, body=body)

Starts a command that removes the specified HBase replication peer from the local HBase service.

Starts a command that removes the specified HBase replication peer from the local HBase service.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBasePeerId() # ApiHBasePeerId | ID of the peer to be removed. (optional)

try:
    # Starts a command that removes the specified HBase replication peer from the local HBase service.
    api_response = api_instance.remove_h_base_peer(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->remove_h_base_peer: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBasePeerId ID of the peer to be removed. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_tables_from_h_base_peer

ApiCommand remove_tables_from_h_base_peer(cluster_name, service_name, body=body)

Starts a command that removes tables and column families from an existing HBase replication peer.

Starts a command that removes tables and column families from an existing HBase replication peer.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBasePeerIdWithTableCFs() # ApiHBasePeerIdWithTableCFs | Arguments for removing tables from HBase replication peer. (optional)

try:
    # Starts a command that removes tables and column families from an existing HBase replication peer.
    api_response = api_instance.remove_tables_from_h_base_peer(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->remove_tables_from_h_base_peer: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBasePeerIdWithTableCFs Arguments for removing tables from HBase replication peer. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reschedule_hive3_replication_metrics_getter

bool reschedule_hive3_replication_metrics_getter(cluster_name, service_name, next_start_mins=next_start_mins)

Set the Hive3 Replication Metrics Getter next start time.

Set the Hive3 Replication Metrics Getter next start time.

(Re)set the Hive3 Replication Metrics Getter next start time. Should be only used if the Getter needs to be manually started.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
next_start_mins = 5 # int |  (optional) (default to 5)

try:
    # Set the Hive3 Replication Metrics Getter next start time.
    api_response = api_instance.reschedule_hive3_replication_metrics_getter(cluster_name, service_name, next_start_mins=next_start_mins)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->reschedule_hive3_replication_metrics_getter: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
next_start_mins int [optional] [default to 5]

Return type

bool

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_copy_listing

ApiCommand run_copy_listing(cluster_name, service_name, body=body)

Run the hdfs copy listing command.

Run the hdfs copy listing command

The copy listing command will be triggered with the provided arguments

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = 'body_example' # str |  (optional)

try:
    # Run the hdfs copy listing command.
    api_response = api_instance.run_copy_listing(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_copy_listing: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body str [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_h_base_replication_retry_failed_snapshots

ApiCommand run_h_base_replication_retry_failed_snapshots(cluster_name, schedule_id, service_name)

Executes a command to run a HBase replication retry on failed snapshots for the given schedule ID.

Executes a command to run a HBase replication retry on failed snapshots for the given schedule ID

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | The HBase schedule ID to retry on
service_name = 'service_name_example' # str | The service name.

try:
    # Executes a command to run a HBase replication retry on failed snapshots for the given schedule ID.
    api_response = api_instance.run_h_base_replication_retry_failed_snapshots(cluster_name, schedule_id, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_h_base_replication_retry_failed_snapshots: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int The HBase schedule ID to retry on
service_name str The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_h_base_replication_security_tool

ApiCommand run_h_base_replication_security_tool(cluster_name, service_name, body=body)

Run the hbase replication security tool.

Run the hbase replication security tool

The replication security tool is invoked against the provided arguments

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = NULL # object |  (optional)

try:
    # Run the hbase replication security tool.
    api_response = api_instance.run_h_base_replication_security_tool(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_h_base_replication_security_tool: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body object [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_h_base_replication_validation_tool

ApiCommand run_h_base_replication_validation_tool(cluster_name, service_name, hbase_peer_id=hbase_peer_id)

Executes a command, which validates if HBase replication works properly for the given hbasePeerId.

Executes a command, which validates if HBase replication works properly for the given hbasePeerId

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
hbase_peer_id = 'hbase_peer_id_example' # str | The HBase peer ID to be validated (optional)

try:
    # Executes a command, which validates if HBase replication works properly for the given hbasePeerId.
    api_response = api_instance.run_h_base_replication_validation_tool(cluster_name, service_name, hbase_peer_id=hbase_peer_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_h_base_replication_validation_tool: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
hbase_peer_id str The HBase peer ID to be validated [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_hive_replication_query

ApiCommand run_hive_replication_query(cluster_name, service_name, body=body)

Execute a hive replication query on local HS2 service instance.

Execute a hive replication query on local HS2 service instance

The command executes hive replication query on local HS2 instance with the provided arguments

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHive3ReplicationArguments() # ApiHive3ReplicationArguments |  (optional)

try:
    # Execute a hive replication query on local HS2 service instance.
    api_response = api_instance.run_hive_replication_query(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_hive_replication_query: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHive3ReplicationArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_schedule

ApiCommand run_schedule(cluster_name, schedule_id, service_name, dry_run=dry_run)

Run the schedule immediately.

Run the schedule immediately.

The replication command will be triggered with the configured arguments, and will be recorded in the schedule's history.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
dry_run = false # bool | Whether to execute a dry run. (optional) (default to false)

try:
    # Run the schedule immediately.
    api_response = api_instance.run_schedule(cluster_name, schedule_id, service_name, dry_run=dry_run)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->run_schedule: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Id of an existing replication schedule.
service_name str The service name.
dry_run bool Whether to execute a dry run. [optional] [default to false]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_c_fs_replication_scope

ApiCommand set_c_fs_replication_scope(cluster_name, service_name, body=body)

Starts a command that set the replication scope of the provided column families to the desired value.

Starts a command that set the replication scope of the provided column families to the desired value.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBaseSetCFsReplicationScope() # ApiHBaseSetCFsReplicationScope | Arguments for setting the replication scope. (optional)

try:
    # Starts a command that set the replication scope of the provided column families to the desired value.
    api_response = api_instance.set_c_fs_replication_scope(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->set_c_fs_replication_scope: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBaseSetCFsReplicationScope Arguments for setting the replication scope. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_h_base_peer_state

ApiCommand update_h_base_peer_state(cluster_name, service_name, body=body)

Update HBase peer state ('DISABLE' or 'ENABLE'),.

Update HBase peer state ('DISABLE' or 'ENABLE'),
and set the related HBase replication schedules

ApiHBaseReplicationArguments.peerState
for the given peer name (all schedules for the same source and target HBase service) according to the given state ('DISABLED' or 'ENABLED').
  example json data payload:  '{     "sourceRef": {       "peerName": "source-peer-name",       "clusterName": "Cluster Name",       "serviceName": "HBase Service Name"     }     "peerState": "ENABLED|DISABLED"   }'  

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBaseReplicationUpdatePeerStateArgs() # ApiHBaseReplicationUpdatePeerStateArgs | ApiHBaseReplicationUpdatePeerStateArgs (optional)

try:
    # Update HBase peer state ('DISABLE' or 'ENABLE'),.
    api_response = api_instance.update_h_base_peer_state(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->update_h_base_peer_state: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBaseReplicationUpdatePeerStateArgs ApiHBaseReplicationUpdatePeerStateArgs [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_h_base_replication_peer_state

ApiCommand update_h_base_replication_peer_state(cluster_name, service_name, body=body)

Starts a command that updates the state of an existing HBase replication peer.

Starts a command that updates the state of an existing HBase replication peer.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiHBaseUpdateReplicationPeerState() # ApiHBaseUpdateReplicationPeerState | Arguments for operation. (optional)

try:
    # Starts a command that updates the state of an existing HBase replication peer.
    api_response = api_instance.update_h_base_replication_peer_state(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->update_h_base_replication_peer_state: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
service_name str The service name.
body ApiHBaseUpdateReplicationPeerState Arguments for operation. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_schedule

ApiReplicationSchedule update_schedule(cluster_name, schedule_id, service_name, body=body)

Updates an existing replication schedule.

Updates an existing replication schedule.

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

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ReplicationsResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
schedule_id = 56 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiReplicationSchedule() # ApiReplicationSchedule |  (optional)

try:
    # Updates an existing replication schedule.
    api_response = api_instance.update_schedule(cluster_name, schedule_id, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->update_schedule: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int Id of an existing replication schedule.
service_name str The service name.
body ApiReplicationSchedule [optional]

Return type

ApiReplicationSchedule

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]