Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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? 

 

 


Keep the questions coming,

Cy Jervis | Senior Manager, Knowledge Programs

if (helpful) { mark_as_solution(); } | if (appreciated) { give_kudos(); }

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