Module Expr Str Import alias Import alias Import alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign TupleStore NameStore NameStore NameStore Call NameLoad Num Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign NameStore Num Assign NameStore BinOpMult Num NameLoad Assign NameStore Num Assign NameStore Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Return For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareGt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num body TryExcept body With Call NameLoad NameLoad NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args defaults Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body For NameStore NameLoad body Expr Call NameLoad NameLoad Str NameLoad Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body While UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If CompareGt BinOpSub Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Num If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse If CompareGtE AttributeLoad NameLoad attr NameLoad body If CompareNotEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call NameLoad NameLoad Str body Expr Call NameLoad NameLoad Str NameLoad Expr Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body While UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict Str Str AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If NameLoad body While UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareGt Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num body Break Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num If NameLoad body Return If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpAdd NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryFinally body For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return CompareGt Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Return ListComp TupleLoad NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str body Return If UnaryOpNot Call NameLoad NameLoad Str body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Copyright (c) 2013 Qin Xuye <qin@qinxuye.me>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Created on 2014-6-12

@author: chine
 N/A os N/A time N/A threading N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle N/A tempfile N/A shutil cola.functions.counter CounterServer cola.functions.budget BudgetApplyServer ALLFINISHED cola.functions.speed SpeedControlServer cola.cluster.tracker WorkerTracker JobTracker cola.cluster.stage Stage cola.core.rpc FileTransportServer FileTransportClient client_call cola.core.zip ZipHandler cola.core.utils import_job_desc cola.core.logs get_logger LogRecordSocketReceiver N/A N/A RUNNING HANGUP STOPPED N/A range 3 N/A STATUSES N/A RUNNING HANGUP STOPPED N/A CONTINOUS_HEARTBEAT 90 N/A HEARTBEAT_INTERVAL 20 N/A HEARTBEAT_CHECK_INTERVAL N/A 3 HEARTBEAT_INTERVAL N/A JOB_CHECK_INTERVAL 5 N/A JOB_META_STATUS_FILENAME job.meta.status JobMaster N/A object N/A __init__ N/A N/A self ctx job_name job_desc workers N/A N/A N/A N/A self working_dir N/A N/A N/A os path join N/A ctx working_dir master tracker job_name N/A N/A N/A N/A N/A os path exists N/A self working_dir N/A N/A N/A N/A os makedirs N/A self working_dir N/A N/A self job_name job_name N/A N/A self job_desc job_desc N/A N/A self settings N/A job_desc settings N/A N/A self rpc_server N/A ctx master_rpc_server N/A N/A self inited False N/A N/A self lock N/A N/A threading Lock N/A N/A N/A self init N/A N/A self workers workers N/A _init_counter_server N/A N/A self N/A N/A N/A counter_dir N/A N/A N/A os path join N/A self working_dir counter N/A N/A self counter_server N/A CounterServer counter_dir N/A self settings rpc_server N/A self rpc_server app_name N/A self job_name N/A _init_budget_server N/A N/A self N/A N/A N/A budget_dir N/A N/A N/A os path join N/A self working_dir budget N/A N/A self budget_server N/A BudgetApplyServer budget_dir N/A self settings rpc_server N/A self rpc_server app_name N/A self job_name N/A _init_speed_server N/A N/A self N/A N/A N/A speed_dir N/A N/A N/A os path join N/A self working_dir speed N/A N/A self speed_server N/A SpeedControlServer speed_dir N/A self settings rpc_server N/A self rpc_server app_name N/A self job_name N/A init N/A N/A self N/A N/A N/A N/A self lock N/A N/A N/A self inited N/A N/A N/A N/A N/A self _init_counter_server N/A N/A N/A self _init_budget_server N/A N/A N/A self _init_speed_server N/A N/A self inited True N/A remove_worker N/A N/A self worker N/A N/A N/A N/A worker N/A self workers N/A N/A N/A N/A N/A N/A self workers remove worker N/A node N/A self workers N/A N/A N/A client_call node remove_node worker N/A add_worker N/A N/A self worker N/A N/A N/A N/A worker N/A self workers N/A N/A N/A node N/A self workers N/A N/A N/A client_call node add_node worker N/A N/A N/A N/A self workers append worker N/A has_worker N/A N/A self worker N/A N/A N/A N/A worker N/A self workers N/A shutdown N/A N/A self N/A N/A N/A N/A self lock N/A N/A N/A N/A self inited N/A N/A N/A N/A N/A N/A self counter_server shutdown N/A N/A N/A N/A self budget_server shutdown N/A N/A N/A N/A self speed_server shutdown N/A N/A self inited False N/A N/A Master N/A object N/A __init__ N/A N/A self ctx N/A N/A N/A N/A self ctx ctx N/A N/A self rpc_server N/A N/A self ctx master_rpc_server N/A N/A N/A self rpc_server None N/A N/A self working_dir N/A N/A N/A os path join N/A N/A self ctx working_dir master N/A N/A self zip_dir N/A N/A N/A os path join N/A self working_dir zip N/A N/A self job_dir N/A N/A N/A os path join N/A self working_dir jobs N/A N/A N/A N/A N/A os path exists N/A self zip_dir N/A N/A N/A N/A os makedirs N/A self zip_dir N/A N/A N/A N/A N/A os path exists N/A self job_dir N/A N/A N/A N/A os makedirs N/A self job_dir N/A N/A self worker_tracker N/A WorkerTracker N/A N/A self job_tracker N/A JobTracker N/A N/A self black_list N/A N/A N/A self stopped N/A N/A threading Event N/A N/A self logger N/A get_logger cola_master N/A N/A N/A self _init_log_server N/A self logger N/A N/A N/A self _register_rpc N/A N/A N/A self load N/A N/A FileTransportServer N/A self rpc_server N/A self zip_dir N/A load N/A N/A self N/A N/A N/A N/A self runned_job_metas N/A N/A job_meta_file N/A N/A N/A os path join N/A self working_dir JOB_META_STATUS_FILENAME N/A N/A N/A N/A N/A os path exists job_meta_file N/A N/A N/A N/A os path getsize job_meta_file 0 N/A N/A N/A N/A N/A open job_meta_file f N/A N/A N/A self runned_job_metas N/A N/A pickle load f N/A N/A N/A N/A N/A save N/A N/A self N/A N/A N/A job_meta_file N/A N/A N/A os path join N/A self working_dir JOB_META_STATUS_FILENAME N/A N/A open job_meta_file w f N/A N/A N/A N/A pickle dump N/A self runned_job_metas f N/A _register_rpc N/A N/A self N/A N/A N/A N/A N/A N/A self rpc_server register_function N/A self run_job run_job N/A N/A N/A N/A self rpc_server register_function N/A self stop_job stop_job N/A N/A N/A N/A self rpc_server register_function N/A self pack_job_error pack_job_error N/A N/A N/A N/A self rpc_server register_function N/A self list_runnable_jobs runnable_jobs N/A N/A N/A N/A self rpc_server register_function N/A N/A N/A N/A N/A N/A N/A N/A self job_tracker running_jobs keys running_jobs N/A N/A N/A N/A self rpc_server register_function N/A self list_workers list_workers N/A N/A N/A N/A self rpc_server register_function N/A self shutdown shutdown N/A N/A N/A N/A self rpc_server register_function N/A self register_heartbeat register_heartbeat N/A register_heartbeat N/A N/A self worker N/A N/A N/A need_to_add_worker_nodes N/A N/A N/A self worker_tracker register_worker worker N/A N/A need_to_add_worker_nodes None N/A N/A node need_to_add_worker_nodes N/A N/A N/A client_call node add_node worker N/A N/A N/A N/A N/A self worker_tracker workers keys N/A _init_log_server N/A N/A self logger N/A N/A N/A N/A self log_server N/A LogRecordSocketReceiver host N/A N/A self ctx ip logger N/A self logger N/A N/A self log_t N/A N/A threading Thread target N/A N/A self log_server serve_forever N/A N/A N/A N/A self log_t start N/A _shutdown_log_server N/A N/A self N/A N/A N/A N/A hasattr self log_server N/A N/A N/A N/A N/A self log_server shutdown N/A N/A N/A N/A self log_t join N/A _check_workers N/A N/A self N/A N/A N/A N/A N/A N/A N/A self stopped is_set N/A N/A N/A worker info N/A N/A N/A N/A self worker_tracker workers iteritems N/A N/A N/A N/A N/A int N/A N/A time time N/A info last_update HEARTBEAT_CHECK_INTERVAL N/A N/A N/A info continous_register 0 N/A N/A N/A info status RUNNING N/A N/A N/A info status HANGUP N/A N/A N/A N/A info status HANGUP N/A N/A N/A info status STOPPED N/A N/A N/A N/A self black_list append worker N/A job N/A N/A self job_tracker running_jobs N/A N/A N/A N/A N/A self job_tracker remove_worker job worker N/A N/A N/A N/A info continous_register CONTINOUS_HEARTBEAT N/A N/A N/A N/A info status RUNNING N/A N/A N/A info status RUNNING N/A N/A worker N/A self black_list N/A N/A N/A N/A N/A self black_list remove worker N/A job N/A N/A self job_tracker running_jobs N/A N/A N/A N/A client_call worker has_job N/A N/A N/A client_call worker prepare job N/A N/A client_call worker run_job job N/A N/A N/A N/A self job_tracker add_worker job worker N/A N/A N/A N/A self stopped wait HEARTBEAT_CHECK_INTERVAL N/A _check_jobs N/A N/A self N/A N/A N/A N/A N/A N/A N/A self stopped is_set N/A N/A job_master N/A N/A N/A N/A self job_tracker running_jobs values N/A N/A N/A N/A N/A N/A job_master budget_server get_status ALLFINISHED N/A N/A N/A N/A self stop_job N/A job_master job_name N/A N/A N/A N/A self job_tracker remove_job N/A job_master job_name N/A N/A N/A N/A self stopped wait JOB_CHECK_INTERVAL N/A _unzip N/A N/A self job_name N/A N/A N/A zip_file N/A N/A N/A os path join N/A self zip_dir N/A job_name .zip N/A job_path N/A N/A N/A os path join N/A self job_dir job_name N/A N/A N/A N/A os path exists job_path N/A N/A N/A N/A shutil rmtree job_path N/A N/A N/A N/A os path exists zip_file N/A N/A N/A N/A ZipHandler uncompress zip_file N/A self job_dir N/A _register_runned_job N/A N/A self job_name job_desc N/A N/A N/A N/A N/A self runned_job_metas N/A job_name N/A job_name created N/A job_desc name N/A N/A time time N/A run N/A N/A self N/A N/A N/A N/A self _worker_t N/A N/A threading Thread target N/A self _check_workers N/A N/A N/A N/A self _worker_t start N/A N/A self _job_t N/A N/A threading Thread target N/A self _check_jobs N/A N/A N/A N/A self _job_t start N/A run_job N/A N/A self job_name unzip wait_for_workers N/A False False N/A N/A wait_for_workers N/A N/A N/A N/A N/A N/A self stopped is_set N/A N/A N/A N/A len N/A N/A self worker_tracker workers 0 N/A N/A N/A stopped N/A N/A N/A self stopped wait 3 N/A stopped N/A N/A N/A unzip N/A N/A N/A N/A self _unzip job_name N/A job_path N/A N/A N/A os path join N/A self job_dir job_name N/A job_desc N/A import_job_desc job_path N/A job_master N/A JobMaster N/A self ctx job_name job_desc N/A N/A N/A N/A self worker_tracker workers keys N/A N/A N/A job_master init N/A N/A N/A N/A self job_tracker register_job job_name job_master N/A N/A N/A self _register_runned_job job_name job_desc N/A zip_file N/A N/A N/A os path join N/A self zip_dir N/A job_name .zip N/A worker N/A job_master workers N/A N/A N/A N/A N/A FileTransportClient worker zip_file send_file N/A N/A N/A N/A self logger debug N/A entering the master prepare stage, job id: %s job_name N/A N/A N/A N/A self logger debug N/A job available workers: %s N/A job_master workers N/A stage N/A Stage N/A job_master workers prepare logger N/A self logger N/A prepared_ok N/A N/A stage barrier True job_name N/A N/A prepared_ok N/A N/A N/A N/A N/A self logger error prepare for running failed N/A N/A N/A N/A N/A self logger debug N/A entering the master run_job stage, job id: %s job_name N/A stage N/A Stage N/A job_master workers run_job logger N/A self logger N/A run_ok N/A N/A stage barrier True job_name N/A N/A run_ok N/A N/A N/A N/A N/A self logger error N/A run job failed, job id: %s job_name N/A stop_job N/A N/A self job_name N/A N/A N/A job_master N/A N/A N/A self job_tracker get_job_master job_name N/A stage N/A Stage N/A job_master workers stop_job N/A N/A N/A stage barrier True job_name N/A stage N/A Stage N/A job_master workers clear_job N/A N/A N/A stage barrier True job_name N/A N/A N/A N/A self job_tracker remove_job job_name N/A N/A N/A N/A self logger debug N/A stop job: %s job_name N/A pack_job_error N/A N/A self job_name N/A N/A N/A job_master N/A N/A N/A self job_tracker get_job_master job_name N/A stage N/A Stage N/A job_master workers pack_job_error N/A N/A N/A stage barrier True job_name N/A error_dir N/A N/A N/A os path join N/A self working_dir errors N/A N/A N/A N/A N/A os path exists error_dir N/A N/A N/A N/A os makedirs error_dir N/A error_filename N/A N/A N/A os path join error_dir N/A %s_errors.zip job_name N/A suffix N/A %s_errors.zip job_name N/A temp_dir N/A N/A tempfile mkdtemp N/A N/A N/A name N/A N/A os listdir N/A self zip_dir N/A N/A N/A N/A name endswith suffix N/A N/A N/A N/A shutil move N/A N/A N/A os path join N/A self zip_dir name temp_dir N/A N/A N/A ZipHandler compress error_filename temp_dir N/A N/A N/A N/A shutil rmtree temp_dir N/A error_filename N/A list_runnable_jobs N/A N/A self N/A N/A N/A job_dirs N/A filter N/A N/A N/A s N/A N/A N/A N/A os path isdir N/A N/A N/A os path join N/A self job_dir s N/A N/A os listdir N/A self job_dir N/A jobs N/A N/A job_dir job_dirs N/A N/A desc N/A import_job_desc N/A N/A N/A os path join N/A self job_dir job_dir N/A N/A jobs N/A job_dir N/A desc name N/A jobs N/A has_running_jobs N/A N/A self N/A N/A N/A N/A N/A len N/A N/A self job_tracker running_jobs 0 N/A list_workers N/A N/A self N/A N/A N/A N/A N/A worker N/A STATUSES N/A N/A worker_info status N/A N/A worker worker_info N/A N/A N/A N/A self worker_tracker workers iteritems N/A _stop_all_jobs N/A N/A self N/A N/A N/A job_name N/A N/A N/A N/A self job_tracker running_jobs keys N/A N/A N/A N/A self stop_job job_name N/A _shutdown_all_workers N/A N/A self N/A N/A N/A stage N/A Stage N/A N/A N/A N/A self worker_tracker workers keys shutdown N/A N/A N/A stage barrier True N/A shutdown N/A N/A self N/A N/A N/A N/A N/A hasattr self _worker_t N/A N/A N/A N/A N/A hasattr self _job_t N/A N/A N/A N/A N/A N/A self logger debug master starts to shutdown N/A N/A N/A N/A self stopped set N/A N/A N/A self _stop_all_jobs N/A N/A N/A self _shutdown_all_workers N/A N/A N/A N/A self _worker_t join N/A N/A N/A N/A self _job_t join N/A N/A N/A self save N/A N/A N/A N/A self rpc_server shutdown N/A N/A N/A N/A self logger debug master shutdown finished N/A N/A N/A self _shutdown_log_server N/A N/A