#NEWLINE# def jobconf( self ) : #NEWLINE# #INDENT# "``-D`` args to pass to hadoop streaming. This should be a map\n        from property name to value.\n\n        By default, this combines :option:`jobconf` options from the command\n        lines with :py:attr:`JOBCONF`, with command line arguments taking\n        precedence.\n\n        If :py:attr:`SORT_VALUES` is set, we also set these jobconf values::\n\n            stream.num.map.output.key.fields=2\n            mapred.text.key.partitioner.options=k1,1\n\n        We also blank out ``mapred.output.key.comparator.class``\n        and ``mapred.text.key.comparator.options`` to prevent interference\n        from :file:`mrjob.conf`.\n\n        :py:attr:`SORT_VALUES` *can* be overridden by :py:attr:`JOBCONF`, the\n        command line, and step-specific ``jobconf`` values.\n\n        For example, if you know your values are numbers, and want to sort\n        them in reverse, you could do::\n\n            SORT_VALUES = True\n\n            JOBCONF = {\n              'mapred.output.key.comparator.class':\n                  'org.apache.hadoop.mapred.lib.KeyFieldBasedComparator',\n              'mapred.text.key.comparator.options': '-k1 -k2nr',\n            }\n\n        If you want to re-define this, it's strongly recommended that do\n        something like this, so as not to inadvertently disable\n        the :option:`jobconf` option::\n\n            def jobconf(self):\n                orig_jobconf = super(MyMRJobClass, self).jobconf()\n                custom_jobconf = ...\n\n                return mrjob.conf.combine_dicts(orig_jobconf, custom_jobconf)\n        " #NEWLINE# unfiltered_jobconf = combine_dicts ( self . JOBCONF , unfiltered_val . options . jobconf ) #NEWLINE# filtered_jobconf = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# def format_hadoop_version( v_float ) : #NEWLINE# #INDENT# if ( v_float >= 1.0 ) : #NEWLINE# #INDENT# return ( '%.1f' % v_float ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( '%.2f' % v_float ) #NEWLINE# #UNINDENT# #UNINDENT# for key in unfiltered_jobconf : #NEWLINE# #INDENT# unfiltered_val = unfiltered_jobconf [ key ] #NEWLINE# filtered_val = unfiltered_val #NEWLINE# if isinstance ( unfiltered_val , bool ) : #NEWLINE# #INDENT# if unfiltered_val : #NEWLINE# #INDENT# filtered_val = 'true' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# filtered_val = 'false' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( key == 'hadoop_version' ) and isinstance ( unfiltered_val , float ) ) : #NEWLINE# #INDENT# log . warning ( ( 'hadoop_version should be a string, not %s' % unfiltered_val ) ) #NEWLINE# filtered_val = format_hadoop_version ( unfiltered_val ) #NEWLINE# #UNINDENT# #UNINDENT# filtered_jobconf [ key ] = filtered_val #NEWLINE# #UNINDENT# if self . SORT_VALUES : #NEWLINE# #INDENT# filtered_jobconf = combine_dicts ( _SORT_VALUES_JOBCONF , filtered_jobconf ) #NEWLINE# #UNINDENT# return filtered_jobconf