You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by kiranprasad <ki...@imimobile.com> on 2011/10/19 11:16:47 UTC

When trying to create table Iam getting exception

Hi 

Iam new to HIVE, when trying to create a table getting below exception.
FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does not have a scheme

Regards
Kiran.G

Re: When trying to create table Iam getting exception

Posted by kiranprasad <ki...@imimobile.com>.
Can I run HIVE in local mode, example like PIG local mode??

-----Original Message----- 
From: kiranprasad
Sent: Wednesday, October 19, 2011 3:24 PM
To: user@hive.apache.org
Subject: Re: When trying to create table Iam getting exception

PF below Hive-site.xml. there is no password for the DB.

<configuration>
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://10.0.2.65/metastore_db?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
        <name>javax.jdo.option.ConnectionUserName</name>
        <value>root</value>
    </property>
    <property>
        <name>javax.jdo.option.ConnectionPassword</name>
        <value></value>
    </property>

</configuration>

-----Original Message----- 
From: Adriaan Tijsseling
Sent: Wednesday, October 19, 2011 3:19 PM
To: user@hive.apache.org
Subject: Re: When trying to create table Iam getting exception

how is your metastore set up? Looks like some incorrect or incomplete
hive-site.xml config for metatstore settings.

On 2011/10/19, at 11:38, kiranprasad wrote:

>
> Below mentioned is the table which I ve tried to create.
>
> $ bin/hive
> Hive history 
> file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
> hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT DELIMITED FIELDS 
> TERMINATED BY ',' STORED AS TEXTFILE;
> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
> not have a scheme
> FAILED: Execution Error, return code 1 from 
> org.apache.hadoop.hive.ql.exec.DDLTask
>
> -----Original Message----- From: Adriaan Tijsseling
> Sent: Wednesday, October 19, 2011 3:01 PM
> To: user@hive.apache.org
> Subject: Re: When trying to create table Iam getting exception
>
> You should provide more information in order to get proper support such as 
> the exact command you used to create the table.
>
> On 2011/10/19, at 11:16, kiranprasad wrote:
>
>> Hi
>>
>> Iam new to HIVE, when trying to create a table getting below exception.
>> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
>> not have a scheme
>>
>> Regards
>> Kiran.G
>
>




Re: When trying to create table Iam getting exception

Posted by kiranprasad <ki...@imimobile.com>.
PF below Hive-site.xml. there is no password for the DB.

<configuration>
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://10.0.2.65/metastore_db?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
        <name>javax.jdo.option.ConnectionUserName</name>
        <value>root</value>
    </property>
    <property>
        <name>javax.jdo.option.ConnectionPassword</name>
        <value></value>
    </property>

</configuration>

-----Original Message----- 
From: Adriaan Tijsseling
Sent: Wednesday, October 19, 2011 3:19 PM
To: user@hive.apache.org
Subject: Re: When trying to create table Iam getting exception

how is your metastore set up? Looks like some incorrect or incomplete 
hive-site.xml config for metatstore settings.

On 2011/10/19, at 11:38, kiranprasad wrote:

>
> Below mentioned is the table which I ve tried to create.
>
> $ bin/hive
> Hive history 
> file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
> hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT DELIMITED FIELDS 
> TERMINATED BY ',' STORED AS TEXTFILE;
> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
> not have a scheme
> FAILED: Execution Error, return code 1 from 
> org.apache.hadoop.hive.ql.exec.DDLTask
>
> -----Original Message----- From: Adriaan Tijsseling
> Sent: Wednesday, October 19, 2011 3:01 PM
> To: user@hive.apache.org
> Subject: Re: When trying to create table Iam getting exception
>
> You should provide more information in order to get proper support such as 
> the exact command you used to create the table.
>
> On 2011/10/19, at 11:16, kiranprasad wrote:
>
>> Hi
>>
>> Iam new to HIVE, when trying to create a table getting below exception.
>> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
>> not have a scheme
>>
>> Regards
>> Kiran.G
>
>



