hasodent,

We've tried your suggestion but it seems like that's not working out:

mesos-execute --master=cluster.example.com:5050 --name=test-program
--command=/home/john/anaconda3/bin/python /home/john/mesos/error_msg.py
read --resources=cpus:1;mem:128 --env='{"MY_FILEPATH":
"/home/john/temp_output/test.csv"}'

john@cluster:~/mesos$ Failed to load flag 'env': Failed to load value
''{"MY_FILEPATH": "/home/john/temp_output/test.csv"}'': syntax error at
line 1 near: '{"MY_FILEPATH": "/home/john/temp_output/test.csv"}'


We're using the Bash shell. Is anyone else passing file-paths within their
environment variable argument?


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Wed, Jun 29, 2016 at 8:55 PM, haosdent <[email protected]> wrote:

> Yes, need add quotes for --env='{"key": "value"}' flag.
>
> On Thu, Jun 30, 2016 at 4:39 AM, Chris Baker <[email protected]>
> wrote:
>
>> It's your shell:
>>
>> $ echo {"MY_FILEPATH": "/home/john/temp_output/test.csv"}
>> {MY_FILEPATH: /home/john/temp_output/test.csv}
>>
>> On Wed, Jun 29, 2016 at 4:05 PM June Taylor <[email protected]> wrote:
>>
>>> hasodent,
>>>
>>> I admit I don't see much of a difference in your version. Are you saying
>>> that Mesos doesn't escape the values, and that our program may be doing
>>> that on the executor end?
>>>
>>>
>>> Thanks,
>>> June Taylor
>>> System Administrator, Minnesota Population Center
>>> University of Minnesota
>>>
>>> On Wed, Jun 29, 2016 at 2:02 PM, haosdent <[email protected]> wrote:
>>>
>>>> Hi, @Taylor I use
>>>>
>>>> ```
>>>> ./src/mesos-execute --env='{"MY_FILEPATH":
>>>> "/home/john/temp_output/test.csv"}' --master="localhost:5050" --command=env
>>>> --name="test"
>>>> ```
>>>>
>>>> to test in my env. The output looks correct in my side
>>>>
>>>> ```
>>>> ...
>>>> MY_FILEPATH=/home/john/temp_output/test.csv
>>>>
>>>> MESOS_SANDBOX=/tmp/mesos/slaves/fe6123b9-8757-4015-be4b-fda901247fce-S0/frameworks/fe6123b9-8757-4015-be4b-fda901247fce-0000/executors/test/runs/fe818890-2a22-4b2b-aab2-816ed0b631d5
>>>> ...
>>>> ```
>>>>
>>>> Not sure if your problem caused by your program
>>>>
>>>> On Thu, Jun 30, 2016 at 1:58 AM, June Taylor <[email protected]> wrote:
>>>>
>>>>> Greetings,
>>>>>
>>>>> We are using mesos-execute and passing an argument that contains a
>>>>> Unix filepath, as follows:
>>>>>
>>>>> *mesos-execute --master=cluster.example.com:5050
>>>>> <http://cluster.example.com:5050> --name=test-program
>>>>> --command=/home/john/anaconda3/bin/python /home/john/mesos/error_msg.py
>>>>> read --resources=cpus:1;mem:128 --env={"MY_FILEPATH":
>>>>> "/home/john/temp_output/test.csv"}*
>>>>>
>>>>> The slashes in the file path are then apparently escaped by
>>>>> mesos-execute and therefore fail to be useful once picked up by the
>>>>> executor:
>>>>>
>>>>> *FileNotFoundError: [Errno 2] No such file or directory:
>>>>> '"\\/home\\/john\\/temp_output\\/test.csv"'*
>>>>>
>>>>> *I0629 10:13:13.814870 14025 exec.cpp:390] Executor asked to shutdown*
>>>>>
>>>>> Are other people experiencing this? What is the method to avoid it?
>>>>> Thanks,
>>>>> June Taylor
>>>>> System Administrator, Minnesota Population Center
>>>>> University of Minnesota
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Haosdent Huang
>>>>
>>>
>>>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Reply via email to