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

fix for contiguousref datasets #396

Merged
merged 1 commit into from
Sep 26, 2024
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
4 changes: 1 addition & 3 deletions hsds/datanode_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,7 @@ async def get_chunk_bytes(
log.error(msg)
raise HTTPInternalServerError()

msg = "get_chunk_bytes done for hyperchunks "
msg += f"arr min: {chunk_arr.min()}, arr_max: {chunk_arr.max()}"
log.debug(msg)
log.debug("get_chunk_bytes done for hyperchunks")

return chunk_arr

Expand Down
4 changes: 4 additions & 0 deletions hsds/util/storUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ async def getStorBytes(app,
log.info(f"read: {len(data)} bytes for key: {key}")
if length > 0 and len(data) != length:
log.warn(f"requested {length} bytes but got {len(data)} bytes")
# extend data to expected length
buffer = bytearray(length)
buffer[:(len(data))]
data = bytes(buffer)
if chunk_locations:
log.debug(f"getStorBytes - got {len(chunk_locations)} chunk locations")
# uncompress chunks within the fetched data and store to
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/compression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def testCompression(self):
self.assertEqual(data, data_copy)

def testBitShuffle(self):
print("skipping bitshuffle test")
return
shape = (1_000_000, )
dt = np.dtype("<i4")
arr = np.random.randint(0, 200, shape, dtype=dt)
Expand Down
Loading