Re: When trying to create table Iam getting exception

Posted by Adriaan Tijsseling <ad...@tijsseling.com>.
how is your metastore set up? Looks like some incorrect or incomplete hive-site.xml config for metatstore settings. 

On 2011/10/19, at 11:38, kiranprasad wrote:

> 
> Below mentioned is the table which I ve tried to create.
> 
> $ bin/hive
> Hive history file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
> hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE;
> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does not have a scheme
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
> 
> -----Original Message----- From: Adriaan Tijsseling
> Sent: Wednesday, October 19, 2011 3:01 PM
> To: user@hive.apache.org
> Subject: Re: When trying to create table Iam getting exception
> 
> You should provide more information in order to get proper support such as the exact command you used to create the table.
> 
> On 2011/10/19, at 11:16, kiranprasad wrote:
> 
>> Hi
>> 
>> Iam new to HIVE, when trying to create a table getting below exception.
>> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does not have a scheme
>> 
>> Regards
>> Kiran.G
> 
> 


Re: When trying to create table Iam getting exception

Posted by Chinna Rao Lalam 72745 <ch...@huawei.com>.
Hi Ankit,

  I have verified the trunk code base if "hive.metastore.local" this property is true the flow should not reach to this location

org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:127)
 
Before it self it should return with the client object. 

Hope it helps,
Chinna Rao Lalam

----- Original Message -----
From: Ankit Jain <an...@gmail.com>
Date: Wednesday, October 19, 2011 5:40 pm
Subject: Re: When trying to create table Iam getting exception
To: user@hive.apache.org

> Hi ,
> 
> I can run query over hive through hive shell and using jdbc 
> connection.
> But, I got the below error, When i tried to access the hive 
> metadata using
> hive api.
> 
> java.lang.IllegalArgumentException: URI:  does not have a scheme
>    at
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:127)
>    at
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:92)
> 
> *Source Code : *
> HiveConf conf;
> conf=new HiveConf();
> conf.addResource("/home/ankit/hive-0.7.1-bin/conf/hive-default.xml");
> HiveMetaStoreClient hiveMetastoreClient;
>   try {
>        hiveMetastoreClient = new HiveMetaStoreClient(conf);
>        List<String> list=hiveMetastoreClient.getAllDatabases();
>        System.out.println("LIST : "+list);
>    } catch (Exception e) {
>        e.printStackTrace();
> 
> hive-default.xml :
> 
> <property>
>  <name>hive.metastore.local</name>
>  <value>true</value>
>  <description>controls whether to connect to remove metastore 
> server or
> open a new metastore server in Hive Client JVM</description>
> </property>
> 
> <property>
>  <name>javax.jdo.option.ConnectionURL</name>
> 
> <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
>  <description>JDBC connect string for a JDBC metastore</description>
> </property>
> 
> <property>
>  <name>javax.jdo.option.ConnectionDriverName</name>
>  <value>com.mysql.jdbc.Driver</value>
>  <description>Driver class name for a JDBC metastore</description>
> </property>
> 
> <property>
>  <name>javax.jdo.option.ConnectionUserName</name>
>  <value>root</value>
>  <description>username to use against metastore 
> database</description></property>
> 
> <property>
>  <name>javax.jdo.option.ConnectionPassword</name>
>  <value>password</value>
> </property>
> 
> Thanks,
> Ankit Jain
> 
> 
> On Wed, Oct 19, 2011 at 4:43 PM, Chinna Rao Lalam 72745 <
> chinnarao@huawei.com> wrote:
> 
> > Hi,
> >
> >  Check where u have configured some value to the 
> "hive.metastore.uris"> property in hive-default.xml or hive-site.xml
> > and whether it is valid or not
> >
> >
> > Hope it helps
> > Chinna Rao Lalam
> >  ----- Original Message -----
> > From: kiranprasad <ki...@imimobile.com>
> > Date: Wednesday, October 19, 2011 3:08 pm
> > Subject: Re: When trying to create table Iam getting exception
> > To: user@hive.apache.org
> >
> > >
> > > Below mentioned is the table which I ve tried to create.
> > >
> > > $ bin/hive
> > > Hive history
> > >
> > 
> file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt> > hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT
> > > DELIMITED FIELDS
> > > TERMINATED BY ',' STORED AS TEXTFILE;
> > > FAILED: Error in metadata: java.lang.IllegalArgumentException:
> > > URI:  does
> > > not have a scheme
> > > FAILED: Execution Error, return code 1 from
> > > org.apache.hadoop.hive.ql.exec.DDLTask
> > >
> > > -----Original Message-----
> > > From: Adriaan Tijsseling
> > > Sent: Wednesday, October 19, 2011 3:01 PM
> > > To: user@hive.apache.org
> > > Subject: Re: When trying to create table Iam getting exception
> > >
> > > You should provide more information in order to get proper support
> > > such as
> > > the exact command you used to create the table.
> > >
> > > On 2011/10/19, at 11:16, kiranprasad wrote:
> > >
> > > > Hi
> > > >
> > > > Iam new to HIVE, when trying to create a table getting below
> > > exception.> FAILED: Error in metadata:
> > > java.lang.IllegalArgumentException: URI:  does
> > > > not have a scheme
> > > >
> > > > Regards
> > > > Kiran.G
> > >
> > >
> > >
> >
> 

Re: When trying to create table Iam getting exception

Posted by Ankit Jain <an...@gmail.com>.
Hi ,

I can run query over hive through hive shell and using jdbc connection.

But, I got the below error, When i tried to access the hive metadata using
hive api.

java.lang.IllegalArgumentException: URI:  does not have a scheme
    at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:127)
    at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:92)

