Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the jar bundle #22

Open
marmhm opened this issue Sep 13, 2021 · 4 comments
Open

How to run the jar bundle #22

marmhm opened this issue Sep 13, 2021 · 4 comments

Comments

@marmhm
Copy link

marmhm commented Sep 13, 2021

Hi, we are trying to run LSQ with the java build

Unfortunately, the documentation does not reflect the actual code, it says:

mvn -P bundle clean install

java -jar lsq-bundle/target/

But there is no lsq-bundle folder in the repository, and unfortunately, there is no further documentation on how to run and use the .jar file (all documentation is for the debian installed package)

The debian package documentation mention using lsq-cli so we assume there is confusion in the documentation and we should use the lsq-cli subfolder to run LSQ

So we tried running the lsq-cli jar file:

java -jar .\lsq-cli\target\lsq-cli-2.0.0-SNAPSHOT-jar-with-dependencies.jar

But it does not seem to have been packaged properly:

no main manifest attribute, in .\lsq-cli\target\lsq-cli-2.0.0-SNAPSHOT-jar-with-dependencies.jar

It is quite a common error in Java packages building, you need to define the main function used when the package will be run

For example here: https://github.com/AKSW/LSQ/blob/develop/lsq-cli/pom.xml#L98

In the build configuration we might need to add something like:

				<configuration>
					<archive>
						<manifest>
							<mainClass>org.aksw.simba.lsq.cli.main.MainCliLsq</mainClass>
						</manifest>
					</archive>
				</configuration>

Any idea how we can fix the Jar build and run LSQ with Java?

Note: running on Windows 10 with Java 15

@Aklakan
Copy link
Member

Aklakan commented Oct 6, 2021

The documentation certainly needs an overhaul; and yes, the manifest should be part of the jar bundle!

Currently lsq uses a system call to /usr/bin/sort for sorting/merging large amounts of rdf graphs. This prevents use with windows - however, this limitation can be lifted by using apache spark's sort operator (via RDDs). LSQ has already an embedded spark module, but the code still needs to be migrated.

@Aklakan
Copy link
Member

Aklakan commented Oct 10, 2021

Progress update:
lsq spark rdfize should now work on windows as it uses spark's sort operator - instead of relying on /usr/bin/sort.
As most other commands depend on the rdfize code, they should work as well but it all needs more testing.
lsq rdfize only creates an rdf version of the log for subsequent processing;
lsq analyze is the command that performs the static analysis / enrichment.

Note that lsq rdfize will probably become lsq rx rdfize in order to discriminate the engines (rx=rxjava; lsq spark builds on original lsq code which uses rxjava).
lsq rx may be faster for smaller datasets and it can read from stdin which lsq spark can't.

@Aklakan
Copy link
Member

Aklakan commented Oct 11, 2021

The main class manifest was added and the documentation at lsq.aksw.org/ updated

@Aklakan Aklakan closed this as completed Oct 11, 2021
@Aklakan Aklakan reopened this Oct 11, 2021
@Aklakan
Copy link
Member

Aklakan commented Oct 11, 2021

Please confirm whether it works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants