Managing Data Operating System
Also available as:
PDF
loading table of contents...

Configure External HBase for Timeline Service 2.0

Based on your requirements, you can configure YARN to point to an external instance of the HBase service instead of using the HBase instance that is available with Timeline Service 2.0.

You must have installed HBase on your Hortonworks Data Platform (HDP) cluster before configuring the instance for Timeline Service 2.0.

You can configure the HBase service for Timeline Service 2.0 on your HDP cluster either before or after installing YARN.

  1. Enable the use_external_hbase property under Advanced yarn-hbase-env.
    Depending on your requirement, use either of the following options to access the use_external_hbase property using Ambari:
    If... Then...
    YARN is already installed on the HDP cluster In Ambari Web, browse to Services > YARN > Configs, then expand Advanced yarn-hbase-env.
    You are using Ambari to install YARN on the HDP cluster On the Customize Services screen of the Add Service wizard, browse to YARN > Configs, then expand Advanced yarn-hbase-env.
    Note
    Note
    You must perform this step as part of the procedure to install YARN as a service using Ambari. For more information about using Ambari to add a service, see the Managing and Monitoring Ambari documentation.
  2. Update the following properties under Advanced yarn-hbase-env to match the values of the corresponding properties in the external HBase instance:
    • hbase.zookeeper.quorum
    • hbase.zookeeper.property.clientPort
    • zookeeper.znode.parent
  3. Save the configured property changes and restart all YARN services.
  4. Copy the hbase-site.xml file to the timeline server configuration directory.
    mv /usr/hdp/3.1.4.0-315/hadoop/conf/embedded-yarn-ats-hbase/hbase-site.xml /usr/hdp/3.1.4.0-315/hadoop/conf/embedded-yarn-ats-hbase/hbase-site.xml.bak
    cp /etc/hbase/conf/hbase-site.xml /usr/hdp/3.1.4.0-315/hadoop/conf/embedded-yarn-ats-hbase/ 
    Note
    Note
    <hdp-version> indicates the installed HDP version.
  5. Log on to a cluster node and create the required HBase tables.
    export HBASE_CLASSPATH_PREFIX={hdp-dir}/hadoop-yarn-client/timelineservice/*; <hdp-dir>/current/hbase-client/bin/hbase org.apache.hadoop.yarn.server.timelineservice.storage.TimelineSchemaCreator -Dhbase.client.retries.number=35 -create -s
    Note
    Note
    <hdp-dir> indicates the directory where HDP is installed.
  6. From the HBase shell, grant the yarn user with the required permissions to access the HBase tables created in Step 4.
    grant 'yarn', 'yarn-ats' 'RWXCA'
The Timeline Service V2.0 Reader component accesses and reads data from the new HBase instance.
Note
Note
If you want to update YARN configuration to point to an embedded HBase instance, you must revert the properties use_external_hbase, hbase.zookeeper.quorum, hbase.zookeeper.property.clientPort, and zookeeper.znode.parent to their earlier values.