GitXplorerGitXplorer
t

aio-hs2

public
1 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
2637fe9b5f82f685e9ebaa996be3c60b38acfe0f

Implement reconnect support, changed API, bump to v0.2

ttailhook committed 11 years ago
Unverified
6a9a3de22d640f7dca543a6804f07864c2d4c6d8

Fix LICENSE file

ttailhook committed 11 years ago
Unverified
cecd5f96f721b9aba21c1c51823d13f4e268e405

Fix README file

ttailhook committed 11 years ago
Unverified
955877764718bb888a92ba5cf79c06bb840fb913

Fix setup py, bump version to 0.1.1

ttailhook committed 11 years ago
Unverified
ec8b19925d0ad8eba95fb629a0b9e02560ece297

Fixed setup.py

ttailhook committed 11 years ago
Unverified
c06072d055210b9de0716cc5f5c98da181783bff

First working version

ttailhook committed 11 years ago

README

The README file for this repository.

=============================== Asyncio-base Hiveserver2 Client

This client can connect both hiveserver2 from hive and sharkserver2 for shark (because latter have same protocol and semantics)

Package contains:

  • thrift/ -- a copy of thrift python library adapted for python3. The code originally in https://github.com/tailhook/thrift/tree/asyncio
  • aiohs2/lowlevel -- python files generated for TCLIService.thrift from hive. To regenerate bindings run ./genbindings.sh (you need to build thrift from aformentioned branch and you need hive sources, script will not do that for you)

To use a library you just install it with pip or setup.py.

Basic Usage

.. code-block:: python

cli = Client('localhost', 10000)
with (yield from cli.cursor()) as cur:
    yield from cur.execute("SELECT * FROM table LIMIT 10")
    rows = yield from cur.fetch()
    print("ROWS", rows)

Upgrade Notes

In version 0.1 client was connected by Client.connect and cursor was created by a plain function (not coroutine). It's changed to support transparent reconnection.