Uninstalling the Big Match Ambari service from your cluster (V11.5.0.5 and above)

Use this task to uninstall the Big Match Ambari service from your cluster.

Before you begin

Before running the uninstallation script, ensure that all services in the Ambari cluster are up and running. This is necessary as the uninstallation script will interact with many of these services to remove Big Match specific data and configuration.

About this task

Important: This topic covers uninstalling the Big Match Service for Big Match V11.5.0.5 and above. For information about installing or uninstalling Big Match V11.5.0.4, see Installing and uninstalling Big Match Ambari service for Hortonworks or IBM Open Platform (V11.5.0.4). For information about installing or uninstalling Big Match V11.5.0.3 and earlier, see Installing and uninstalling Big Match Ambari service for Hortonworks or IBM Open Platform (V11.5.0.3 and earlier).

Big Match can be uninstalled by using an automated uninstallation script, uninstall.sh. The uninstall.sh script is in the /usr/ibmpacks/current/bigmatch/bin/ directory.

Note: The uninstallation script can be run from any node in the cluster. There must be passwordless SSH access from this node to all other nodes in the cluster. The uninstallation script must be run with sudo.
The script prompts you to provide information about the Ambari server. Required information includes:
  • Ambari host
  • Port
  • User
  • Password
  • Protocol (http or https)
  • Cluster name

These values are used to modify service configurations and to remove the Big Match service from Ambari.

