提交 4874810b 编写于 作者: G gongweibao

fix bugs

上级 183a5d44
......@@ -113,7 +113,7 @@ func (c *Client) monitorMaster(addr Addresser) {
//
// SetDataset can be call multiple times from different nodes. But
// only the first call will be honored.
func (c *Client) SetDataset(globPaths ...string) error {
func (c *Client) SetDataset(globPaths []string) error {
return c.conn.Call("Service.SetDataset", globPaths, nil)
}
......
......@@ -93,13 +93,17 @@ def recordio(paths, addr="", buf_size=100):
if len(os.environ["KUBERNETES_SERVICE_HOST"]) == 0:
return recordio_local(path)
c = cloud(addr, buf_size)
c.set_dataset(paths)
def reader():
c = cloud(addr, buf_size)
c.set_dataset(paths)
while True:
r = client.next_record()
if r is None:
break
yield r
while True:
r = client.next_record()
if r is None:
break
yield r
c.close()
return reader
c.close()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册