Support Questions
Find answers, ask questions, and share your expertise

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

Contributor

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

Accepted Solutions

New Contributor

@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

Contributor

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

Contributor

My cli json doesnt have the name of RDS too

@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

Contributor

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

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"
  },

New Contributor

@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

Contributor

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

Thankyou!