facing issue in running BasicOperations

8 views
Skip to first unread message

Pranay Tonpay

unread,
Oct 14, 2015, 3:36:42 PM10/14/15
to Tachyon Users

 tried to run BasicOperatoions class as below -

mvn exec:java -Dexec.mainClass="tachyon.examples.BasicOperations" -Dexec.args="tachyon://localhost:19998 mylocalfile MUST_CACHE"

got an error -
java.lang.IllegalArgumentException: URI must be absolute, unless it's empty.

any comments ?

Jiří Šimša

unread,
Oct 14, 2015, 4:43:15 PM10/14/15
to Pranay Tonpay, Tachyon Users
Hi Pranay, 

What directory are you running your command from? What version of Tachyon?

I can run the BasicOperations example successfully for the master branch of Tachyon using:

java -cp ${TACHYON_HOME}/assembly/target/tachyon-assemblies-0.8.0-SNAPSHOT-jar-with-dependencies.jar:${TACHYON_HOME}/examples/target/tachyon-examples-0.8.0-SNAPSHOT.jar tachyon.examples.BasicOperations tachyon://localhost:19998 mylocalfile STORE

The command above assume that Tachyon jar have been compiled (using mvn install) and that an instance of Tachyon is running on the local host.


--
Jiří Šimša

--
You received this message because you are subscribed to the Google Groups "Tachyon Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tachyon-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pranay Tonpay

unread,
Oct 16, 2015, 2:18:00 AM10/16/15
to Tachyon Users, pto...@gmail.com
 thx Jiri ... i tried on 1.8 and got the below -

pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ java -cp /home/pranay/TACHYON_NEW/tachyon/assembly/target/tachyon-assemblies-0.8.0-SNAPSHOT-jar-with-dependencies.jar:${TACHYON_HOME}/examples/target/tachyon-examples-0.8.0-SNAPSHOT.jar tachyon.examples.BasicOperations tachyon://localhost:19998 file STORE
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant tachyon.client.WriteType.STORE
    at java.lang.Enum.valueOf(Enum.java:236)
    at tachyon.client.WriteType.valueOf(WriteType.java:23)
    at tachyon.examples.BasicOperations.main(BasicOperations.java:115)

When i checked WriteType.java, it doesnt seerm to have STORE enum at all... So i randomly selected MUST_CACHE -
But i got the below error -

pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ java -cp /home/pranay/TACHYON_NEW/tachyon/assembly/target/tachyon-assemblies-0.8.0-SNAPSHOT-jar-with-dependencies.jar:${TACHYON_HOME}/examples/target/tachyon-examples-0.8.0-SNAPSHOT.jar tachyon.examples.BasicOperations tachyon://localhost:19998 LICENSE MUST_CACHE
15/10/16 11:36:26 INFO : Tachyon client (version 0.8.0-SNAPSHOT) is trying to connect with BlockMaster master @ /192.168.41.54:19998
15/10/16 11:36:26 INFO : Client registered with BlockMaster master @ /192.168.41.54:19998
15/10/16 11:36:26 ERROR : Exception running test: tachyon.examples.BasicOperations@10e07658

java.lang.IllegalArgumentException: URI must be absolute, unless it's empty.
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
    at tachyon.client.TachyonFS.validateUri(TachyonFS.java:1114)
    at tachyon.client.TachyonFS.createFile(TachyonFS.java:339)
    at tachyon.client.AbstractTachyonFS.createFile(AbstractTachyonFS.java:66)
    at tachyon.client.TachyonFS.createFile(TachyonFS.java:67)
    at tachyon.client.AbstractTachyonFS.createFile(AbstractTachyonFS.java:48)
    at tachyon.client.TachyonFS.createFile(TachyonFS.java:67)
    at tachyon.examples.BasicOperations.createFile(BasicOperations.java:64)
    at tachyon.examples.BasicOperations.call(BasicOperations.java:56)
    at tachyon.examples.BasicOperations.call(BasicOperations.java:39)
    at tachyon.examples.Utils.runExample(Utils.java:102)
    at tachyon.examples.BasicOperations.main(BasicOperations.java:115)

