I just figured out that the missing file is placed at a different location:

There is:
/tmp/flink_data/output

But python looks in
/tmp/users/1000/flink_data/output

("1000" is my Linux user-id)

I guess, the test expects that the file is created from the test base
class and python looks for the file in the wrong place. It uses the
"tempfile" package that return "/tmp/users/1000" instead of "/tmp". It
seems, that "tempfile" returns a different tmp folder for each user,
however, Flink uses "/tmp" only.

I would claim, this is a bug in the python layer.


-Matthias


On 06/05/2015 12:33 PM, Matthias J. Sax wrote:
> Hi,
> 
> I have a local setup problem on my Linux that let Python tests fail. For
> some reason, it cannot write to /tmp/ file... (see error message below).
> 
> I can resolve the issue with "sudo rm -rf /tmp/*", but this raises other
> problems on my system. Furthermore, the testing problem is back, after
> restarting my machine.
> 
> Do you have any idea, what I need to do, to get my configuration right?
> 
> -Matthias
> 
>> Running org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest
>> log4j:WARN No appenders could be found for logger 
>> (org.apache.flink.languagebinding.api.java.python.PythonPlanBinder).
>> log4j:WARN Please initialize the log4j system properly.
>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for 
>> more info.
>> Traceback (most recent call last):
>>   File "/tmp/flink_plan/plan.py", line 162, in <module>
>>     env = get_environment()
>>   File "/tmp/flink_plan/flink/plan/Environment.py", line 34, in 
>> get_environment
>>     return Environment()
>>   File "/tmp/flink_plan/flink/plan/Environment.py", line 44, in __init__
>>     self._connection = Connection.OneWayBusyBufferingMappedFileConnection()
>>   File "/tmp/flink_plan/flink/connection/Connection.py", line 42, in __init__
>>     self._output_file = open(tempfile.gettempdir() + "/flink_data/output", 
>> "rb+")
>> IOError: [Errno 2] No such file or directory: 
>> '/tmp/user/1000/flink_data/output'
>> Traceback (most recent call last):
>>   File "/tmp/flink_plan/plan.py", line 162, in <module>
>>     env = get_environment()
>>   File "/tmp/flink_plan/flink/plan/Environment.py", line 34, in 
>> get_environment
>>     return Environment()
>>   File "/tmp/flink_plan/flink/plan/Environment.py", line 44, in __init__
>>     self._connection = Connection.OneWayBusyBufferingMappedFileConnection()
>>   File "/tmp/flink_plan/flink/connection/Connection.py", line 42, in __init__
>>     self._output_file = open(tempfile.gettempdir() + "/flink_data/output", 
>> "rb+")
>> FileNotFoundError: [Errno 2] No such file or directory: 
>> '/tmp/user/1000/flink_data/output'
>> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 5.13 sec <<< 
>> FAILURE! - in 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest
>> testPython2(org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest)
>>   Time elapsed: 2.784 sec  <<< ERROR!
>> java.lang.RuntimeException: Plan file caused an error. Check log-files for 
>> details.
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.startPython(PythonPlanBinder.java:202)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.runPlan(PythonPlanBinder.java:109)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.main(PythonPlanBinder.java:84)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest.testPython2(PythonPlanBinderTest.java:75)
>>
>> testPython3(org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest)
>>   Time elapsed: 2.179 sec  <<< ERROR!
>> java.lang.RuntimeException: Plan file caused an error. Check log-files for 
>> details.
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.startPython(PythonPlanBinder.java:202)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.runPlan(PythonPlanBinder.java:109)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.main(PythonPlanBinder.java:84)
>>         at 
>> org.apache.flink.languagebinding.api.java.python.PythonPlanBinderTest.testPython3(PythonPlanBinderTest.java:85)
>>
>>
>> Results :
>>
>> Tests in error: 
>>   PythonPlanBinderTest.testPython2:75 » Runtime Plan file caused an error. 
>> Check...
>>   PythonPlanBinderTest.testPython3:85 » Runtime Plan file caused an error. 
>> Check...
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to