Skip to content

Commit ef82296

Browse files
authored
Release 0.0.48 version. (#304)
* Buffer writes * Run travis on python 3.7
1 parent d7293c7 commit ef82296

File tree

5 files changed

+54
-6
lines changed

5 files changed

+54
-6
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ matrix:
1010
- python: 3.4
1111
- python: 3.5
1212
- python: 3.6
13+
- python: 3.7
1314

1415
install:
1516
# Install dependencies
@@ -39,5 +40,5 @@ deploy:
3940
distributions: "bdist_wheel sdist" # Parameter order for distributions is important.
4041
on:
4142
tags: true
42-
python: '3.6'
43+
python: '3.7'
4344
repo: Azure/azure-data-lake-store-python

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Release History
44
===============
55

6+
0.0.48 (2019-10-18)
7+
+++++++++++++++++++
8+
* Buffer writes to prevent out of memory problems
9+
* Add Python 3.7 in travis configuration
10+
611
0.0.47 (2019-08-14)
712
+++++++++++++++++++
813
* Remove logging of bearer token

Readme.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ ADLDownloader(adl, '', 'my_temp_dir', 5, 2**24)
124124
```
125125
# API
126126

127+
<<<<<<< HEAD
128+
=======
127129
|
128130
|
129131
|
@@ -173,6 +175,7 @@ ADLDownloader(adl, '', 'my_temp_dir', 5, 2**24)
173175
|
174176
|
175177

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

@@ -211,6 +214,28 @@ Access Azure DataLake Store as if it were a file-system
211214

212215
### Methods
213216

217+
<<<<<<< HEAD
218+
219+
220+
221+
222+
223+
224+
225+
226+
227+
228+
229+
230+
231+
232+
233+
234+
235+
236+
237+
238+
=======
214239
|
215240
|
216241
|
@@ -251,6 +276,7 @@ Access Azure DataLake Store as if it were a file-system
251276
|
252277
|
253278
|
279+
>>>>>>> master
254280
<!-- !! processed by numpydoc !! -->
255281
256282
#### access(self, path, invalidate_cache=True)
@@ -1235,12 +1261,17 @@ of files or a glob pattern.
12351261

12361262
### Methods
12371263

1264+
<<<<<<< HEAD
1265+
1266+
1267+
=======
12381268
|
12391269
|
12401270
|
12411271
|
12421272
|
12431273
|
1274+
>>>>>>> master
12441275
<!-- !! processed by numpydoc !! -->
12451276
12461277
#### active(self)
@@ -1397,12 +1428,18 @@ of files or a glob pattern.
13971428

13981429
### Methods
13991430

1431+
<<<<<<< HEAD
1432+
1433+
1434+
1435+
=======
14001436
|
14011437
|
14021438
|
14031439
|
14041440
|
14051441
|
1442+
>>>>>>> master
14061443
<!-- !! processed by numpydoc !! -->
14071444
14081445
#### active(self)

azure/datalake/store/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# license information.
77
# --------------------------------------------------------------------------
88

9-
__version__ = "0.0.47"
9+
__version__ = "0.0.48"
1010

1111
from .core import AzureDLFileSystem
1212
from .multithread import ADLDownloader

azure/datalake/store/core.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,10 +1213,15 @@ def write(self, data):
12131213
if self.closed:
12141214
raise ValueError('I/O operation on closed file.')
12151215

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

12211226
def flush(self, syncFlag='METADATA', force=False):
12221227
"""

0 commit comments

Comments
 (0)