Created on 02-24-2016 06:37 AM - edited 09-16-2022 03:05 AM
Hi
I want to write a script using python api (cm_api) to configure hbase replication.
I looked over documentation but did not find anything helpful
Is it possible ?
Thanks
Gregory
Created on 03-03-2016 07:52 AM - edited 03-03-2016 07:53 AM
One part of HBase Replication is that of turning on configs on the Server end to enable the feature. This can be done via the API exactly like Marcell described.
The other part of replication configs is the peer configuration, but this is not doable via CM API as it is not a service-passed configuration, but more of a runtime one. You will need to use HBase's Java API (ReplicationAdmin class) directly for this: http://archive.cloudera.com/cdh5/cdh/5/hbase/apidocs/org/apache/hadoop/hbase/client/replication/Repl.... To do this in Python, I'd guess you will need to use Jython or such.
Created 03-03-2016 06:30 AM
Hi Gregory,
Do you want to achieve what is documented here?
Out of these steps 1,2,3 are the ones that Cloudera Manager is involved in.
You need to update the config
And restart
Other steps run in the shell.
Regards,
Marcell
Created on 03-03-2016 07:52 AM - edited 03-03-2016 07:53 AM
One part of HBase Replication is that of turning on configs on the Server end to enable the feature. This can be done via the API exactly like Marcell described.
The other part of replication configs is the peer configuration, but this is not doable via CM API as it is not a service-passed configuration, but more of a runtime one. You will need to use HBase's Java API (ReplicationAdmin class) directly for this: http://archive.cloudera.com/cdh5/cdh/5/hbase/apidocs/org/apache/hadoop/hbase/client/replication/Repl.... To do this in Python, I'd guess you will need to use Jython or such.