polypheny / Polypheny-DB

A self-adaptive Polystore that provides cost- and workload aware access to heterogeneous data.
https://polypheny.org
Apache License 2.0
122 stars 82 forks source link

Accept query or table name as argument in Query-to-File #306

Open vogti opened 3 years ago

vogti commented 3 years ago

The Query-to-File tool has a JavaFX interface and simple command line interface. In order to integrate query-to-file into scripts and other applications, it would be useful to allow providing the query or table name as argument. It might also be useful to override configuration options (like the path where to mount the result or the Polypheny-DB host) with a parameter.

ebesojoseph commented 3 years ago

I would like to work on this issue as part of my contribution to google summer of code

vogti commented 3 years ago

Hi @ebs237, welcome to Polypheny! It would be great if you can take care of this issue. I have just assigned it to you. Importing Polypheny Query-to-File in your favorite IDE is similar as described for Polypheny-DB here. The main-method is located in src/main/java/org/polypheny/qtf/Main.java. Please be aware that you need to have a running instance of Polypheny-DB and follow the instructions in the readme.

Please be aware, that Query-to-File it is currently not supported on Windows (see #297). Query to File is still in beta. There is only very limited documentation. Therefore, please ask here or open a thread in the discussions forum if you have any questions or experience any issues.

ebesojoseph commented 3 years ago

Thanks , I am getting to work right away

ebesojoseph commented 3 years ago

hello I have imported the project and added all needed dependencies but I am still having trouble with running the project

vogti commented 3 years ago

What kinds of issues do you have? What operating system are you using? Which Java version? Do you have a stacktrace?

ebesojoseph commented 3 years ago

I am running on mac catalina , java version 15.0.2+7-27 I tried running with gradle but it was not successful

ebesojoseph commented 3 years ago

the debugger pushes this line as an error

log.error("Could nor read line",e)

vogti commented 3 years ago

Do you have stacktrace?

ebesojoseph commented 3 years ago

sorry for bothering the problem is because of fuse , i don't have it installed. please apart from using homebrew is there any other way by which I can install osxfuse ?

my homebrew keeps emitting errors when when I try to install

vogti commented 3 years ago

Yes, you can install it manually: https://github.com/osxfuse/osxfuse/releases

ebesojoseph commented 3 years ago

thanks for the help

ebesojoseph commented 3 years ago

what might be the cause of this

[WebSocketConnectReadThread-58]: an error occurred:java.net.ConnectException: Connection refused 18:34:24.711 ERROR [JavaFX Application Thread]: Could not connect to websocket.

ebesojoseph commented 3 years ago

please I need help , What could be the cause of this ?

[WebSocketConnectReadThread-24]: an error occurred:java.net.ConnectException: Connection refused 09:09:39.952 ERROR [JavaFX Application Thread]: Could not connect to websocket.v

nilshansen94 commented 3 years ago

Hi @ebs237, it looks like you have no Polypheny-DB instance running. Please make sure to clone, build and run Polypheny-DB as well. See this link on how to set up Polypheny-DB. If you run Polypheny-DB on a different host or a non-default port, make sure that the connection information in the Query-to-File config file is corrent.

erdengk commented 2 years ago

My computer system is Mac OS Big Sur, apple M1 chip. I also encountered problems similar to the above, but I have a running polyphenyl dB. But this error always occurs when I want to run Query to file.

ERROR [JavaFX Application Thread]: Could not load fxml

I also used Google to search many web pages, but I couldn't find a solution. @vogti @nilshansen94 Can you help me solve this problem?

The specific information is shown below:

> Task :Main.main()
kext load failed: -603947007
mount_osxfuse: the file system is not available (255)
18:37:25.488 ERROR [JavaFX Application Thread]: Could not load fxml
 javafx.fxml.LoadException: 
/Users/dk/Documents/pro/Query-to-File/build/resources/main/fxml/sample.fxml:12

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2707) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2685) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2517) ~[javafx-fxml-15.0.1-mac.jar:?]
    at org.polypheny.qtf.MainApp.start(MainApp.java:44) ~[main/:?]
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846) ~[javafx-graphics-15.0.1-mac.jar:?]
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455) ~[javafx-graphics-15.0.1-mac.jar:?]
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) ~[javafx-graphics-15.0.1-mac.jar:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) ~[javafx-graphics-15.0.1-mac.jar:?]
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) [javafx-graphics-15.0.1-mac.jar:?]
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS
    at ru.serce.jnrfuse.AbstractFuseFS.mount(AbstractFuseFS.java:293) ~[jnr-fuse-0.5.5.jar:?]
    at ru.serce.jnrfuse.Mountable.mount(Mountable.java:20) ~[jnr-fuse-0.5.5.jar:?]
    at org.polypheny.qtf.QueryInterface.<init>(QueryInterface.java:55) ~[main/:?]
    at org.polypheny.qtf.Controller.<init>(Controller.java:42) ~[main/:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS

    at java.lang.Class.newInstance(Class.java:584) ~[?:?]
    at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:938) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634) ~[javafx-fxml-15.0.1-mac.jar:?]
    ... 9 more
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS, return code = 1
    at ru.serce.jnrfuse.AbstractFuseFS.mount(AbstractFuseFS.java:289) ~[jnr-fuse-0.5.5.jar:?]
    at ru.serce.jnrfuse.Mountable.mount(Mountable.java:20) ~[jnr-fuse-0.5.5.jar:?]
    at org.polypheny.qtf.QueryInterface.<init>(QueryInterface.java:55) ~[main/:?]
    at org.polypheny.qtf.Controller.<init>(Controller.java:42) ~[main/:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
    at java.lang.Class.newInstance(Class.java:584) ~[?:?]
    at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:938) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808) ~[javafx-fxml-15.0.1-mac.jar:?]
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634) ~[javafx-fxml-15.0.1-mac.jar:?]
    ... 9 more
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS, return code = 1

> Task :Main.main() FAILED

Execution failed for task ':Main.main()'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
vogti commented 2 years ago

@erdengk It looks like it is unable to find fuse. Have you installed jnr-fuse as described in the readme?

erdengk commented 2 years ago

@vogti Thank you for your prompt. I have successfully run the Query-to-File.

image

erdengk commented 2 years ago

@vogti @nilshansen94
I want to confirm with you that the problem is to add a function to modify configuration options through parameters?

For example, the path where to mount the result or the polyphenyl DB host.

I'm trying to understand this project. I don't know where to start. Can you guide me on where to start? Thanks.

vogti commented 2 years ago

Yes, kind of. The idea is to have kind of a command line mode for Query-to-File. This would allow using it in scripts.

landongyu commented 5 months ago

I would like to work on this issue, as part of my contribution to google summer of code!

vogti commented 5 months ago

Hi @landongyu, welcome to Polypheny! It would be great if you can take care of this issue. I have just assigned it to you.