Procedure

  1. Go to the /usr/ibmpacks/current/bigmatch/bin/ directory.
  2. Using sudo, run the uninstall.sh script on any node in the cluster, as long as that node has passwordless access to the other nodes.
    sudo ./uninstall.sh
    The script prompts you to provide details about the Ambari server.
    Tip: If you cannot enable root SSH access between nodes, complete the following work around steps:
    1. On one of the nodes, run the uninstall.sh script as a non-root user with sudo permissions.
      sudo ./uninstall.sh
    2. Allow the script to proceed with its uninstallation tasks until it prompts you to provide credentials for connecting to node2 as a root user. At this point, exit out of the script.
    3. Run the following cleanup commands, in order:
      • Only on the node with the Oozie server installed:
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py oozie-server 
      • On all nodes:
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py hbase
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py hadoop
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py oozie-client
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py pig
        sudo /usr/ibmpacks/current/bigmatch/etc/python/cleanNode.py bigmatch
    4. Repeat the previous step for each node in the cluster.

    The uninstall script produces a log file in the /tmp directory with a name that follows the format /tmp/BigMatchUninstall-<timestamp>.log.

  3. The Big Match uninstall process can sometimes fail to unlink files from the Oozie server component. When this happens, future installations of Big Match can also fail unless the links are removed.
    1. Check the /usr/hdp/current/oozie-server/libext/ directory on the node running Oozie server.
    2. If you see any of the following symbolic links, you must remove them:
      
      0.com.ibm.mdm.bigmatch.hbase-*.jar  
      0.hbase-common.jar    
      0.hbase-server.jar                  
      0.hbase-client.jar                         
      0.hbase-protocol.jar  
      0.htrace-core-*.jar
    3. To remove a link, run an unlink command using the following format:
      sudo unlink /usr/hdp/current/oozie-server/libext/<jar>
  4. If you are uninstalling Big Match version 11.5.0.10 or earlier, you must clean up the Ambari configuration to remove Big Match content. For information, see Removing the Big Match service from Ambari (V11.5.0.5 to V11.5.0.10).
    Important: Failure to properly clean up the Ambari configuration will mean you cannot re-install Big Match.
  5. Clean up the Ambari database.
    Note: These steps use PostgreSQL database commands as an example.
    1. Log into the Ambari database:
      psql ambari -U ambari
      Provide the password (the default is bigdata).
    2. Remove the Big Match repositories from the database.
      • For HDP 2.x stacks:
        1. In the repo_version table, copy the value of the repositories column.
        2. Update it to remove the Big Match repositories.
          select repositories from repo_version where display_name like '%HDP%';
        For example, if the original value is
        [{"OperatingSystems/ambari_managed_repositories":true,"repositories":[{"Repositories/base_url":"http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.5.1175","Repositories/repo_name":"HDP","Repositories/repo_id":"HDP-2.6","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]},{"Repositories/base_url":"http://public-repo-1.hortonworks.com/HDP-GPL/centos7/2.x/updates/2.6.5.1175","Repositories/repo_name":"HDP-GPL","Repositories/repo_id":"HDP-2.6-GPL","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]},{"Repositories/base_url":"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7","Repositories/repo_name":"HDP-UTILS","Repositories/repo_id":"HDP-UTILS-1.1.0.22","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]},{"Repositories/base_url":"http://birepo-build.svl.ibm.com/repos/Bigmatch/RHEL7/x86_64/11.5.0.10-SNAPSHOT/20191121_1808/","Repositories/repo_name":"BIGMATCH-x86_64","Repositories/repo_id":"BIGMATCH-x86_64-20191121_1808","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]},{"Repositories/base_url":"http://birepo-build.svl.ibm.com/repos/Bigmatch/RHEL7/noarch/11.5.0.10-SNAPSHOT/20191121_1808/","Repositories/repo_name":"BIGMATCH-noarch","Repositories/repo_id":"BIGMATCH-noarch-20191121_1808","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]},{"Repositories/base_url":"http://public-repo-1.hortonworks.com/HDP-SOLR-2.6-100/repos/centos7","Repositories/repo_name":"HDP-SOLR","Repositories/repo_id":"HDP-SOLR-2.6-100","Repositories/unique":false,"Repositories/tags":[],"Repositories/applicable_services":[]}],"OperatingSystems/os_type":"redhat7"}]
        Update the column by removing the Big Match repositories as follows:
        update repo_version set repositories = '<edited value after removing Big Match repos>' where display_name like '%HDP%';
      • For HDP 3.x stacks:
        1. Check the repo_definition table in the database for Big Match references. Either search the entire table or use the following command:
          select * from repo_applicable_services where service_name like '%BIGMATCH%'; select * from repo_definition where repo_name like '%BIGMATCH-%';
          
          ambari=> select * from repo_definition where repo_name like '%BIGMATCH-%';
          shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
           id  | repo_os_id |    repo_name    |            repo_id            |                                           base_url                                            | distribution | components 
          | unique_repo | mirrors 
          -----+------------+-----------------+-------------------------------+-----------------------------------------------------------------------------------------------+--------------+------------
          +-------------+---------
           102 |         11 | BIGMATCH-noarch | BIGMATCH-noarch-20200331_2114 | http://birepo-build.svl.ibm.com/repos/Bigmatch/RHEL7/noarch/11.5.0.11-SNAPSHOT/20200331_2114/ |              |            
          |           0 | 
           101 |         11 | BIGMATCH-x86_64 | BIGMATCH-x86_64-20200331_2114 | http://birepo-build.svl.ibm.com/repos/Bigmatch/RHEL7/x86_64/11.5.0.11-SNAPSHOT/20200331_2114/ |              |            
          |           0 | 
          (2 rows)
          
          ambari=> select * from repo_applicable_services where service_name like '%BIGMATCH%';
           repo_definition_id | service_name 
          --------------------+--------------
                          102 | BIGMATCH
                          101 | BIGMATCH
          (2 rows)
          
        2. Delete the rows with Big Match references, as follows:
          delete from repo_applicable_services where service_name like '%BIGMATCH%'; delete from repo_definition where repo_name like '%BIGMATCH-%';
  6. Restart the Ambari server.
    ambari-server restart
    The Ambari user interface should no longer show the Big Match repository under Admin > Stack and Versions > Versions > Manage Versions > <HDP VERSION NAME> > Repositories
  7. Restart all services that require Ambari.

What to do next

Clean up Ambari (for removing V11.5.0.10 or below)

Follow the steps described in Removing the Big Match service from Ambari (V11.5.0.5 to V11.5.0.10).

Delete the extracted Big Match installation folder

Delete the BigMatch directory that was created when the Big Match installation was run. This ensures that a future Big Match installation won't pull files from that location.

Clean up the /bigmatch folder on each node

Optionally, on each node, delete /usr/ibmpacks/bigmatch if it was not already deleted by the uninstall.sh script.

Clean up Kerberos-enabled environments
If the environment was enabled with Kerberos, the Big Match installation created key tabs that you can delete:
  • All nodes: /etc/security/keytabs/bigmatch.headless.keytab
  • Server node: /etc/security/keytabs/bigmatch.service.keytab
Clean up Oozie SSL-enabled environments

If the Oozie service was SSL-enabled in this environment, check to confirm that the environment is still secure.

For example, navigate to the Oozie UI and confirm that it redirects to the secure port. The default URL is https://<oozie server hostname>:11443/oozie.

If Oozie is no longer SSL-enabled, then re-enable it. For example:
  1. Run the following command:
    /usr/hdp/current/oozie-server/bin/oozie-setup.sh prepare-war -secure
  2. Restart the Oozie service.

Your cluster is now ready to install a new version of InfoSphere Big Match for Hadoop