Page tree
Skip to end of metadata
Go to start of metadata
  1. Backup existing Jethro instance (not mandatory for development environment).
  2. As part of the upgrade from V2.X to V3.X you will need to drop the existing cubes. You can use the following to generate a script to regenerate the cubes once the upgrade is completed.  
    1. JethroClient {instance-name} <host>:<port> -p <password> -q "SHOW CUBES;" -c -d '|' --no_header -o {Show_Cubes_Output}
      cat {Show_Cubes_Output} | awk -F'|' '{  print "GENERATE CUBES " $1 " FROM "  $12 ";" }' > {Generate cubes output file}

      For example:

      JethroClient sanity_sales localhost:9111 -p jethro -q "SHOW CUBES;" -c -d '|' --no_header -o Show_Cubes_Output.csv
      cat Show_Cubes_Output.csv | awk -F'|' '{  print "GENERATE CUBES " $1 " FROM "  $12 ";" }' > Generate_Cubes.sql
    2. The Generate_Cubes.sql will have lines similar to the following: 

      GENERATE CUBES cube1 FROM SELECT store_country, store_name, SUM(net_profit) FROM sales_demo GROUP BY store_country, store_name;
       
  3. Using Jethro Client run the following to drop cubes and adaptive cache. 

    DROP ADAPTIVE STORAGE;
  4. Stop Jethro services on all nodes:

    service jethro stop
  5. If your existing Jethro version is earlier than 2.1.0 you should perform the following, otherwise skip to next step.  To find your current version of Jethro you can run the command show version via Jethro Client. 

    1. Backup schema files.
      For HDFS instance:

      hadoop fs –copyToLocal {instance-location}/metadata/schema* /backup20X/

      For local instance:

      cp {instance-location}/metadata/schema* /backup20X/

      Instance-location can be found in local-conf.ini file as the value of storage.root.path variable.  

    2. Upgrade to Jethro 2.1.4 (latest 2.X release) on all nodes:

      1. Download the relevant rpm:
        For CDH:

        wget https://jethrodownload.s3.amazonaws.com/jethro-2.1.4-15313.x86_64.rpm

        For MapR:

        wget https://jethrodownload.s3.amazonaws.com/jethro-MapR.2.1.4-15313.x86_64.rpm

        For local instance:

        wget  https://jethrodownload.s3.amazonaws.com/jethro-2.1.4-15313.x86_64.rpm
      2. Install the downloaded rmp file:

        sudo rpm –Uvh {downloaded rpm}
    3. Start Jethro services with user "jethro":

      su - jethro
      service jethro start
    4. Test a random query via Jethro CLI.

    5. Update schema.
      For example:

      CREATE TABLE TEST(A INTEGER);
    6. Stop Jethro services on all nodes:

      service jethro stop
  6. Backup schema files to allow easy downgrade if needed (data model is changed by the new version, therefore schema files will be edited).
    For HDFS instance:

    hadoop fs –copyToLocal {instance-location}/metadata/schema* /backup214/

    For local instance:

    cp {instance-location}/metadata/schema* /backup214/

    Instance-location can be found in local-conf.ini file as the value of storage.root.path variable.  

  7. Upgrade to Jethro 3.X on all nodes: 

    1. Download the relevant rpm:
      For CDH:

      wget http://jethrodownload.s3.amazonaws.com/jethro-3.3.0-17456.x86_64.rpm

      For MapR:

      wget http://jethrodownload.s3.amazonaws.com/jethro-MapR.3.3.0-17456.x86_64.rpm

      For local instance:

      wget http://jethrodownload.s3.amazonaws.com/jethro-3.3.0-17456.x86_64.rpm
    2. Install the downloaded rpm file:

      sudo rpm –Uvh {downloaded rpm}
  8. Copy updated log properties file to local instance folder with user "jethro" on all nodes:

    su - jethro
    cp /opt/jethro//current/conf/default-log4j.properties /opt/jethro/instances/{instance-name}/log4j.properties
    cp /opt/jethro//current/conf/default-jethrolog.properties /opt/jethro/instances/{instance-name}/jethrolog.properties
  9. Start Jethro services:

    service jethro start
  10. In case you captured the cubes you had before the upgrade as previously instructed, you can now regenerate them using the following command. 

    JethroClient {instance-name} <host>:<port> -p <password> -i <Generate cubes output file>
    JethroClient sanity_sales localhost:9111 -p jethro -i Generate_Cubes.sql
  11. If you want to turn on auto cube update and generation, run the following commands via JethroClient. 

    set global dynamic.aggregation.auto.generate.new.cubes.enable=1;
    set global dynamic.aggregation.auto.regenerate.cubes.enable=1;
    set global dynamic.aggregation.auto.update.final.cubes.enable=1;
    set global dynamic.aggregation.auto.update.incremental.cubes.enable=1;
  • No labels