[
https://issues.apache.org/jira/browse/FLINK-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14220000#comment-14220000
]
ASF GitHub Bot commented on FLINK-377:
--------------------------------------
Github user rmetzger commented on the pull request:
https://github.com/apache/incubator-flink/pull/202#issuecomment-63879867
I copied the wordcount example into a file, trying to run it:
```
robert@robert-tower ...HOT-bin/flink-0.8-incubating-SNAPSHOT (git)-[papipr]
% ll
total 84
drwxr-xr-x 2 robert robert 4096 Nov 20 21:59 bin/
drwxr-xr-x 2 robert robert 4096 Nov 20 21:59 conf/
-rw-r--r-- 1 robert robert 539 Nov 20 21:59 DISCLAIMER
drwxr-xr-x 3 robert robert 4096 Nov 20 21:59 examples/
drwxr-xr-x 2 robert robert 4096 Nov 20 21:59 lib/
-rw-r--r-- 1 robert robert 23843 Nov 20 21:59 LICENSE
drwxr-xr-x 2 robert robert 4096 Nov 20 22:02 log/
-rw-r--r-- 1 robert robert 19706 Nov 20 21:59 NOTICE
-rw-r--r-- 1 robert robert 1348 Nov 20 21:59 README.txt
drwxr-xr-x 5 robert robert 4096 Nov 20 21:59 resources/
drwxr-xr-x 2 robert robert 4096 Nov 20 21:59 tools/
-rw-r--r-- 1 robert robert 928 Nov 20 22:02 wc.py
robert@robert-tower ...HOT-bin/flink-0.8-incubating-SNAPSHOT (git)-[papipr]
% ./bin/pyflink.sh -v wc.py
Error: The main method caused an error.
org.apache.flink.client.program.ProgramInvocationException: The main method
caused an error.
at
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:445)
at
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:346)
at org.apache.flink.client.program.Client.run(Client.java:244)
at
org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:347)
at org.apache.flink.client.CliFrontend.run(CliFrontend.java:334)
at
org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1001)
at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1025)
Caused by: java.io.IOException: The file URI 'wc.py' is not valid. File
URIs need to specify aboslute file paths.
at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:212)
at org.apache.flink.core.fs.Path.getFileSystem(Path.java:299)
at org.apache.flink.runtime.filecache.FileCache.copy(FileCache.java:118)
at
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.prepareFiles(PythonPlanBinder.java:94)
at
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.go(PythonPlanBinder.java:75)
at
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.main(PythonPlanBinder.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:430)
... 6 more
```
It would be convenient for users if the program would not expect an
absolute path.
2. Error
```
./bin/pyflink.sh -v
/home/robert/incubator-flink/flink-dist/target/flink-0.8-incubating-SNAPSHOT-bin/flink-0.8-incubating-SNAPSHOT/wc.py
StreamPrinter: Traceback (most recent call last):
StreamPrinter: File "/tmp/flink_plan/flink/connection/Connection.py",
line 24, in <module>
StreamPrinter: import cStringIO
StreamPrinter: ImportError: No module named 'cStringIO'
StreamPrinter:
StreamPrinter: During handling of the above exception, another exception
occurred:
StreamPrinter:
StreamPrinter: Traceback (most recent call last):
StreamPrinter: File "/tmp/flink_plan/plan.py", line 1, in <module>
StreamPrinter: from flink.plan.Environment import get_environment
StreamPrinter: File "/tmp/flink_plan/flink/plan/Environment.py", line 18,
in <module>
StreamPrinter: from flink.connection import Connection
StreamPrinter: File "/tmp/flink_plan/flink/connection/Connection.py",
line 28, in <module>
StreamPrinter: import StringIO
StreamPrinter: ImportError: No module named 'StringIO'
```
Maybe we need a section that describes how to install the dependencies? (or
at least list them)
> Create a general purpose framework for language bindings
> --------------------------------------------------------
>
> Key: FLINK-377
> URL: https://issues.apache.org/jira/browse/FLINK-377
> Project: Flink
> Issue Type: Improvement
> Reporter: GitHub Import
> Labels: github-import
> Fix For: pre-apache
>
>
> A general purpose API to run operators with arbitrary binaries.
> This will allow to run Stratosphere programs written in Python, JavaScript,
> Ruby, Go or whatever you like.
> We suggest using Google Protocol Buffers for data serialization. This is the
> list of languages that currently support ProtoBuf:
> https://code.google.com/p/protobuf/wiki/ThirdPartyAddOns
> Very early prototype with python:
> https://github.com/rmetzger/scratch/tree/learn-protobuf (basically testing
> protobuf)
> For Ruby: https://github.com/infochimps-labs/wukong
> Two new students working at Stratosphere (@skunert and @filiphaase) are
> working on this.
> The reference binding language will be for Python, but other bindings are
> very welcome.
> The best name for this so far is "stratosphere-lang-bindings".
> I created this issue to track the progress (and give everybody a chance to
> comment on this)
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/issues/377
> Created by: [rmetzger|https://github.com/rmetzger]
> Labels: enhancement,
> Assignee: [filiphaase|https://github.com/filiphaase]
> Created at: Tue Jan 07 19:47:20 CET 2014
> State: open
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)