<s> """<STR_LIT>""" <EOL> from mapreduce import errors <EOL> from mapreduce import json_util <EOL> from mapreduce import shard_life_cycle <EOL> class InputReader ( shard_life_cycle . _ShardLifeCycle , json_util . JsonMixin ) : <EOL> """<STR_LIT>""" <EOL> COUNTER_IO_READ_BYTE = "<STR_LIT>" <EOL> COUNTER_IO_READ_MSEC = "<STR_LIT>" <EOL> def __init__ ( self ) : <EOL> self . _slice_ctx = None <EOL> def __iter__ ( self ) : <EOL> return self <EOL> def next ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" % self . __class__ ) <EOL> @ classmethod <EOL> def from_json ( cls , state ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" % cls ) <EOL> def to_json ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" % <EOL> self . __class__ ) <EOL> @ classmethod <EOL> def split_input ( cls , job_config ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" % cls ) <EOL> @ classmethod <EOL> def validate ( cls , job_config ) : <EOL> """<STR_LIT>""" <EOL> if job_config . input_reader_cls != cls : <EOL> raise errors . BadReaderParamsError ( <EOL> "<STR_LIT>" % <EOL> ( cls , job_config . input_reader_cls ) ) <EOL> def begin_slice ( self , slice_ctx ) : <EOL> """<STR_LIT>""" <EOL> self . _slice_ctx = slice_ctx <EOL> def end_slice ( self , slice_ctx ) : <EOL> """<STR_LIT>""" <EOL> self . _slice_ctx = None <EOL> @ classmethod <EOL> def params_to_json ( cls , params ) : <EOL> """<STR_LIT>""" <EOL> return params <EOL> @ classmethod <EOL> def params_from_json ( cls , json_params ) : <EOL> """<STR_LIT>""" <EOL> return json_params </s>
