Uninstalling the Impala UDFs

The process to remove the Impala UDFs involves the following steps:

  1. Drop the Impala UDFs using the helper script.
  2. Remove the .so file from HDFS.

To remove the .so file:

  1. Log in to the master node.

  2. To delete the .so file from HDFS, run the following command:

    sudo -u hdfs hadoop fs -rmr -skipTrash /opt/protegrity/impala/udfs/*
    

Dropping the Impala user-defined functions

  1. Log in to the master node with a user account having permissions to create and drop UDFs.

  2. To navigate to the directory that contains the helper script, run the following command:

    cd /opt/cloudera/parcels/PTY_BDP/pepimpala/sqlscripts
    
  3. To create the UDFs using the helper script, run the following command:

    impala-shell -i node1 -k -f dropobjects.sql
    
  4. Press ENTER.

    The script drops all the user-defined functions for Impala.

    Starting Impala Shell with Kerberos authentication using Python 2.7.18
    Using service name 'impala'
    Warning: live_progress only applies to interactive shell sessions, and is being skipped for now.
    Opened TCP connection to node1:21000
    Connected to node1:21000
    Server version: impalad version 4.0.0.7.1.8.0-801 RELEASE (build a3b56f90d9c31ebfa5ce3c266700284a420db28f)
    Query: ---------------------------------------------------------------------
    -- Protegrity DPS User Defined Functions.
    -- Copyright (c) 2014 Protegrity USA, Inc. All rights reserved
    --
    ---------------------------------------------------------------------
    
    DROP FUNCTION pty_getversion()
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.15s
    Query: DROP FUNCTION pty_getversionextended()
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_whoami()
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: -- string UDFs ------
    DROP FUNCTION pty_stringenc( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_stringdec( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_stringins( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_unicodestringins( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_unicodestringfpeins( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_stringsel( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_unicodestringsel( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_unicodestringfpesel( STRING, STRING )
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: --- Integer Udfs -----------------------------
    DROP FUNCTION pty_integerenc( INTEGER, STRING)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.13s
    Query: DROP FUNCTION pty_integerdec( STRING, STRING)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_integerins( INTEGER, STRING)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_integersel( INTEGER, STRING)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: --------------double udfs ----------------------
    DROP FUNCTION pty_doubleenc( double, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_doubledec( string, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_doubleins( double, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_doublesel( double, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: -------------float udfs -------------------------
    
    DROP FUNCTION pty_floatenc( float, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_floatdec( string, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_floatins( float, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_floatsel( float, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: -------------bigint udfs ------------------------
    
    DROP FUNCTION pty_bigintenc( bigint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_bigintdec( string, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_bigintins( bigint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: DROP FUNCTION pty_bigintsel( bigint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: -------------date udfs --------------------------
    
    DROP FUNCTION pty_dateenc( date, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_datedec( string, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_dateins( date, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.13s
    Query: DROP FUNCTION pty_datesel( date, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    Query: -------------smallint udfs ---------------------
    
    DROP FUNCTION pty_smallintenc( smallint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_smallintdec( string, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.11s
    Query: DROP FUNCTION pty_smallintins( smallint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.13s
    Query: DROP FUNCTION pty_smallintsel( smallint, string)
    +----------------------------+
    | summary                    |
    +----------------------------+
    | Function has been dropped. |
    +----------------------------+
    Fetched 1 row(s) in 0.12s
    

Last modified : February 20, 2026