Getting Started

Getting started with Hive Metastore

Getting started with a test instance of the DC/OS Hive Metastore service is straightforward.

Prerequisites

  • Depending on your security mode in Enterprise DC/OS, you may need to provision a service account before you install Hive Metastore. You will be able to create the service account only if you have superuser permission.
    • strict security mode requires a service account.
    • permissive security mode: a service account is optional.
    • disabled security mode does not require a service account.
  • Your cluster must have at least private nodes.

NOTE: The default DC/OS Metastore installation provides reasonable defaults for trying out the service, but may not be sufficient for production use. You may require different configurations depending on the context of the deployment.

Installation from the DC/OS CLI

To start a basic test cluster, run the following command on the DC/OS CLI. Enterprise DC/OS users must follow additional instructions. More information about installing DC/OS Metastore on Enterprise DC/OS is available in the Authenticating DC/OS Services documentation.

dcos package install hive-metastore

You can specify a custom configuration in an options.json file and pass it to dcos package install using the --options parameter.

dcos package install hive-metastore --options=<options>.json

It is recommended that this custom configuration is stored in source control.

For more information about building the options.json file, see Configuring Services.

Installation from the DC/OS UI

You can install DC/OS Apache Metastore from the DC/OS UI. If you install DC/OS Metastore from the web interface, you must install the DC/OS Metastore CLI subcommands separately. From the DC/OS CLI, enter the following command:

dcos package install hive-metastore --cli

Choose ADVANCED INSTALLATION to perform a custom installation.

Integration with DC/OS access controls

In Enterprise DC/OS 1.10 and later, you can integrate your SDK-based service with DC/OS ACLs to restrict users and groups to certain services. You will install your service into a folder, and then restrict access to some number of folders. Folders also allow you to assign namespaces to services; for example, staging/hive-metastore and production/hive-metastore.

Use the following steps to integrate with DC/OS access controls:

  1. In the DC/OS UI, you must create a group and then add a user to the group or create an user. Click Organization > Groups > + or Organization > Users > +. If you create a group, you must also create a user and add them to the group.

  2. Give the user permissions for the folder where you will install your service. In this example, we are creating a user called developer, who will have access to the /testing folder. Select the group or user you created. Select ADD PERMISSION and then toggle to INSERT PERMISSION STRING. Add each of the following permissions to your user or group and then click ADD PERMISSIONS.

    dcos:adminrouter:service:marathon full
    dcos:service:marathon:marathon:services:/testing full
    dcos:adminrouter:ops:mesos full
    dcos:adminrouter:ops:slave full
    
  3. Install your service into a folder called test. Go to Catalog, then search for hive-metastore.

  4. Click CONFIGURE and change the service name to /testing/hive-metastore, then deploy.

    The slashes in your service name are interpreted as folders. You are deploying Metastore in the /testing folder. Any user with access to the /testing folder will have access to the service.

NOTE: Services cannot be renamed because the location of the service is specified in the name and you cannot move services between folders. DC/OS 1.9 does not accept slashes in service names. You may be able to create the service, but you will encounter unexpected problems.

Interacting with your foldered service

  • Interact with your foldered service via the DC/OS CLI with this flag: --name=/path/to/myservice.
  • To interact with your foldered service over the web directly, use http://<dcos-url>/service/path/to/myservice. For example, http://<dcos-url>/service/testing/hive-metastore/v1/endpoints.