Giter Club home page Giter Club logo

aliyun-apsaradb-hbase-demo's Introduction

demos for apsaradb-hbase platform, including spark and phoenix.

aliyun-apsaradb-hbase-demo's People

Contributors

allan163 avatar bill1208 avatar bzhangyan11 avatar cuiyuan avatar cyhust avatar farmerworking avatar fgwe avatar hujianhong avatar jaime0815 avatar lw309637554 avatar mammothcm avatar maxwell-guo avatar nurseryboy avatar qingsonggithub avatar roanne avatar xandershen avatar xiaowing avatar

Stargazers

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

Watchers

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

aliyun-apsaradb-hbase-demo's Issues

Two Problems while use py api to connect lindorm

When I use python demo (aliyun-apsaradb-hbase-demo/lindormsql-python/demo.py ) to connect Lindorm and try to upsert batch data, there are some problems.

My local env is py3.8 in M1 MacBook Pro. And phoenixdb in version 1.1.0.

I found there are two problems in Line 29 and 52.

Line 29:

upsert into test_python(c1, c2) values(?,?)
Traceback (most recent call last):
  File "/Users/yt/PyProjects/PyConnLindorm/demo.py", line 43, in <module>
    stat.executemany(sql_upsert, [(3, 3), (4, 4)])
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/cursor.py", line 249, in executemany
    return self._connection._client.execute_batch(
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 559, in execute_batch
    response_data = self._apply(request)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 227, in _apply
    parse_error_protobuf(response_body)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 128, in parse_error_protobuf
    raise_sql_error(err.error_code, err.sql_state, err.error_message)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 96, in raise_sql_error
    raise errors.InternalError(message, code, sqlstate)
phoenixdb.errors.InternalError: ('RuntimeException: java.sql.SQLException: addBatch not supported -> SQLException: addBatch not supported', 4294967295, '00000', None)
Exception ignored in: <function Connection.__del__ at 0x101e85940>
Traceback (most recent call last):
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/connection.py", line 60, in __del__
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/connection.py", line 114, in close
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 397, in close_connection
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 214, in _apply
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1086, in SerializeToString
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1095, in SerializePartialToString
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1107, in InternalSerialize
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/descriptor.py", line 166, in GetOptions
ImportError: sys.meta_path is None, Python is likely shutting down

Why "addBatch not supported"?

And problem in line 52:

offline table test_python
Traceback (most recent call last):
  File "/Users/yt/PyProjects/PyConnLindorm/demo.py", line 59, in <module>
    statement.execute(sql_offline_table)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/cursor.py", line 224, in execute
    results = self._connection._client.prepare_and_execute(
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 461, in prepare_and_execute
    response_data = self._apply(request, 'ExecuteResponse')
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 227, in _apply
    parse_error_protobuf(response_body)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 128, in parse_error_protobuf
    raise_sql_error(err.error_code, err.sql_state, err.error_message)
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 96, in raise_sql_error
    raise errors.InternalError(message, code, sqlstate)
phoenixdb.errors.InternalError: ('RuntimeException: java.sql.SQLException: java.sql.SQLException: offline table test_python not supported -> SQLException: java.sql.SQLException: offline table test_python not supported -> SQLException: offline table test_python not supported', 4294967295, '00000', None)
Exception ignored in: <function Connection.__del__ at 0x1036e9940>
Traceback (most recent call last):
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/connection.py", line 60, in __del__
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/connection.py", line 114, in close
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 397, in close_connection
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/phoenixdb/avatica/client.py", line 214, in _apply
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1086, in SerializeToString
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1095, in SerializePartialToString
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/internal/python_message.py", line 1107, in InternalSerialize
  File "/Users/yt/Library/Python/3.8/lib/python/site-packages/google/protobuf/descriptor.py", line 166, in GetOptions
ImportError: sys.meta_path is None, Python is likely shutting down

also "offline table test_python not supported"?

when will support this two ^-^

jdk 17 兼容性

驱动中com.aliyun.lindorm.table.client.Driver#connect

final Properties info = new Properties(userInfo);

这段代码, 初始化info 但是为空.
jdk17中

  public Properties(Properties defaults) {
        this(defaults, 8);
    }

    private Properties(Properties defaults, int initialCapacity) {
        // use package-private constructor to
        // initialize unused fields with dummy values
        super((Void) null);
        map = new ConcurrentHashMap<>(initialCapacity);
        this.defaults = defaults;

        // Ensure writes can't be reordered
        UNSAFE.storeFence();
    }
    /**
     * Properties does not store values in its inherited Hashtable, but instead
     * in an internal ConcurrentHashMap.  Synchronization is omitted from
     * simple read operations.  Writes and bulk operations remain synchronized,
     * as in Hashtable.
     */
    private transient volatile ConcurrentHashMap<Object, Object> map;

需要更改实现. 兼容jdk17

hbase go create namespace error.

����������������)org.apache.hadoop.ipc.RPC$VersionMismatch���CServer IPC version [6, 3] cannot communicate with client version 32���������������sz���������

image

kerberos support?

I want to connect kerbernized hbase via this demo, but i can not find any sasl protocol in thrift , so whether it supports access to kerbernized clusters?

Supports python asynchronous connection

Based on the implementation logic of the Avatica protocol in the phoenixdb package, the mode of connecting to Avatica is changed from synchronous mode to asynchronous mode. An asynchronous version of the python connection module aiophoenixdb is implemented:

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.