PDavid commented on PR #8600:
URL: https://github.com/apache/hbase/pull/8600#issuecomment-5777325241
OK, now I was able to get back to this and tested it.
I checked out this branch which updates the thrift version in the client.
Started a local pseudo-distributed HBase cluster, started Thrift server
(using shaded 0.23.0 libthrift version).
- Created a new virtualenv, activated it and installed the required Python
dependencies for the Python Thrift example DemoClient
- Run the Python DemoClient
```
$ virtualenv e -p python3
created virtual environment CPython3.9.22.final.0-64-x86_64 in 230ms
creator CPython3Posix(dest=/home/ws1test3/projects/upstream/hbase/e,
clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle,
via=copy, app_data_dir=/home/ws1test3/.cache/virtualenv)
added seed packages: pip==26.0.1, setuptools==82.0.1
activators
BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator,XonshActivator
$ source e/bin/activate
(e) $ pip install -r hbase-examples/src/main/python/requirements.txt
Collecting six==1.17.0 (from -r
hbase-examples/src/main/python/requirements.txt (line 19))
Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting thrift==0.24.0 (from -r
hbase-examples/src/main/python/requirements.txt (line 20))
Downloading thrift-0.24.0.tar.gz (69 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: thrift
Building wheel for thrift (pyproject.toml) ... done
Created wheel for thrift:
filename=thrift-0.24.0-cp39-cp39-linux_x86_64.whl size=463129
sha256=181fc8047992ca7fdacb414ed8ea9f76003bde330b241f6a7289bf948571e46d
Stored in directory:
/home/ws1test3/.cache/pip/wheels/8b/30/82/5f23d150ae7dc93479e1f1ce09b51a36bbd785f08ae6a404b6
Successfully built thrift
Installing collected packages: thrift, six
Successfully installed six-1.17.0 thrift-0.24.0
(e) $ python hbase-examples/src/main/python/thrift1/DemoClient.py localhost
9090
scanning tables...
creating table: demo_table
column families in demo_table:
column: entry:, maxVer: 10
column: unused:, maxVer: 3
disabling table: disabled_table
Starting scanner...
row: foo, cols: entry:foo => foo-;
row: foo-生ビール, cols: entry:foo => foo-生ビール;
row: foo-, cols: entry:foo => foo-;
Scanner finished...
row: 00100, cols: unused: => DELETE_ME;
row: 00100, cols: entry:foo => FOO; entry:num => 0;
row: 00100, cols: entry:num => -1;
row: 00100, cols: entry:num => 100; entry:sqr => 10000;
row: 00100, cols: entry:num => 100; entry:sqr => 10000;
row: 00100, values: 100; -1; 0;
row: 00099, cols: unused: => DELETE_ME;
row: 00099, cols: entry:foo => FOO; entry:num => 0;
row: 00099, cols: entry:num => -1;
row: 00099, cols: entry:num => 99; entry:sqr => 9801;
row: 00099, cols: entry:num => 99; entry:sqr => 9801;
row: 00099, values: 99; -1; 0;
row: 00098, cols: unused: => DELETE_ME;
row: 00098, cols: entry:foo => FOO; entry:num => 0;
row: 00098, cols: entry:num => -1;
row: 00098, cols: entry:num => 98; entry:sqr => 9604;
row: 00098, cols: entry:num => 98; entry:sqr => 9604;
row: 00098, values: 98; -1; 0;
row: 00097, cols: unused: => DELETE_ME;
...
column with name: entry:
ColumnDescriptor(name=b'entry:', maxVersions=10, compression='NONE',
inMemory=False, bloomFilterType='NONE', bloomFilterVectorSize=0,
bloomFilterNbHashes=0, blockCacheEnabled=False, timeToLive=2147483647)
column with name: unused:
ColumnDescriptor(name=b'unused:', maxVersions=3, compression='NONE',
inMemory=False, bloomFilterType='NONE', bloomFilterVectorSize=0,
bloomFilterNbHashes=0, blockCacheEnabled=False, timeToLive=2147483647)
Starting scanner...
row: 00020, cols: entry:num => 20; entry:sqr => 400;
row: 00021, cols: entry:num => 21; entry:sqr => 441;
row: 00022, cols: entry:num => 22; entry:sqr => 484;
row: 00023, cols: entry:num => 23; entry:sqr => 529;
row: 00024, cols: entry:num => 24; entry:sqr => 576;
row: 00025, cols: entry:num => 25; entry:sqr => 625;
row: 00026, cols: entry:num => 26; entry:sqr => 676;
row: 00027, cols: entry:num => 27; entry:sqr => 729;
row: 00028, cols: entry:num => 28; entry:sqr => 784;
row: 00029, cols: entry:num => 29; entry:sqr => 841;
row: 00030, cols: entry:num => 30; entry:sqr => 900;
row: 00031, cols: entry:num => 31; entry:sqr => 961;
row: 00032, cols: entry:num => 32; entry:sqr => 1024;
row: 00033, cols: entry:num => 33; entry:sqr => 1089;
row: 00034, cols: entry:num => 34; entry:sqr => 1156;
row: 00035, cols: entry:num => 35; entry:sqr => 1225;
row: 00036, cols: entry:num => 36; entry:sqr => 1296;
row: 00037, cols: entry:num => 37; entry:sqr => 1369;
row: 00038, cols: entry:num => 38; entry:sqr => 1444;
row: 00039, cols: entry:num => 39; entry:sqr => 1521;
Scanner finished...
(e) $ echo $?
0
```
--> The Python DemoClient was successful with the 0.24.0 Thrift version.
:heavy_check_mark:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]