Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

cloudera api Unknown configuration attribute 'dfs_data_dir_list'

avatar
Explorer

hi,

 

I am working with python and cm_api. I got the following response when I execute my script. I copied and paste the code from the cloudera blog

This is the code:

hdfs_service_config = {
  'dfs_replication': 2,
}
nn_config = {
  'dfs_name_dir_list': '/dfs/nn',
  'dfs_namenode_handler_count': 30,
}
snn_config = {
  'fs_checkpoint_dir_list': '/dfs/snn',
}
dn_config = {
  'dfs_data_dir_list': '/dfs/dn1,/dfs/dn2,/dfs/dn3',
  'dfs_datanode_failed_volumes_tolerated': 1,
}
hdfs.update_config(
    svc_config=hdfs_service_config,
    NAMENODE=nn_config,
    SECONDARYNAMENODE=snn_config,
    DATANODE=dn_config)

cm-api (14.0.0)

 

Any ideas?

1 ACCEPTED SOLUTION

avatar
Explorer
I got a solution.

for group in dn_groups:
group.update_config({'dfs_data_dir_list': '/dfs'})

View solution in original post

3 REPLIES 3

avatar
Explorer
I got a solution.

for group in dn_groups:
group.update_config({'dfs_data_dir_list': '/dfs'})

avatar
Community Manager

Thank you for sharing your solution. I do need to clarify about the code from the blog. Which article was it from? Also, are you saying there was an error with the code or that you were having difficulty changing it to match your conditions? 

 

 


Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer

Hello,

 

Is this article: http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

In the step3 ("configuring HDFS") I just get errors and errors.

 

 

My conditions matched ok with this new configuration.

 

 

Any question let me know