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

Property file name is incorrectly appended to the script working directory in TestDriver.java #13

Open
fventuri-availity opened this issue Aug 14, 2020 · 0 comments

Comments

@fventuri-availity
Copy link

Line 369 in class eu.ldbc.semanticpublishing.TestDriver (https://github.com/ldbc/ldbc_spb_bm_2.0/blob/master/src/eu/ldbc/semanticpublishing/TestDriver.java#L369) incorrectly appends the name of the property file to the script working directory:

                    ShellUtil.execute(sciptsPath + " " + propertiesFile, file.getName(), true);

(compare that with the definition of the method ShellUtil.execute() in eu.ldbc.semanticpublishing.util.ShellUtil.java)

That line builds a directory path that looks something like this 'dist/data/scripts/postLoad test.properties', which of course triggers a FileNotFound exception during the execution of the benchmark.

There are a couple of ways to fix this problem:

  • in order to pass the property file to the postLoad shell scripts, the call to 'Runtime.getRuntime().exec()' inside SheelUtil.java needs to be changed to pass a String[] (instead of just a String) as its first argument - that String array should have the executable path as its first element, and its arguments (namely the name of the property file) as its next elements. This in turn might require the definition of the execute() method to be changed accordingly; since I saw that that execute() method is also called in other places in TestDriver.java, one option could be to overload that execute() method in ShellUtil.java (the current one with just a 'String', plus a new one where a 'String[]' is passed with its arguments)

  • as a quick and dirty workaround (which is what I did last night to try to get the benchmark to complete without exceptions) I just removed the code that incorrectly appends the property file name to the script working directory in TestDriver.java (lines 368 and 369), like this:

                    System.out.println("\texecuting " + scriptsSubFolder + " script: " + file.getName());
                    ShellUtil.execute(sciptsPath, file.getName(), true); 

and in that case I had to hardcode the name of the property file in the shell scripts inside the 'postLoad' directory.

Also please note that the name of the variable 'sciptsPath' in TestDriver.java is spelled incorrectly - it should have been 'scriptsPath' instead.

Thanks,
Franco Venturi

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

1 participant