Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ matrix:
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7

install:
# Install dependencies
Expand Down Expand Up @@ -39,5 +40,5 @@ deploy:
distributions: "bdist_wheel sdist" # Parameter order for distributions is important.
on:
tags: true
python: '3.6'
python: '3.7'
repo: Azure/azure-data-lake-store-python
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

0.0.48 (2019-10-18)
+++++++++++++++++++
* Buffer writes to prevent out of memory problems
* Add Python 3.7 in travis configuration

0.0.47 (2019-08-14)
+++++++++++++++++++
* Remove logging of bearer token
Expand Down
126 changes: 25 additions & 101 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,55 +124,6 @@ ADLDownloader(adl, '', 'my_temp_dir', 5, 2**24)
```
# API

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

#### class azure.datalake.store.core.AzureDLFileSystem(token=None, per_call_timeout_seconds=60, \*\*kwargs)
Access Azure DataLake Store as if it were a file-system

Expand Down Expand Up @@ -211,46 +162,26 @@ Access Azure DataLake Store as if it were a file-system

### Methods

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|




















<!-- !! processed by numpydoc !! -->

#### access(self, path, invalidate_cache=True)
Expand Down Expand Up @@ -1235,12 +1166,8 @@ of files or a glob pattern.

### Methods

|
|
|
|
|
|


<!-- !! processed by numpydoc !! -->

#### active(self)
Expand Down Expand Up @@ -1397,12 +1324,9 @@ of files or a glob pattern.

### Methods

|
|
|
|
|
|



<!-- !! processed by numpydoc !! -->

#### active(self)
Expand Down
2 changes: 1 addition & 1 deletion azure/datalake/store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# license information.
# --------------------------------------------------------------------------

__version__ = "0.0.47"
__version__ = "0.0.48"

from .core import AzureDLFileSystem
from .multithread import ADLDownloader
Expand Down
13 changes: 9 additions & 4 deletions azure/datalake/store/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,10 +1213,15 @@ def write(self, data):
if self.closed:
raise ValueError('I/O operation on closed file.')

out = self.buffer.write(ensure_writable(data))
self.loc += out
self.flush(syncFlag='DATA')
return out
# TODO Flush may be simplified
# Buffered writes so a very large buffer is not copied leading to very large memory consumption
bytes_written = 0
for i in range(0, len(data), self.blocksize):
out = self.buffer.write(ensure_writable(data[i:i + self.blocksize]))
self.loc += out
bytes_written += out
self.flush(syncFlag='DATA')
return bytes_written

def flush(self, syncFlag='METADATA', force=False):
"""
Expand Down