cm_client.ReplicationsResourceApi

All URIs are relative to /api/v58

Method HTTP request Description
add_h_base_replication_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/addReplicationPeer
add_tables_to_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/addTablesToHBasePeer
check_h_base_tables_exist POST /clusters/{clusterName}/services/{serviceName}/replications/operations/checkTables
collect_diagnostic_data POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/collectDiagnosticData
create_cloud_credstore_on_hdfs POST /clusters/{clusterName}/services/{serviceName}/replications/createCloudCredstoreOnHdfs
create_credstore POST /clusters/{clusterName}/services/{serviceName}/replications/createCredstore
create_schedules POST /clusters/{clusterName}/services/{serviceName}/replications
delete_all_schedules DELETE /clusters/{clusterName}/services/{serviceName}/replications
delete_schedule DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}
export_atlas_entites POST /clusters/{clusterName}/services/{serviceName}/replications/exportAtlasEntities
export_ranger_services POST /clusters/{clusterName}/services/{serviceName}/replications/exportRangerServices
fetch_h_base_column_families POST /clusters/{clusterName}/services/{serviceName}/replications/operations/fetchColumnFamilies
fetch_h_base_peer_info POST /clusters/{clusterName}/services/{serviceName}/replications/operations/fetchHBasePeerInfo
force_delete_schedule DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/forcedDelete
generate_cloud_repl_credstore_password POST /clusters/{clusterName}/services/{serviceName}/replications/generateCloudReplCredstorePassword
get_replication_state GET /clusters/{clusterName}/services/{serviceName}/replications/replicationState
is_hive3_reverse_direction_enabled GET /clusters/{clusterName}/services/{serviceName}/replications/isHive3ReverseDirectionEnabled
list_h_base_namespaces GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listNamespaces
list_h_base_peers GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listPeers
list_h_base_tables GET /clusters/{clusterName}/services/{serviceName}/replications/operations/listTables
post_copy_reconciliation POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/postCopyReconciliation
read_history GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/history
read_schedule GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}
read_schedules GET /clusters/{clusterName}/services/{serviceName}/replications
recreate_cloud_credstores_on_hdfs POST /clusters/{clusterName}/services/{serviceName}/replications/recreateCloudCredstoresOnHdfs
remove_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/removeHBasePeer
remove_tables_from_h_base_peer POST /clusters/{clusterName}/services/{serviceName}/replications/operations/removeTablesFromHBasePeer
reschedule_hive3_replication_metrics_getter POST /clusters/{clusterName}/services/{serviceName}/replications/rescheduleHive3ReplicationMetricsGetter
retry_schedule POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/retry
run_copy_listing POST /clusters/{clusterName}/services/{serviceName}/replications/hdfsCopyListing
run_h_base_replication_retry_failed_snapshots POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/runHBaseReplicationRetryFailedSnapshots
run_h_base_replication_security_tool POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationSecurityTool
run_h_base_replication_validation_tool POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationValidationTool
run_hive_replication_query POST /clusters/{clusterName}/services/{serviceName}/replications/hiveReplicationQuery
run_schedule POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/run
set_cfs_replication_scope POST /clusters/{clusterName}/services/{serviceName}/replications/operations/setCFsReplicationScope
update_h_base_peer_state PUT /clusters/{clusterName}/services/{serviceName}/replications/updateHBasePeerState
update_h_base_replication_peer_state POST /clusters/{clusterName}/services/{serviceName}/replications/operations/updateReplicationPeerState
update_schedule PUT /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}

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.

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:
    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.

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:
    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.

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:
    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, body=body, view=view)

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 = 789 # int | Schedule ID
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiReplicationDiagnosticsCollectionArgs() # ApiReplicationDiagnosticsCollectionArgs | Replication collection arguments (optional)
view = 'summary' # str | view to materialize (optional) (default to summary)

try:
    api_response = api_instance.collect_diagnostic_data(cluster_name, schedule_id, service_name, body=body, view=view)
    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.
body ApiReplicationDiagnosticsCollectionArgs Replication collection arguments [optional]
view str view to materialize [optional] [default to summary]

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. 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 = false # 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) (default to false)
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:
    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] [default to false]
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: 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 = false # bool |  (optional) (default to false)
source_account = 'source_account_example' # str |  (optional)

