From fb8dd148fc62f6a4b617a95b918f893a894650b3 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Thu, 13 May 2021 17:52:08 -0400 Subject: [PATCH] Remove unneeded Beam code from un_bz2_file (#3490) Co-authored-by: Jizhen Wang --- codalab/worker/file_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codalab/worker/file_util.py b/codalab/worker/file_util.py index 8b2cce35d..26b5abb6c 100644 --- a/codalab/worker/file_util.py +++ b/codalab/worker/file_util.py @@ -341,7 +341,7 @@ def un_bz2_file(source, dest_path): # fileno(). Our version requires only read() and close(). BZ2_BUFFER_SIZE = 100 * 1024 * 1024 # Unzip in chunks of 100MB - with FileSystems.create(dest_path, compression_type=CompressionTypes.UNCOMPRESSED) as dest: + with open(dest_path, 'wb') as dest: decompressor = bz2.BZ2Decompressor() for data in iter(lambda: source.read(BZ2_BUFFER_SIZE), b''): dest.write(decompressor.decompress(data))