Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

What are the blueprint properties for specifying the Oozie/Hive database user and password when using an external db?

Solved Go to solution
Highlighted

What are the blueprint properties for specifying the Oozie/Hive database user and password when using an external db?

Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: What are the blueprint properties for specifying the Oozie/Hive database user and password when using an external db?

Blueprint:

{
  "Blueprints" : {
    "stack_name" : "HDP",
    "stack_version" : "2.3"
  },
  "configurations" : [
    {
      "hive-site" : {
        "properties" : {
          "javax.jdo.option.ConnectionDriverName" : "com.mysql.jdbc.Driver",
          "javax.jdo.option.ConnectionURL" : "jdbc:mysql://%HOSTGROUP::hg_master_node_3%/hive?createDatabaseIfNotExist=true",
          "javax.jdo.option.ConnectionUserName": "hive"
        }
      }
    },
    {
      "oozie-site" : {
        "properties" : {
          "oozie.service.JPAService.jdbc.driver" : "com.mysql.jdbc.Driver",
          "oozie.service.JPAService.jdbc.url" : "jdbc:mysql://%HOSTGROUP::hg_master_node_3%/oozie",
          "oozie.service.JPAService.jdbc.username" : "oozie",
          "oozie.db.schema.name" : "oozie",
        }
      }
    },
    {
      "oozie-env" : {
        "properties" : {
          "oozie_hostname" : "%HOSTGROUP::hg_master_node_3%",
          "oozie_database" : "Existing MySQL Database"
        }
      }
    },
    {
      "hive-env" : {
        "properties" : {
          "hive_database" : "Existing MySQL Database",
          "hive_database_name" : "hive",
          "hive_database_type" : "mysql",
          "hive_hostname" : "%HOSTGROUP::hg_master_node_3%"
        }
      }
    }
  ],
  "host_groups" : [
    ...
  ]
}

Hostgroup-Mapping/Cluster:

{
  "blueprint" : "bigdata_blueprint",
  "default_password" : "my-super-secret-password",
  "configurations" : [
    {
      "hive-site" : {
        "properties" : {
          "javax.jdo.option.ConnectionPassword" : "my-super-secret-password_2"
        }
      }
    },
    {
      "oozie-site" : {
        "properties" : {
          "oozie.service.JPAService.jdbc.password" : "my-super-secret-password_3"        }
      }
    }
  ],
  "host_groups" :[
    ...
  ]
}




View solution in original post

2 REPLIES 2
Highlighted

Re: What are the blueprint properties for specifying the Oozie/Hive database user and password when using an external db?

Blueprint:

{
  "Blueprints" : {
    "stack_name" : "HDP",
    "stack_version" : "2.3"
  },
  "configurations" : [
    {
      "hive-site" : {
        "properties" : {
          "javax.jdo.option.ConnectionDriverName" : "com.mysql.jdbc.Driver",
          "javax.jdo.option.ConnectionURL" : "jdbc:mysql://%HOSTGROUP::hg_master_node_3%/hive?createDatabaseIfNotExist=true",
          "javax.jdo.option.ConnectionUserName": "hive"
        }
      }
    },
    {
      "oozie-site" : {
        "properties" : {
          "oozie.service.JPAService.jdbc.driver" : "com.mysql.jdbc.Driver",
          "oozie.service.JPAService.jdbc.url" : "jdbc:mysql://%HOSTGROUP::hg_master_node_3%/oozie",
          "oozie.service.JPAService.jdbc.username" : "oozie",
          "oozie.db.schema.name" : "oozie",
        }
      }
    },
    {
      "oozie-env" : {
        "properties" : {
          "oozie_hostname" : "%HOSTGROUP::hg_master_node_3%",
          "oozie_database" : "Existing MySQL Database"
        }
      }
    },
    {
      "hive-env" : {
        "properties" : {
          "hive_database" : "Existing MySQL Database",
          "hive_database_name" : "hive",
          "hive_database_type" : "mysql",
          "hive_hostname" : "%HOSTGROUP::hg_master_node_3%"
        }
      }
    }
  ],
  "host_groups" : [
    ...
  ]
}

Hostgroup-Mapping/Cluster:

{
  "blueprint" : "bigdata_blueprint",
  "default_password" : "my-super-secret-password",
  "configurations" : [
    {
      "hive-site" : {
        "properties" : {
          "javax.jdo.option.ConnectionPassword" : "my-super-secret-password_2"
        }
      }
    },
    {
      "oozie-site" : {
        "properties" : {
          "oozie.service.JPAService.jdbc.password" : "my-super-secret-password_3"        }
      }
    }
  ],
  "host_groups" :[
    ...
  ]
}




View solution in original post

Highlighted

Re: What are the blueprint properties for specifying the Oozie/Hive database user and password when using an external db?

@kkane important update on the above answer.

At the moment hostgroup variables are not replaced by the actual hostnames, e.g. %HOSTGROUP::hg_master_node_3% is not replaced by c6603.ambari.apache.org. @Olivier Renault pointed this out to me today (Thanks!!). A RMP ticket has already been opened for this missing feature and the implementation is currently planned for one of the next major Ambari versions.

One way to work around this missing piece is to replace the hostgroup variable with the actual hostname.

Don't have an account?
Coming from Hortonworks? Activate your account here