You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Edward Capriolo <ed...@gmail.com> on 2010/08/08 21:01:22 UTC
Wondering about add jar
What do you guys thing about this error?
[edward@ec dist]$ bin/hive
Hive history file=/tmp/edward/hive_job_log_edward_201008081453_1405038865.txt
hive> add jar /opt/cassandra/conf/storage-conf.xml;
Added /opt/cassandra/conf/storage-conf.xml to class path
hive> select * from cassandra_keyspace1_standard1;
OK
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftValidation.java:69)
at org.apache.cassandra.hadoop.ConfigHelper.setColumnFamily(ConfigHelper.java:63)
at org.apache.hadoop.hive.cassandra.input.HiveCassandraTableInputFormat.getSplits(HiveCassandraTableInputFormat.java:140)
at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:281)
at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:321)
at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:121)
at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:660)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:146)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:197)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:329)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
Cannot locate storage-conf.xml via storage-config system property or
classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:539)
... 15 more
Caused by: java.lang.RuntimeException: Cannot locate storage-conf.xml
via storage-config system property or classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigPath(DatabaseDescriptor.java:155)
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:164)
... 15 more
Should add jar be placing this file in the classpath?
I tried add file as well.
Regards,
Edward
Re: Wondering about add jar
Posted by Edward Capriolo <ed...@gmail.com>.
On Mon, Aug 9, 2010 at 2:53 PM, John Sichi <js...@facebook.com> wrote:
> I don't think you can add an unarchived file to the classpath like that (Java wants either directories or jars as classpath entries).
>
> Probably you can just put that conf file in its own little jar and add that instead.
>
> JVS
>
> On Aug 8, 2010, at 12:01 PM, Edward Capriolo wrote:
>
>> What do you guys thing about this error?
>>
>> [edward@ec dist]$ bin/hive
>> Hive history file=/tmp/edward/hive_job_log_edward_201008081453_1405038865.txt
>> hive> add jar /opt/cassandra/conf/storage-conf.xml;
>> Added /opt/cassandra/conf/storage-conf.xml to class path
>> hive> select * from cassandra_keyspace1_standard1;
>> OK
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>> at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftValidation.java:69)
>> at org.apache.cassandra.hadoop.ConfigHelper.setColumnFamily(ConfigHelper.java:63)
>> at org.apache.hadoop.hive.cassandra.input.HiveCassandraTableInputFormat.getSplits(HiveCassandraTableInputFormat.java:140)
>> at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:281)
>> at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:321)
>> at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:121)
>> at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:660)
>> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:146)
>> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:197)
>> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:329)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
>> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
>> Cannot locate storage-conf.xml via storage-config system property or
>> classpath lookup.
>> at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:539)
>> ... 15 more
>> Caused by: java.lang.RuntimeException: Cannot locate storage-conf.xml
>> via storage-config system property or classpath lookup.
>> at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigPath(DatabaseDescriptor.java:155)
>> at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:164)
>> ... 15 more
>> Should add jar be placing this file in the classpath?
>> I tried add file as well.
>>
>> Regards,
>> Edward
>
>
Bingo that did it!
hive> add jar storage.jar ;
Added storage.jar to class path
hive> select * from cassandra_keyspace1_standard1;
OK
NULL NULL
3 NULL
6 NULL
Still we should be able to relax that restriction, many tools read
properties and other xml files from the classpath with getResource()
Anyway awesome. Thanks again!
Re: Wondering about add jar
Posted by John Sichi <js...@facebook.com>.
I don't think you can add an unarchived file to the classpath like that (Java wants either directories or jars as classpath entries).
Probably you can just put that conf file in its own little jar and add that instead.
JVS
On Aug 8, 2010, at 12:01 PM, Edward Capriolo wrote:
> What do you guys thing about this error?
>
> [edward@ec dist]$ bin/hive
> Hive history file=/tmp/edward/hive_job_log_edward_201008081453_1405038865.txt
> hive> add jar /opt/cassandra/conf/storage-conf.xml;
> Added /opt/cassandra/conf/storage-conf.xml to class path
> hive> select * from cassandra_keyspace1_standard1;
> OK
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftValidation.java:69)
> at org.apache.cassandra.hadoop.ConfigHelper.setColumnFamily(ConfigHelper.java:63)
> at org.apache.hadoop.hive.cassandra.input.HiveCassandraTableInputFormat.getSplits(HiveCassandraTableInputFormat.java:140)
> at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:281)
> at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:321)
> at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:121)
> at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:660)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:146)
> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:197)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:329)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> Cannot locate storage-conf.xml via storage-config system property or
> classpath lookup.
> at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:539)
> ... 15 more
> Caused by: java.lang.RuntimeException: Cannot locate storage-conf.xml
> via storage-config system property or classpath lookup.
> at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigPath(DatabaseDescriptor.java:155)
> at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:164)
> ... 15 more
> Should add jar be placing this file in the classpath?
> I tried add file as well.
>
> Regards,
> Edward