Comments (5)
You should always use the latest version of thriftpy2, if you could always reproduce this issue, please post a minimal case here, I would like to test it later.
from thriftpy2.
Thank you for your reply. I am using the last version of HappyBase with the latest version of thriftpy2 as the underlying connection to the HBase Thrift server, but encountered an error. The version of HBase Thrift is 0.14.1 and the version of HBase is 2.2.3.The following is an example of my code.
from thriftpy2.
import happybase
# Create a connection to the HBase using HappyBase client
connection = happybase.Connection('localhost', port=9090)
# Create a table named 'mytable'
table_name = 'mytable'
column_family = 'cf'
connection.create_table(
table_name,
{column_family: dict()},
)
# Get the table object for 'mytable'
table = connection.table(table_name)
# Insert a row of data into 'mytable'
table.put(b'row1', {b'cf:col1': b'value1', b'cf:col2': b'value2'})
# Get a row of data from 'mytable'
row = table.row(b'row1')
print(row[b'cf:col1']) # output: b'value1'
# Close the connection
connection.close()
from thriftpy2.
Thank you, I have resolved the issue, it was my mistake. The solution was to replace the hbase.thrift of HappyBase with the one in the hbase cluster, and ensure that the connection protocol and cluster configuration are consistent. Sorry for bothering you for so long.
from thriftpy2.
``TTransportException(type=4,message='Tsocket read 0 bytes')
means the server closed the TCP connection without sending anything. This will happened when the server can't under standing the request protocol (like it's not a thrift server, or have different protocol / transport config), or just got an error when processing the request and the IDL for this request have no exception assumed.
Or, this is a "502" in HTTP protocol.
from thriftpy2.
Related Issues (20)
- When will master be released? HOT 3
- Doesn't build on python 3.11 HOT 7
- Missing tag for 0.4.15 release HOT 2
- Breaking changes in V0.4.15 binary type processing HOT 1
- SSL-related test failures with [SSL: EE_KEY_TOO_SMALL] ee key too small HOT 5
- Duplicate pytest requirements in setup.py HOT 1
- thriftpy2 whether support using in ipv6
- Default value with enum must be declared before used
- thriftpy2 client in nodejs HOT 1
- make_aio_client block thread
- Keep http connection open for long-time HOT 1
- How to decode some data without IDL files that encoding by Apache thrift TBinaryProtocol? HOT 3
- enum type is not correctly handeld HOT 1
- cannot pickle dump object from child idl file class HOT 6
- middleware-like behaviour HOT 1
- load, load_module behaviour HOT 3
- Investigate build issue involving cython and thriftpy in container build HOT 7
- Cannot pip install thriftpy2 on Colab HOT 9
- Cython issue still occurring because the fix wasn't published HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thriftpy2.