Created 03-27-2017 05:06 AM
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?
Created 03-27-2017 07:46 PM
@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
Created 03-27-2017 03:24 PM
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
Created 03-27-2017 04:29 PM
My cli json doesnt have the name of RDS too
Created on 03-27-2017 07:19 PM - edited 08-18-2019 03:14 AM
It should show the name. See screenshot attached.
Which HDCloud version are you using?
Created 03-27-2017 07:56 PM
@Dominika Bialek, yeah, As @Ram Venkatesh mentioned below after I register the metastore I can see the named entry. Thankyou!
Created 03-27-2017 06:49 PM
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" },
Created 03-27-2017 07:46 PM
@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
Created 03-27-2017 07:57 PM
Thanks @Ram Venkatesh. After registering the metastore I can see the named entry in my json.
Thankyou!