Setting up a mini HiveServer

You follow a step-by-step procedure to get a docker image of HiveServer (HS2) and example files to simulate working with HiveServer in a cluster. In local mode, you do not get actual recommendations, but you experiment with and understand recommendations using this mode without incurring any cloud costs.

You download the workload-insights archive and unpack it. You run one docker command to start HiveServer and another to load the TPC-DS schema. Example query files, based on the TPC-DS Benchmark DDL queries, are included in the package. No actual data is needed.

  • Check that Java 8 or later is installed.
  • Install Docker (https://docs.docker.com/get-docker/).
  • Check that Docker is working: docker run hello-world
  1. On the Overview page under Virtual Warehouses, click options in a Virtual Warehouse that enables Unified Analytics.
  2. Click Download Workload Insights to download the workload-insights archive.
  3. On your file system, unpack the archive.
  4. Set environment variable WI_HOME="$PWD".
    For example, on the command line of a terminal:
    export WI_HOME="$PWD"
  5. Set environment variable WI_CLASSPATH. WI_CLASSPATH="*:./lib/*:$WI_HOME/target/*:$WI_HOME/target/lib/*"
  6. Start up a HiveServer (HS2) container named mini-hs2 that listens on port 10000.
    docker run -p "10000:10000" -d --name mini-hs2 zabetak/hs2-embedded:1.0.2.7.2.3.0-220     
  7. Load the TPC-DS schema required for running examples.
    docker exec mini-hs2 schema-load tpcds
    Ignore any log4j warning messages.
  8. Run the recommender.