Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

连接建立后,查询一次后再次查询会报错 #6

Closed
fangxingli opened this issue Jun 19, 2020 · 1 comment
Closed

连接建立后,查询一次后再次查询会报错 #6

fangxingli opened this issue Jun 19, 2020 · 1 comment

Comments

@fangxingli
Copy link

In [82]: with pool.connection() as con:
...: tbl = con.table('level1_md')
...: %time a=[i for i in tbl.scan(row_start='20200617090000000_sh_00', row_stop='20200617090000000_sh_01', limit=4000, columns = ['cf:symbol'])]

CPU times: user 0 ns, sys: 1 ms, total: 1 ms
Wall time: 7.59 ms

In [83]: with pool.connection() as con:
...: tbl = con.table('level1_md')
...: %time a=[i for i in tbl.scan(row_start='20200617090000000_sh_00', row_stop='20200617090000000_sh_01', limit=4000, columns = ['cf:symbol'])]
...:
...:
...:

TTransportException Traceback (most recent call last)
in ()

in (.0)

/home/XXXpython3.6/site-packages/easybase/table.py in scan(self, row_start, row_stop, row_prefix, columns, filter, timerange, include_timestamp, batch_size, scan_batching, limit, reversed, max_version)
344 )
345
--> 346 scan_id = self.connection.client.openScanner(self.name.encode(), tscan)
347
348 logger.debug("Opened scanner (id=%d) on '%s'", scan_id, self.name)

/home/XXXpython3.6/site-packages/thriftpy2/thrift.py in _req(self, _api, *args, **kwargs)
217 # wait result only if non-oneway
218 if not getattr(result_cls, "oneway"):
--> 219 return self._recv(_api)
220
221 def _send(self, _api, **kwargs):

/home/XXXpython3.6/site-packages/thriftpy2/thrift.py in _recv(self, _api)
229
230 def _recv(self, _api):
--> 231 fname, mtype, rseqid = self._iprot.read_message_begin()
232 if mtype == TMessageType.EXCEPTION:
233 x = TApplicationException()

/home/XXXpython3.6/site-packages/thriftpy2/protocol/cybin/cybin.pyx in cybin.TCyBinaryProtocol.read_message_begin()

/home/XXXpython3.6/site-packages/thriftpy2/protocol/cybin/cybin.pyx in cybin.read_i32()

/home/XXXpython3.6/site-packages/thriftpy2/transport/buffered/cybuffered.pyx in thriftpy2.transport.buffered.cybuffered.TCyBufferedTransport.c_read()

/home/XXXpython3.6/site-packages/thriftpy2/transport/buffered/cybuffered.pyx in thriftpy2.transport.buffered.cybuffered.TCyBufferedTransport.read_trans()

/home/XXXpython3.6/site-packages/thriftpy2/transport/cybase.pyx in thriftpy2.transport.cybase.TCyBuffer.read_trans()

/home/XXXpython3.6/site-packages/thriftpy2/transport/socket.py in read(self, sz)
130 if len(buff) == 0:
131 raise TTransportException(type=TTransportException.END_OF_FILE,
--> 132 message='TSocket read 0 bytes')
133 return buff
134

TTransportException: TTransportException(type=4, message='TSocket read 0 bytes')

@wgzhao
Copy link
Owner

wgzhao commented Nov 29, 2020

New version has fix it

@wgzhao wgzhao closed this as completed Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants