Rate This Document
Findability
Accuracy
Completeness
Readability

Maintaining the Feature

To upgrade OmniMV, delete all library files, including binary SO files and OmniMV files. Then upload the latest package and install it. Perform the following steps on the management node. Ensure that no task is being executed on the upper-layer engine of OmniMV. Uninstalling the OmniMV software requires deleting the configuration file, binary SO files, and OmniMV files. Perform the following steps only on the management node. You can run the command to query the OmniMV version.

Upgrading OmniMV

  1. Delete binary SO files and OmniMV files. The installation directory /opt/omnimv is used as an example.
    1
    rm -rf /opt/omnimv
    
  2. Download and upload the latest OmniMV installation package to the management node. Then installing OmniMV by following instructions in Installing the Software.
  3. Optional: After the Spark version is updated, update the materialized view metadata. If the Spark version is not updated, skip this step.
    1. Delete the materialized view metadata.
      1. Set the database name.
        1
        DATABASE="tpcds_bin_partitioned_varchar_orc_3000"
        
      2. Delete the materialized view metadata.
        1
        2
        hdfs dfs -rm -r -f /omnimv/plugin_metadata/${DATABASE}
        hdfs dfs -rm -r -f /omnimv/plugin_metadata/mock
        
    2. Optional: Update the materialized view metadata of Spark 3.1.1 in the database.
      1. Obtain the command for updating the materialized view metadata.
        1
        2
        3
        4
        sqls=""
        mvs=`spark-sql --master local -e "SHOW MATERIALIZED VIEWS" --conf spark.sql.extensions=com.huawei.boostkit.spark.OmniMV --jars /opt/omnimv/boostkit-omnimv-spark-3.1.1-1.2.0-aarch64.jar --database ${DATABASE} | grep -P "^${DATABASE}" |awk -F "\t" '{print $2}' |grep -v "partition"` ; \
        for mv in `echo "$mvs"|tr -s '|' ' '`;do sqls="ALTER MATERIALIZED VIEW $mv ENABLE REWRITE;$sqls" ; done
        echo $sqls|tr -s ';' '\n'
        
      2. Run the command.
        1
        spark-sql --master local --database ${DATABASE}  --jars /opt/omnimv/boostkit-omnimv-spark-3.1.1-1.2.0-aarch64.jar --conf 'spark.sql.extensions=com.huawei.boostkit.spark.OmniMV' -e "$sqls"
        
    3. Optional: Update the materialized view metadata of Spark 3.4.3 in the database.
      1. Obtain the command for updating the materialized view metadata.
        1
        2
        3
        4
        sqls=""
        mvs=`spark-sql --master local -e "SHOW MATERIALIZED VIEWS" --conf spark.sql.extensions=com.huawei.boostkit.spark.OmniMV --jars /opt/omnimv/boostkit-omnimv-spark-3.4.3-1.2.0-aarch64.jar --database ${DATABASE} | grep -P "^${DATABASE}" |awk -F "\t" '{print $2}' |grep -v "partition"` ; \
        for mv in `echo "$mvs"|tr -s '|' ' '`;do sqls="ALTER MATERIALIZED VIEW $mv ENABLE REWRITE;$sqls" ; done
        echo $sqls|tr -s ';' '\n'
        
      2. Run the command.
        1
        spark-sql --master local --database ${DATABASE}  --jars /opt/omnimv/boostkit-omnimv-spark-3.4.3-1.2.0-aarch64.jar --conf 'spark.sql.extensions=com.huawei.boostkit.spark.OmniMV' -e "$sqls"
        

Uninstalling OmniMV

  1. Delete the OmniMV software. The installation directory /opt/omnimv is used as an example.
    1
    rm -rf /opt/omnimv
    
  2. Delete the Python environment. The installation directory /opt/anaconda3 is used as an example.
    1
    rm -rf /opt/anaconda3
    

Querying the Version

You can run the version.txt command to query the OmniMV version.
1
cat /opt/omnimv/BoostKit-omnimv_1.2.0/version.txt