Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Getting Started

ali1rathore edited this page Sep 10, 2018 · 1 revision

What is a SNAP Installation

A SNAP installation consists of a directory that is similar to the Spark directory structure. The most important parts of the installation are the SNAP jar (snap-assembly-<snap-version>.jar) and the SNAP properties file (sparkline.properties). The installation directory is also known as SNAP_HOME

Starting the SNAP Thriftserver

Use the snap-tool command to start and stop SNAP

$SNAP_HOME/bin/snap-tool start

Connecting with Standard clients

Using Beeline

To connect to SNAP Server:

beeline -c jdbc:hive2://<hostname>:10000/default;auth=noSasl "a" "";

Using Python:

Use PyHive and Pandas modules to query the SNAP Server as DataFrames.

from pyhive import hive
import pandas as pd
c = hive.Connection(host="0.0.0.0",port=10000)
df = pd.read_sql('describe sales_demo_source',c)

Configuring SNAP parameters

SNAP is configured via a configuration file $SNAP_HOME/conf/sparkline.properties. This file similar to the Spark properties file but with additional parameters for SNAP.

To change the configuration, you must:

  1. Stop the SNAP Server

  2. Edit the sparkline.properties file

  3. Start the SNAP Server

Note
The SNAP Server is a thin wrapper on the Apache Spark startThriftServer which is based on Hive Thrift server.
Clone this wiki locally