try:
    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] [default to false]
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.

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:
    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.

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:
    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.

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 = 789 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.

try:
    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_atlas_entites

ApiCommand export_atlas_entites(cluster_name, service_name, body=body)

Exports the given Atlas Entities (defined in the API body) to a zipped file in hdfs.

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.ApiAtlasReplicationRemoteArgs() # ApiAtlasReplicationRemoteArgs |  (optional)

try:
    api_response = api_instance.export_atlas_entites(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->export_atlas_entites: %s\n" % e)

Parameters

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

Return type

ApiCommand

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.

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:
    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, body=body, where_replication_set=where_replication_set)

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.
body = cm_client.ApiHBaseTableNames() # ApiHBaseTableNames | Names of tables to query for column families. (optional)
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)

try:
    api_response = api_instance.fetch_h_base_column_families(cluster_name, service_name, body=body, where_replication_set=where_replication_set)
    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.
body ApiHBaseTableNames Names of tables to query for column families. [optional]
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]

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.

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:
    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.

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 = 789 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.

try:
    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.
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:
    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. 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:
    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. 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:
    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.

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:
    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.

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:
    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.

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:
    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]

post_copy_reconciliation

ApiCommand post_copy_reconciliation(cluster_name, schedule_id, service_name, pcr_enable_crc_check=pcr_enable_crc_check, pcr_enable_length_check=pcr_enable_length_check, pcr_enable_modtime_check=pcr_enable_modtime_check)

Starts a command that executes PostCopyReconciliation steps on 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 = 789 # int | 
service_name = 'service_name_example' # str | The service name.
pcr_enable_crc_check = true # bool |  (optional) (default to true)
pcr_enable_length_check = true # bool |  (optional) (default to true)
pcr_enable_modtime_check = true # bool |  (optional) (default to true)

try:
    api_response = api_instance.post_copy_reconciliation(cluster_name, schedule_id, service_name, pcr_enable_crc_check=pcr_enable_crc_check, pcr_enable_length_check=pcr_enable_length_check, pcr_enable_modtime_check=pcr_enable_modtime_check)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->post_copy_reconciliation: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
schedule_id int
service_name str The service name.
pcr_enable_crc_check bool [optional] [default to true]
pcr_enable_length_check bool [optional] [default to true]
pcr_enable_modtime_check bool [optional] [default to true]

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.

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 = 789 # int | ID of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
limit = 56 # int | Maximum number of commands to retrieve. Optional, default value is 20. (optional)
offset = 56 # int | Index of first command to retrieve. Optional, default value is 0. (optional)
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 desc 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:
    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]
offset int Index of first command to retrieve. Optional, default value is 0. [optional]
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 desc 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.

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 = 789 # 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:
    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.

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 = 56 # 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)
max_errors = 56 # int | Maximum number of errors per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional)
max_schedules = 56 # 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)
max_tables = 56 # int | Maximum number of tables per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. (optional)
view = 'summary' # str | The view to materialize. (optional) (default to summary)

try:
    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]
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]
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]
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]
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.

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:
    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.

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:
    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.

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:
    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.

(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 = 56 # int |  (optional)

try:
    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]

Return type

bool

Authorization

basic

HTTP request headers

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

retry_schedule

ApiCommand retry_schedule(cluster_name, schedule_id, service_name)

Retry the last command of a failed replication schedule. Similar to com.cloudera.api.v3.ReplicationsResource#runSchedule but only works if the last command failed.

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 = 789 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.

try:
    api_response = api_instance.retry_schedule(cluster_name, schedule_id, service_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->retry_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

ApiCommand

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

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:
    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

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 = 789 # int | The HBase schedule ID to retry on
service_name = 'service_name_example' # str | The service name.

try:
    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

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 # dict(str, str) |  (optional)

try:
    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 dict(str, 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_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

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:
    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

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:
    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.

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 = 789 # 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:
    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_cfs_replication_scope

ApiCommand set_cfs_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.

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:
    api_response = api_instance.set_cfs_replication_scope(cluster_name, service_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReplicationsResourceApi->set_cfs_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'),
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:
    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.

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:
    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.

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 = 789 # int | Id of an existing replication schedule.
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiReplicationSchedule() # ApiReplicationSchedule |  (optional)

try:
    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]