Member since
07-08-2016
5
Posts
0
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2592 | 09-28-2016 12:51 PM | |
2373 | 07-08-2016 11:24 AM |
09-28-2016
12:51 PM
Roles don't sync back to Cloudera Director, I was able to fix this by removing the Gateway roles I had added in CM then running the reconcile.
... View more
09-28-2016
12:26 PM
The status command is meant for clusters that were bootstrapped locally with the client (standalone mode) and won't work for clusters that were bootstrapped on a remote server. You can refer to https://www.cloudera.com/documentation/director/latest/topics/director_cli_commands.html for additional information on which commands are meant for remote and which are meant for local. The documentation here may also give a better understanding of the difference between bootstrapping with just the client vs bootstrapping against a server: https://www.cloudera.com/documentation/director/latest/topics/director_client_and_server.html
... View more
07-08-2016
11:24 AM
This sample works, I needed to change the role config not the service config. I'm using autoAssignRoles so I didn't know the role names and need to query them. Since oozie only has one role I can just grab the first one that matches. val clusterName = "cluster1" val serviceName = "OOZIE" val apiServiceConfig = new ApiServiceConfig val apiConfig = new ApiConfig("oozie_database_type", "postgresql") apiServiceConfig.add(apiConfig) val rolesResource: RolesResourceV11 = apiConnection.clustersResource.getServicesResource(clusterName).getRolesResource(serviceName) val roles: ApiRoleList = rolesResource.readRoles(DataView.FULL) val oozieRole: String = roles.asScala.filter(x => x.getName.startsWith(serviceName)).head.getName apiConnection.clustersResource .getServicesResource(clusterName) .getRolesResource(serviceName).updateRoleConfig(oozieRole, "use mysql db", apiServiceConfig)
... View more