GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ankane/hexspace: Ruby client for Apache Spark SQL and Apache Hive

BranchesTags
Open more actions menu

Latest commit

 

History

69 Commits
69 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
lib
lib
 
 
test
test
 
 
thrift
thrift
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Gemfile
Gemfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
hexspace.gemspec
hexspace.gemspec
 
 

Repository files navigation

Hexspace

Ruby client for Apache Spark SQL and Apache Hive

Build Status

Installation

Add this line to your application’s Gemfile:

gem "hexspace"

Getting Started

Create a client

client = Hexspace::Client.new

Execute queries

result = client.execute("SELECT COUNT(*) FROM users")
result.rows
result.columns
result.column_types
result.to_a

Connection Options

There are a number of connection options available.

Hexspace::Client.new(
  host: "localhost",
  port: 10000,
  username: "user",
  password: "secret",
  database: "default",
  mode: :sasl,
  timeout: 10
)

Supported modes are :sasl, :nosasl, :http, and :https. Please create an issue if you need Kerberos.

The timeout is in seconds and only applies to :sasl and :nosasl.

Query Options

Set a timeout

client.execute(statement, timeout: 10)

Spark SQL Setup

Download Apache Spark and start the Thift server.

./sbin/start-thriftserver.sh

Hive Setup

Download Apache Hive and initialize the schema.

./bin/schematool -dbType derby -initSchema

Then start the HiveServer2.

./bin/hiveserver2

It can take a minute or two to be ready. To debug, pass --hiveconf hive.root.logger=DEBUG,console.

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

  • Report bugs
  • Fix bugs and submit pull requests
  • Write, clarify, or fix documentation
  • Suggest or add new features

To get started with development:

git clone https://github.com/ankane/hexspace.git
cd hexspace
bundle install

# create a database
beeline -u jdbc:hive2://localhost:10000 -e 'CREATE DATABASE hexspace_test;'

# run the tests
bundle exec rake test

Resources

  • Spark SQL Reference
  • Hive Language Manual
  • Thrift SASL Spec

About

Ruby client for Apache Spark SQL and Apache Hive

Resources

Readme
Apache-2.0 license
Activity

Stars

10 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.