Jiří Šimša

unread,
Oct 16, 2015, 9:52:03 AM10/16/15
to Pranay Tonpay, Tachyon Users
Pranay,

When you say 1.8, do you mean 0.8-SNAPSHOT? The error you are seeing for STORE suggests you have not rebuilt and restarted Tachyon (i.e. you are still running version 0.7.1).

I suggest you try the following:

$ cd  /home/pranay/TACHYON_NEW/tachyon
# verify you are on the latest clean version of master branch
$ ./bin/tachyon-stop.sh
$ mvn clean install 
$ ./bin/tachyon format
$ ./bin/tachyon-start.sh local

At this point you should be able to run:

$ java -cp examples/target/tachyon-examples-0.8.0-SNAPSHOT.jar:assembly/target/tachyon-assemblies-0.8.0-SNAPSHOT-jar-with-dependencies.jar -Dtachyon.logs.dir=logs -Dtachyon.logger.type=USER_LOGGER -Dlog4j.configuration=file:conf/log4j.properties tachyon.examples.BasicOperations tachyon://localhost:19998/ /LICENSE STORE

Note that the path to the LICENSE file needs to be absolute, which is the reason for the other error you are seeing.

Best,


--
Jiří Šimša

Jiří Šimša

unread,
Oct 19, 2015, 10:12:51 AM10/19/15
to Pranay Tonpay, Tachyon Users
Hi Pranay,

Could you please paste here:

- the full stack you get when you encounter the exception
- output of "./bin/tachyon version"
- output of "git log -n 1"

Thanks.


--
Jiří Šimša

On Mon, Oct 19, 2015 at 2:15 AM, Pranay Tonpay <pto...@gmail.com> wrote:
I tried everything but the below error doesn't go away -

Exception in thread "main" java.lang.IllegalArgumentException: No enum constant tachyon.client.WriteType.STORE

Pranay Tonpay

unread,
Oct 20, 2015, 1:17:28 AM10/20/15
to Jiří Šimša, Tachyon Users
Hi Jiři,
Below are the details -

pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ jps
5644 Jps
22782 org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
5543 TachyonWorker
5494 TachyonMaster


pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ java -cp examples/target/tachyon-examples-0.8.0-SNAPSHOT.jar:assembly/target/tachyon-assemblies-0.8.0-SNAPSHOT-jar-with-dependencies.jar -Dtachyon.logs.dir=logs -Dtachyon.logger.type=USER_LOGGER -Dlog4j.configuration=file:conf/log4j.properties tachyon.examples.BasicOperations tachyon://localhost:19998/ /LICENSE STORE

Exception in thread "main" java.lang.IllegalArgumentException: No enum constant tachyon.client.WriteType.STORE
    at java.lang.Enum.valueOf(Enum.java:236)
    at tachyon.client.WriteType.valueOf(WriteType.java:23)
    at tachyon.examples.BasicOperations.main(BasicOperations.java:115)


pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ bin/tachyon version
Tachyon version: 0.8.0-SNAPSHOT
pranay@pranay-Latitude-E6540:~/TACHYON_NEW/tachyon$ git log -n 1
commit be0d2ae3a4b370bf0165ff0032a85a9ccae4274c
Author: pranay <pto...@gmail.com>
Date:   Thu Oct 1 15:15:08 2015 +0530

    [TACHYON-1082] Remove unused Tachyon parameters definition from Tachyon.Constants

Jiří Šimša

unread,
Oct 20, 2015, 1:18:16 PM10/20/15
to Pranay Tonpay, Tachyon Users
Hi Pranay,

Based on the output from "git log", it looks like you have not updated your Tachyon master branch in a while and you have also made modifications yourself.

Could you use the latest version of the master branch with no modifications? It is hard for me to diagnose the problem if I don't know what code base you are using. Thanks.

Best,

--
Jiří Šimša
Reply all
Reply to author
Forward
0 new messages