*Source Code : *
HiveConf conf;
conf=new HiveConf();
conf.addResource("/home/ankit/hive-0.7.1-bin/conf/hive-default.xml");
HiveMetaStoreClient hiveMetastoreClient;
   try {
        hiveMetastoreClient = new HiveMetaStoreClient(conf);
        List<String> list=hiveMetastoreClient.getAllDatabases();
        System.out.println("LIST : "+list);
    } catch (Exception e) {
        e.printStackTrace();

hive-default.xml :

<property>
  <name>hive.metastore.local</name>
  <value>true</value>
  <description>controls whether to connect to remove metastore server or
open a new metastore server in Hive Client JVM</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionURL</name>

<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
  <description>Driver class name for a JDBC metastore</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionUserName</name>
  <value>root</value>
  <description>username to use against metastore database</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionPassword</name>
  <value>password</value>
</property>

Thanks,
Ankit Jain


On Wed, Oct 19, 2011 at 4:43 PM, Chinna Rao Lalam 72745 <
chinnarao@huawei.com> wrote:

> Hi,
>
>  Check where u have configured some value to the "hive.metastore.uris"
> property in hive-default.xml or hive-site.xml
> and whether it is valid or not
>
>
> Hope it helps
> Chinna Rao Lalam
>  ----- Original Message -----
> From: kiranprasad <ki...@imimobile.com>
> Date: Wednesday, October 19, 2011 3:08 pm
> Subject: Re: When trying to create table Iam getting exception
> To: user@hive.apache.org
>
> >
> > Below mentioned is the table which I ve tried to create.
> >
> > $ bin/hive
> > Hive history
> >
> file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
> > hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT
> > DELIMITED FIELDS
> > TERMINATED BY ',' STORED AS TEXTFILE;
> > FAILED: Error in metadata: java.lang.IllegalArgumentException:
> > URI:  does
> > not have a scheme
> > FAILED: Execution Error, return code 1 from
> > org.apache.hadoop.hive.ql.exec.DDLTask
> >
> > -----Original Message-----
> > From: Adriaan Tijsseling
> > Sent: Wednesday, October 19, 2011 3:01 PM
> > To: user@hive.apache.org
> > Subject: Re: When trying to create table Iam getting exception
> >
> > You should provide more information in order to get proper support
> > such as
> > the exact command you used to create the table.
> >
> > On 2011/10/19, at 11:16, kiranprasad wrote:
> >
> > > Hi
> > >
> > > Iam new to HIVE, when trying to create a table getting below
> > exception.> FAILED: Error in metadata:
> > java.lang.IllegalArgumentException: URI:  does
> > > not have a scheme
> > >
> > > Regards
> > > Kiran.G
> >
> >
> >
>

Re: When trying to create table Iam getting exception

Posted by Chinna Rao Lalam 72745 <ch...@huawei.com>.
Hi,

  Check where u have configured some value to the "hive.metastore.uris" property in hive-default.xml or hive-site.xml
and whether it is valid or not 


Hope it helps
Chinna Rao Lalam
 ----- Original Message -----
From: kiranprasad <ki...@imimobile.com>
Date: Wednesday, October 19, 2011 3:08 pm
Subject: Re: When trying to create table Iam getting exception
To: user@hive.apache.org

> 
> Below mentioned is the table which I ve tried to create.
> 
> $ bin/hive
> Hive history 
> file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
> hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT 
> DELIMITED FIELDS 
> TERMINATED BY ',' STORED AS TEXTFILE;
> FAILED: Error in metadata: java.lang.IllegalArgumentException: 
> URI:  does 
> not have a scheme
> FAILED: Execution Error, return code 1 from 
> org.apache.hadoop.hive.ql.exec.DDLTask
> 
> -----Original Message----- 
> From: Adriaan Tijsseling
> Sent: Wednesday, October 19, 2011 3:01 PM
> To: user@hive.apache.org
> Subject: Re: When trying to create table Iam getting exception
> 
> You should provide more information in order to get proper support 
> such as 
> the exact command you used to create the table.
> 
> On 2011/10/19, at 11:16, kiranprasad wrote:
> 
> > Hi
> >
> > Iam new to HIVE, when trying to create a table getting below 
> exception.> FAILED: Error in metadata: 
> java.lang.IllegalArgumentException: URI:  does 
> > not have a scheme
> >
> > Regards
> > Kiran.G
> 
> 
> 

Re: When trying to create table Iam getting exception

Posted by kiranprasad <ki...@imimobile.com>.
Below mentioned is the table which I ve tried to create.

$ bin/hive
Hive history 
file=/tmp/kiranprasad.g/hive_job_log_kiranprasad.g_201110191249_2139146680.txt
hive> CREATE TABLE arpu (msisdn INT, arpu INT) ROW FORMAT DELIMITED FIELDS 
TERMINATED BY ',' STORED AS TEXTFILE;
FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
not have a scheme
FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask

-----Original Message----- 
From: Adriaan Tijsseling
Sent: Wednesday, October 19, 2011 3:01 PM
To: user@hive.apache.org
Subject: Re: When trying to create table Iam getting exception

You should provide more information in order to get proper support such as 
the exact command you used to create the table.

On 2011/10/19, at 11:16, kiranprasad wrote:

> Hi
>
> Iam new to HIVE, when trying to create a table getting below exception.
> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does 
> not have a scheme
>
> Regards
> Kiran.G



Re: When trying to create table Iam getting exception

Posted by Adriaan Tijsseling <ad...@tijsseling.com>.
You should provide more information in order to get proper support such as the exact command you used to create the table. 

On 2011/10/19, at 11:16, kiranprasad wrote:

> Hi 
> 
> Iam new to HIVE, when trying to create a table getting below exception.
> FAILED: Error in metadata: java.lang.IllegalArgumentException: URI:  does not have a scheme
> 
> Regards
> Kiran.G