173 from .AthenaMPFlags
import jobproperties
as jp
174 from PyUtils.MetaReaderPeeker
import metadata
177 if (jp.AthenaMPFlags.ChunkSize() > 0):
178 chunk_size = jp.AthenaMPFlags.ChunkSize()
179 msg.info(
'Chunk size set to %i', chunk_size)
180 elif 'file_size' in metadata
and metadata[
'file_size']
is not None:
182 if (jp.AthenaMPFlags.UseSharedReader()):
183 msg.info(
'Shared Reader in use, chunk_size set to default (%i)', chunk_size)
185 elif (jp.AthenaMPFlags.ChunkSize() == -1):
186 if (metadata[
'file_comp_alg'] == 2):
187 chunk_size = metadata[
'auto_flush']
188 msg.info(
'Chunk size set to auto flush (%i)', chunk_size)
190 msg.info(
'LZMA algorithm not in use, chunk_size set to default (%i)', chunk_size)
192 elif (jp.AthenaMPFlags.ChunkSize() == -2):
193 if (metadata[
'file_comp_alg'] == 1
or metadata[
'file_comp_alg'] == 2):
194 chunk_size = metadata[
'auto_flush']
195 msg.info(
'Chunk size set to auto flush (%i)', chunk_size)
197 msg.info(
'LZMA nor ZLIB in use, chunk_size set to default (%i)', chunk_size)
199 elif (jp.AthenaMPFlags.ChunkSize() == -3):
200 if (metadata[
'file_comp_alg'] == 1
or metadata[
'file_comp_alg'] == 2
or metadata[
'file_comp_alg'] == 4):
201 chunk_size = metadata[
'auto_flush']
202 msg.info(
'Chunk size set to auto flush (%i)', chunk_size)
204 msg.info(
'LZMA, ZLIB nor LZ4 in use, chunk_size set to (%i)', chunk_size)
206 elif (jp.AthenaMPFlags.ChunkSize() <= -4):
207 chunk_size = metadata[
'auto_flush']
208 msg.info(
'Chunk size set to auto flush (%i)', chunk_size)
210 msg.warning(
'Invalid ChunkSize, Chunk Size set to default (%i)', chunk_size)