This repository has been archived by the owner on Jun 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Started
ali1rathore edited this page Sep 10, 2018
·
1 revision
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
Use the snap-tool
command to start and stop SNAP
$SNAP_HOME/bin/snap-tool start
To connect to SNAP Server:
beeline -c jdbc:hive2://<hostname>:10000/default;auth=noSasl "a" "";
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)
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:
-
Stop the SNAP Server
-
Edit the sparkline.properties file
-
Start the SNAP Server
NoteThe SNAP Server is a thin wrapper on the Apache Spark startThriftServer which is based on Hive Thrift server.