Support Questions

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

'SHOW CLI JSON' doesn't have properties from newly registered Hive Metastore

avatar
Rising Star

My aim is to save a template from HDC UI and reuse it to create a cluster via CLI. So I chose the 'Create Cluster' option from HDC UI, entered all the required fields, chose to 'Register new Hive Metastore' and added a name and JDBC Connection string, username and password for an existing RDS instance. Clicked on Create Cluster and chose to 'SHOW CLI JSON' (tried by saving the template as well). But I am not able to see any parameters regarding this Hive Metastore. Could you please let me know if that is expected or if i am missing something?

1 ACCEPTED SOLUTION

avatar
Cloudera Employee

@dbalasundaran expanding a bit more on @bbihari's answer above, we have two possible ways to define metastores within a HDC cluster skeleton:

1. Register the metastore first, either through CLI or through the UI, this creates a named metastore entry

2. Refer to the named metastore from your cluster creation skeleton

The skeleton created by the "SHOW CLI JSON" option assumes this is what you are trying to do and that it what it generates by default.

The alternative way is to define a metastore inline within your CLI definition (as @Dominika Bialek illustrates above). I would recommend the first flow for automation since the intent of what you are trying to do is clearer.

HTH

Ram

View solution in original post

7 REPLIES 7

avatar
Rising Star

Hi @dbalasundaran,

The cli json contains only the name of the RDS.

"HiveMetastore": {
        "Name": "nameOfTheRDS"
    }

With the hdc cli you can create new RDS with the register-metastore command.

You can get more information with

hdc register-metastore --help

avatar
Rising Star

My cli json doesnt have the name of RDS too

avatar
@dbalasundaran

It should show the name. See screenshot attached.

Which HDCloud version are you using?

14108-screen-shot-2017-03-27-at-120135-pm.png

avatar
Rising Star

@Dominika Bialek, yeah, As @Ram Venkatesh mentioned below after I register the metastore I can see the named entry. Thankyou!

avatar

I think this is expected behavior. @jeff?

You can use this syntax to get a correct template for your cluster, including registering a metastore as part of a cluster template:

hdc create-cluster generate-cli-skeleton --help 

You'll need to add something like this to the JSON file:

"HiveMetastore": {
    "Name": "",
    "Username": "",
    "Password": "",
    "URL": "",
    "DatabaseType": "POSTGRES"
  },

avatar
Cloudera Employee

@dbalasundaran expanding a bit more on @bbihari's answer above, we have two possible ways to define metastores within a HDC cluster skeleton:

1. Register the metastore first, either through CLI or through the UI, this creates a named metastore entry

2. Refer to the named metastore from your cluster creation skeleton

The skeleton created by the "SHOW CLI JSON" option assumes this is what you are trying to do and that it what it generates by default.

The alternative way is to define a metastore inline within your CLI definition (as @Dominika Bialek illustrates above). I would recommend the first flow for automation since the intent of what you are trying to do is clearer.

HTH

Ram

avatar
Rising Star

Thanks @Ram Venkatesh. After registering the metastore I can see the named entry in my json.

Thankyou!