Repository: aurora Updated Branches: refs/heads/master 970c2a519 -> e06b49346
Remove dead code related to Java executor. Bugs closed: AURORA-195 Reviewed at https://reviews.apache.org/r/33677/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/e06b4934 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/e06b4934 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/e06b4934 Branch: refs/heads/master Commit: e06b493461c6ca4dc5a8c194ce39c04f394ed5a1 Parents: 970c2a5 Author: Bill Farner <[email protected]> Authored: Wed Apr 29 15:09:36 2015 -0700 Committer: Bill Farner <[email protected]> Committed: Wed Apr 29 15:09:36 2015 -0700 ---------------------------------------------------------------------- .../apache/aurora/client/api/command_runner.py | 25 +------------------- 1 file changed, 1 insertion(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/e06b4934/src/main/python/apache/aurora/client/api/command_runner.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/client/api/command_runner.py b/src/main/python/apache/aurora/client/api/command_runner.py index 2d181fa..c7238e2 100644 --- a/src/main/python/apache/aurora/client/api/command_runner.py +++ b/src/main/python/apache/aurora/client/api/command_runner.py @@ -60,7 +60,7 @@ class DistributedCommandRunner(object): return {'slave_root': cluster.slave_root, 'slave_run_directory': cluster.slave_run_directory} @classmethod - def substitute_thermos(cls, command, task, cluster, **kw): + def substitute(cls, command, task, cluster, **kw): prefix_command = 'cd %s;' % cls.thermos_sandbox(cluster, **kw) thermos_namespace = ThermosContext( task_id=task.assignedTask.taskId, @@ -72,29 +72,6 @@ class DistributedCommandRunner(object): return command.get() @classmethod - def aurora_sandbox(cls, cluster, executor_sandbox=False): - if executor_sandbox: - return cls.make_executor_path(cluster, 'twitter') - else: - return '/var/run/nexus/%task_id%/sandbox' - - @classmethod - def substitute_aurora(cls, command, task, cluster, **kw): - command = ('cd %s;' % cls.aurora_sandbox(cluster, **kw)) + command - command = command.replace('%shard_id%', str(task.assignedTask.instanceId)) - command = command.replace('%task_id%', task.assignedTask.taskId) - for name, port in task.assignedTask.assignedPorts.items(): - command = command.replace('%port:' + name + '%', str(port)) - return command - - @classmethod - def substitute(cls, command, task, cluster, **kw): - if task.assignedTask.task.executorConfig: - return cls.substitute_thermos(command, task, cluster, **kw) - else: - return cls.substitute_aurora(command, task, cluster, **kw) - - @classmethod def query_from(cls, role, env, job): return TaskQuery(statuses=LIVE_STATES, jobKeys=[JobKey(role=role, environment=env, name=job)])
