Issue #1630 updated chunk size for single dimension chunks.

Amend: check if dataType is vlen_str_type.

Change-Id: Idbd39e8bcd6c2703299277b073e14b106c897ccb

Former-commit-id: f8b4dcc541 [formerly 4c706901f8] [formerly f8b4dcc541 [formerly 4c706901f8] [formerly 691b9d7ca2 [formerly 25bd6d76b85b3c857958f1fc5189f9512420daea]]]
Former-commit-id: 691b9d7ca2
Former-commit-id: 1ce25acbc5 [formerly b9b660535c]
Former-commit-id: b8147737fe
This commit is contained in:
Brad Gonzales 2013-02-18 08:19:02 -06:00
parent 92148eca41
commit 79b1560c07

View file

@ -214,7 +214,12 @@ class H5pyDataStore(IDataStore.IDataStore):
def __calculateChunk(self, nDims, dataType, storeOp, maxDims):
if nDims == 1:
chunk = [DEFAULT_CHUNK_SIZE]
if dataType != vlen_str_type:
sizeOfEntry = numpy.dtype(dataType).itemsize
chunkSize = int(FILESYSTEM_BLOCK_SIZE / sizeOfEntry)
chunk = [chunkSize]
else:
chunk = [DEFAULT_CHUNK_SIZE]
elif nDims == 2:
if storeOp != 'APPEND':
chunk = [DEFAULT_CHUNK_SIZE] * 2