Skip to content

Commit

Permalink
TASK port -> disco_port
Browse files Browse the repository at this point in the history
  • Loading branch information
jflatow committed Apr 27, 2011
1 parent f09ad4d commit 4bd93fb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doc/howto/worker.rst
Expand Up @@ -135,7 +135,7 @@ TASK
either `"map"` or `"reduce"`, although more modes may be added
in future releases.

"port"
"disco_port"
The value of the :envvar:`DISCO_PORT` setting, which is the
port the Disco master is running on, and the port used to
retrieve data from Disco and :ref:`DDFS <ddfs>`. This is used
Expand Down Expand Up @@ -196,7 +196,7 @@ INPUT
The `replica_location` is specified as a URL. The protocol scheme
used for the `replica_location` could be one of `http`, `disco`, or
`raw`. A URL with the `disco` scheme is to be accessed using HTTP
at the Disco `port` specified in the `TASK` response from Disco.
at the `disco_port` specified in the `TASK` response from Disco.
The `raw` scheme denotes that the URL itself (minus the scheme) is
the data for the task.

Expand Down
2 changes: 1 addition & 1 deletion lib/disco/schemes/scheme_disco.py
Expand Up @@ -5,7 +5,7 @@ def open(url, task=None):
if task:
scheme, netloc, path = util.urlsplit(url,
localhost=task.host,
disco_port=task.port,
disco_port=task.disco_port,
disco_data=task.disco_data,
ddfs_data=task.ddfs_data)
else:
Expand Down
4 changes: 2 additions & 2 deletions lib/disco/task.py
Expand Up @@ -52,7 +52,7 @@ def __init__(self,
jobfile='',
jobname='',
master=None,
port=None,
disco_port=None,
put_port=None,
ddfs_data='',
disco_data='',
Expand All @@ -65,7 +65,7 @@ def __init__(self,
self.jobpack = JobPack.load(open(jobfile))
self.jobobjs = cPickle.loads(self.jobpack.jobdata)
self.master = master
self.port = port
self.disco_port = disco_port
self.put_port = put_port
self.ddfs_data = ddfs_data
self.disco_data = disco_data
Expand Down
4 changes: 2 additions & 2 deletions master/src/worker_runtime.erl
Expand Up @@ -92,13 +92,13 @@ do_handle({<<"VSN">>, Ver}, _S) ->
do_handle({<<"TASK">>, _Body}, #state{task = Task} = S) ->
Master = disco:get_setting("DISCO_MASTER"),
JobFile = jobpack:jobfile(disco_worker:jobhome(Task#task.jobname)),
Port = list_to_integer(disco:get_setting("DISCO_PORT")),
DiscoPort = list_to_integer(disco:get_setting("DISCO_PORT")),
PutPort = list_to_integer(disco:get_setting("DDFS_PUT_PORT")),
DDFSData = disco:get_setting("DDFS_DATA"),
DiscoData = disco:get_setting("DISCO_DATA"),
TaskInfo = {struct, [{<<"taskid">>, Task#task.taskid},
{<<"master">>, list_to_binary(Master)},
{<<"port">>, Port},
{<<"disco_port">>, DiscoPort},
{<<"put_port">>, PutPort},
{<<"ddfs_data">>, list_to_binary(DDFSData)},
{<<"disco_data">>, list_to_binary(DiscoData)},
Expand Down

0 comments on commit 4bd93fb

Please sign in to comment.