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

Also support HdfsFile.write with strings (in addition to bytes) #23

Merged
merged 1 commit into from Jan 15, 2020

Conversation

fhoering
Copy link
Contributor

@fhoering fhoering commented Jan 14, 2020

  • this works now:
with fs.open(path, "wb") as fd:
  res = {"a": "bc"}
  json.dump(res, fd)
with fs.open(path, "wb") as fd:
  res = {"a": "bc"}
  fd.write(json.dumps(res)) # instead of fd.write(json.dumps(res).encode())
  • to be upstreamed to pyarrow.HdfsFile

@fhoering fhoering changed the title Also support hdfs filesystem write to file with strings Also support HdfsFile.write with strings (in addition to bytes) Jan 14, 2020
@fhoering fhoering requested a review from mtchib January 14, 2020 15:57
@fhoering fhoering force-pushed the support_hdfs_write_str branch 2 times, most recently from 4d0f856 to 0cd9d55 Compare January 14, 2020 18:01
- this works now:

```
with fs.open(path, "wb") as fd:
  res = {"a": "bc"}
  json.dump(res, fd)
```

```
with fs.open(path, "wb") as fd:
  res = {"a": "bc"}
  fd.write(json.dumps(res)) # instead of fd.write(json.dumps(res).encode())
```

- to be upstreamed to pyarrow.HdfsFile
@fhoering fhoering merged commit 8a5686e into criteo:master Jan 15, 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

Successfully merging this pull request may close these issues.

None yet

2 participants