<commit_before>import os, sys
import socket
import logging
import marshal
import cPickle
import threading, Queue
import time
import random

import zmq
import mesos
import mesos_pb2

from dependency import NarrowDependency, ShuffleDependency 
from accumulator import Accumulator
from task import ResultTask, ShuffleMapTask
from job import SimpleJob
from env import env
from broadcast import Broadcast

logger = logging.getLogger("scheduler")

MAX_FAILED = 3
EXECUTOR_MEMORY = 2096 + 1024 # cache
POLL_TIMEOUT = 0.1
RESUBMIT_TIMEOUT = 60

class TaskEndReason: pass
class Success(TaskEndReason): pass
class FetchFailed:
    def __init__(self, serverUri, shuffleId, mapId, reduceId):
        self.serverUri = serverUri
        self.shuffleId = shuffleId
        self.mapId = mapId
        self.reduceId = reduceId
class OtherFailure:
    def __init__(self, message):
        self.message = message

class Stage:
    def __init__(self, rdd, shuffleDep, parents):
        self.id = self.newId()
        self.rdd = rdd
        self.shuffleDep = shuffleDep
        self.parents = parents
        self.numPartitions = len(rdd)
        self.outputLocs = [[] for i in range(self.numPartitions)]

    def __str__(self):<commit_msg>reduce the memory of executor<commit_after>import os, sys
import socket
import logging
import marshal
import cPickle
import threading, Queue
import time
import random

import zmq
import mesos
import mesos_pb2

from dependency import NarrowDependency, ShuffleDependency 
from accumulator import Accumulator
from task import ResultTask, ShuffleMapTask
from job import SimpleJob
from env import env
from broadcast import Broadcast

logger = logging.getLogger("scheduler")

MAX_FAILED = 3
EXECUTOR_MEMORY = 512 # cache
POLL_TIMEOUT = 0.1
RESUBMIT_TIMEOUT = 60

class TaskEndReason: pass
class Success(TaskEndReason): pass
class FetchFailed:
    def __init__(self, serverUri, shuffleId, mapId, reduceId):
        self.serverUri = serverUri
        self.shuffleId = shuffleId
        self.mapId = mapId
        self.reduceId = reduceId
class OtherFailure:
    def __init__(self, message):
        self.message = message

class Stage:
    def __init__(self, rdd, shuffleDep, parents):
        self.id = self.newId()
        self.rdd = rdd
        self.shuffleDep = shuffleDep
        self.parents = parents
        self.numPartitions = len(rdd)
        self.outputLocs = [[] for i in range(self.numPartitions)]

    def __str__(self):
{'fraction_non_alphanumeric': 0.06582174979558462, 'fraction_numerical': 0.009403107113654947, 'mean_word_length': 3.6787762906309753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3576945', 'n_tokens_mistral': 749, 'n_tokens_neox': 724, 'n_words': 232}