Coder Social home page Coder Social logo

hmsclient's Introduction

HMSClient

This project aims to be an up to date Python client to interact with the Hive metastore using the Thrift protocol.

Installation

Install it with pip install hmsclient or directly from source

python setup.py install

Usage

Using it from Python is simple:

from hmsclient import hmsclient
client = hmsclient.HMSClient(host='localhost', port=9083)
with client as c:
    c.check_for_named_partition('db', 'table', 'date=20180101')

Regenerate the Python thrift library

The hmsclient.py is just a thin wrapper around the generated Python code to interact with the metastore through the Thrift protocol.

To regenerate the code using a newer version of the .thrift files, you can use generate.py (note: you need to have thrift installed, see here)

python generate.py --help

Usage: generate.py [OPTIONS]

Options:
  --fb303_url TEXT      The URL where the fb303.thrift file can be downloaded
  --metastore_url TEXT  The URL where the hive_metastore.thrift file can be
                        downloaded
  --package TEXT        The package where the client should be placed
  --subpackage TEXT     The subpackage where the client should be placed
  --help                Show this message and exit.

Otherwise the defaults will be used.

hmsclient's People

Contributors

gglanzani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hmsclient's Issues

hmsclient doesn't set ugi on connection open with hms

Our hms users through hmsclient couldn't pass their user names to the server, which makes it difficult to debug when hms server side has some perf issue due to user queries.
We want to expose user and group parameters from hmsclient so there is a way from the client side to pass in the user info without having to add a wrapper on top of hmsclient.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.