'The taskid_str looks like this: task_201001301455_0001_m_000007'

def thrifttaskid_from_string(self, taskid_str):

    TASK_TYPE_MAP = {'m': ThriftTaskType.MAP, 'r': ThriftTaskType.REDUCE}
    (_, tracker, jid, tasktype, tid) = taskid_str.split('_')
    return ThriftTaskID(ThriftJobID(tracker, int(jid)), TASK_TYPE_MAP[tasktype], int(tid))
