@classmethod
  def _get_output_sharding(cls, mapreduce_state=None, mapper_spec=None):
    if mapper_spec:
      return _get_params(mapper_spec).get(
          FileOutputWriterBase.OUTPUT_SHARDING_PARAM,
          FileOutputWriterBase.OUTPUT_SHARDING_NONE).lower()
    if mapreduce_state:
      mapper_spec = mapreduce_state.mapreduce_spec.mapper
      return cls._get_output_sharding(mapper_spec=mapper_spec)
    raise errors.Error("Neither mapreduce_state nor mapper_spec specified.")
Get output sharding parameter value from mapreduce state or mapper spec.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/output_writers.py/FileOutputWriterBase._get_output_sharding