Re: Special characters in web log file causing issues

2013-07-08 Thread Nitin Pawar
yes Raj,

thats a unix command


On Tue, Jul 9, 2013 at 6:48 AM, Hadoop Raj  wrote:

> Hi Sanjay,
>
> Is that a unix trap command or any other thing? Please let me know.
>
>
> Sent from my iPhone
>
> On Jul 8, 2013, at 7:46 PM, Sanjay Subramanian <
> sanjay.subraman...@wizecommerce.com> wrote:
>
> U may have to remove non-printable chars first, save an intermediate file
> and then load into Hive
>
>  tr -cd '[:print:]\r\n\t'
>
>  Or if u have *strings* function that will only output printable chars
>
>
>   From: Raj Hadoop 
> Reply-To: "user@hive.apache.org" , Raj Hadoop <
> hadoop...@yahoo.com>
> Date: Monday, July 8, 2013 1:52 PM
> To: Hive 
> Subject: Special characters in web log file causing issues
>
>
>   Hi ,
>
> The log file that I am trying to load throuh Hive has some special
> characters
>
> The field is shown below and the special characters *¿¿***are also shown.
>
>  Shockwave Flash;Chrome Remote Desktop Viewer;Native Client;Chrome
> PDF Viewer;Adobe Acrobat;Microsoft Office 2010;Motive Plug-
>  in;Motive Management Plug-in;Google Update;Java(TM) Platform SE 7 U21
> ;McAfee SiteAdvisor;McAfee Virtual Technician;Windows Live*¿¿ *Photo
> Gallery;McAfee SecurityCenter;Silverlig
>
>
> The above is causing the record to be terminated and loading another
> line.  How can I avoid this type of issues and how to load the proper data
> ? Any suggestions please.
>
>  Thanks,
> Raj
>
> CONFIDENTIALITY NOTICE
> ==
> This email message and any attachments are for the exclusive use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact the
> sender by reply email and destroy all copies of the original message along
> with any attachments, from your computer system. If you are the intended
> recipient, please be advised that the content of this message is subject to
> access, review and disclosure by the sender's Email System Administrator.
>
>


-- 
Nitin Pawar


Re: Hive CLI

2013-07-08 Thread bejoy_ks
Hi Rahul,

The same shortcuts ctrl+A and ctrl+E works in hive shell for me( hive 0.9)


Regards 
Bejoy KS

Sent from remote device, Please excuse typos

-Original Message-
From: rahul kavale 
Date: Tue, 9 Jul 2013 11:00:49 
To: 
Reply-To: user@hive.apache.org
Subject: Hive CLI

Hey there,
I have been using HIVE(0.7) for a while now using CLI and bash scripts.
But its a pain to move cursor in the CLI i.e. once you enter a very long
query then you cant go to start of the query (like you do using
Ctrl+A/Ctrl+E in terminal). Does anyone know how to do it?

Thanks & Regards,
Rahul



Re: Hive CLI

2013-07-08 Thread rahul kavale
Sorry My bad, it was my bad as Ctrl-a was screen binding which is why I was
not able to use it for moving cursor. This had nothing to do with Hive or
its configuration. My bad

Thanks & Regards,
Rahul


On 9 July 2013 11:00, rahul kavale  wrote:

> Hey there,
> I have been using HIVE(0.7) for a while now using CLI and bash scripts.
> But its a pain to move cursor in the CLI i.e. once you enter a very long
> query then you cant go to start of the query (like you do using
> Ctrl+A/Ctrl+E in terminal). Does anyone know how to do it?
>
> Thanks & Regards,
> Rahul
>


Hive CLI

2013-07-08 Thread rahul kavale
Hey there,
I have been using HIVE(0.7) for a while now using CLI and bash scripts.
But its a pain to move cursor in the CLI i.e. once you enter a very long
query then you cant go to start of the query (like you do using
Ctrl+A/Ctrl+E in terminal). Does anyone know how to do it?

Thanks & Regards,
Rahul


start HWI error

2013-07-08 Thread ch huang
i am testing hive web interface, anyone can help? thanks
content in hive-site.xml


  hive.hwi.war.file
  /usr/lib/hive/lib/hive-hwi-0.7.1-cdh3u4.war
  This is the WAR file with the jsp content for Hive Web
Interface


# export ANT_LIB=/usr/share/ant/lib

# hive --service hwi
13/07/09 13:19:40 INFO hwi.HWIServer: HWI is starting up
13/07/09 13:19:41 FATAL hwi.HWIServer: HWI WAR file not found at
/usr/lib/hive/lib/hive-hwi-0.7.1-cdh3u4.war

# ls /usr/lib/hive/lib/hive-hwi-0.7.1-cdh3u4.war
/usr/lib/hive/lib/hive-hwi-0.7.1-cdh3u4.war


Re: Special characters in web log file causing issues

2013-07-08 Thread Hadoop Raj
Hi Sanjay,

Is that a unix trap command or any other thing? Please let me know.


Sent from my iPhone

On Jul 8, 2013, at 7:46 PM, Sanjay Subramanian 
 wrote:

> U may have to remove non-printable chars first, save an intermediate file and 
> then load into Hive
> 
> tr -cd '[:print:]\r\n\t'
> 
> Or if u have strings function that will only output printable chars
> 
> 
> From: Raj Hadoop 
> Reply-To: "user@hive.apache.org" , Raj Hadoop 
> 
> Date: Monday, July 8, 2013 1:52 PM
> To: Hive 
> Subject: Special characters in web log file causing issues
> 
>  
> Hi ,
>  
> The log file that I am trying to load throuh Hive has some special characters 
>  
> The field is shown below and the special characters ¿¿are also shown.
>  
> Shockwave Flash;Chrome Remote Desktop Viewer;Native Client;Chrome PDF 
> Viewer;Adobe Acrobat;Microsoft Office 2010;Motive Plug-
> in;Motive Management Plug-in;Google Update;Java(TM) Platform SE 7 
> U21;McAfee SiteAdvisor;McAfee Virtual Technician;Windows Live¿¿ Photo 
> Gallery;McAfee SecurityCenter;Silverlig
>  
>  
> The above is causing the record to be terminated and loading another line.  
> How can I avoid this type of issues and how to load the proper data ? Any 
> suggestions please.
>  
> Thanks,
> Raj
> 
> CONFIDENTIALITY NOTICE
> ==
> This email message and any attachments are for the exclusive use of the 
> intended recipient(s) and may contain confidential and privileged 
> information. Any unauthorized review, use, disclosure or distribution is 
> prohibited. If you are not the intended recipient, please contact the sender 
> by reply email and destroy all copies of the original message along with any 
> attachments, from your computer system. If you are the intended recipient, 
> please be advised that the content of this message is subject to access, 
> review and disclosure by the sender's Email System Administrator.


Re: Special characters in web log file causing issues

2013-07-08 Thread Sanjay Subramanian
U may have to remove non-printable chars first, save an intermediate file and 
then load into Hive

tr -cd '[:print:]\r\n\t'

Or if u have strings function that will only output printable chars


From: Raj Hadoop mailto:hadoop...@yahoo.com>>
Reply-To: "user@hive.apache.org" 
mailto:user@hive.apache.org>>, Raj Hadoop 
mailto:hadoop...@yahoo.com>>
Date: Monday, July 8, 2013 1:52 PM
To: Hive mailto:user@hive.apache.org>>
Subject: Special characters in web log file causing issues


Hi ,

The log file that I am trying to load throuh Hive has some special characters

The field is shown below and the special characters ¿¿are also shown.

Shockwave Flash;Chrome Remote Desktop Viewer;Native Client;Chrome PDF 
Viewer;Adobe Acrobat;Microsoft Office 2010;Motive Plug-
in;Motive Management Plug-in;Google Update;Java(TM) Platform SE 7 
U21;McAfee SiteAdvisor;McAfee Virtual Technician;Windows Live¿¿ Photo 
Gallery;McAfee SecurityCenter;Silverlig


The above is causing the record to be terminated and loading another line.  How 
can I avoid this type of issues and how to load the proper data ? Any 
suggestions please.

Thanks,
Raj

CONFIDENTIALITY NOTICE
==
This email message and any attachments are for the exclusive use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please contact the sender by reply email and 
destroy all copies of the original message along with any attachments, from 
your computer system. If you are the intended recipient, please be advised that 
the content of this message is subject to access, review and disclosure by the 
sender's Email System Administrator.


Special characters in web log file causing issues

2013-07-08 Thread Raj Hadoop


Hi ,
 
The log file that I am trying to load throuh Hive has some special characters 
 
The field is shown below and the special characters ¿¿are also shown.
 Shockwave Flash
in;Motive ManagementPlug-in;Google Update;Java(TM)Platform SE 7U21;McAfee 
SiteAdvisor;McAfee Virtual Technician;Windows Live¿¿ Photo Gallery;McAfee 
SecurityCenter;Silverlig
 
 
The above is causing the record to be terminated and loading another line.  How 
can I avoid this type of issues and how to load the proper data ? Any 
suggestions please.
Thanks,
Raj;Chrome Remote Desktop Viewer;NativeClient;Chrome PDF Viewer;Adobe 
Acrobat;Microsoft Office 2010;Motive Plug- 

Re: Need help in Hive

2013-07-08 Thread bejoy_ks
Hi Maheedhar

As I understand, you are having a column with data of type MM:SS in your input 
data set.

AFAIK this format is not in the standard java.sql.Timestamp format also it 
doesn't even have any date part . Hence you may not be able to use Timestamp 
data type here.

You can define it as a string and then develop your custom UDFs for any further 
processing.
Regards 
Bejoy KS

Sent from remote device, Please excuse typos

-Original Message-
From: Matouk IFTISSEN 
Date: Mon, 8 Jul 2013 09:47:11 
To: 
Reply-To: user@hive.apache.org
Subject: Re: Need help in Hive

Hello,
Try this function in hive query:
1- transform your data (type integer ) in timestamp (linux),
then do this:
2- from_unixtimeyour_date_timestamp), 'mm:ss') AS time

Hope this,  you will give help.



2013/7/8 Maheedhar Reddy 

> Hi All,
>
> I have Hive 0.8.0 version installed in my single node Apache Hadoop
> cluster.
>
> I have a time column which is in format *MM:SS* (Minutes:seconds). I
> tried the date functions to get the value in MM:SS format. But its not
> working out.
>
> Below is my column for your reference.
>
> *Active Time*
> *12:01*
> 0:20
> 2:18
>
> in the first record 12:01, 12 is the number of minutes and 01 is the
> seconds.
>
> so when the time i'm creating a table in Hive, i have to give a data type
> for this column Active Time,
> I have tried with various date type columns but none of them worked out
> for me. Please guide me.
>
> What function should I use, to get the time in *MM:SS* format?
>
>
> "You only live once, but if you do it right, once is enough."
>
>
> Cheers!!
>
> Maheedhar Reddy K V
>
>
> http://about.me/maheedhar.kv/#
>
>



Re: integration issure about hive and hbase

2013-07-08 Thread bejoy_ks
Hi

Can you try including the zookeeper quorum and port in your hive configuration 
as shown below

hive --auxpath .../hbase-handler.jar, .../hbase.jar, ...zookeeper.jar, 
.../guava.jar -hiveconf hbase.zookeeper.quorum= -hiveconf hbase.zookeeper.property.clientPort=

Substitute the above command with actual values.

Also ensure that the zk, hbase jars specified above are those used in your 
hbase cluster. To avoid any version mismatches. 
Regards 
Bejoy KS

Sent from remote device, Please excuse typos

-Original Message-
From: ch huang 
Date: Mon, 8 Jul 2013 16:40:59 
To: 
Reply-To: user@hive.apache.org
Subject: Re: integration issure about hive and hbase

i replace the zookeeper jar ,the error is different

hive> CREATE TABLE hbase_table_1(key int, value string)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
> TBLPROPERTIES ("hbase.table.name" = "xyz");
FAILED: Error in metadata:
MetaException(message:org.apache.hadoop.hbase.ZooKeeperConnectionException:
HBase is able to connect to ZooKeeper but the connection closes
immediately. This could be a sign that the server has too many connections
(30 is the default). Consider inspecting your ZK server logs for that error
and then make sure you are reusing HBaseConfiguration as often as you can.
See HTable's javadoc for more information.
at
org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.(ZooKeeperWatcher.java:160)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1265)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:526)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.(HConnectionManager.java:516)
at
org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:173)
at
org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:93)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.getHBaseAdmin(HBaseStorageHandler.java:74)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:158)
at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:344)
at
org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:470)
at
org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3176)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:213)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:131)
at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1063)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:900)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:748)
at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:209)
at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:286)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:516)
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:197)
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:843)
at
org.apache.hadoop.hbase.zookeeper.ZKUtil.createAndFailSilent(ZKUtil.java:930)
at
org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.(ZooKeeperWatcher.java:138)
... 24 more
)
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask


On Mon, Jul 8, 2013 at 2:52 PM, Cheng Su  wrote:

>  Did you hbase cluster start up?
>
> The error message is more like that something wrong with the classpath.
> So maybe you'd better also check that.
>
>
> On Mon, Jul 8, 2013 at 1:54 PM, ch huang  wrote:
>
>> i get error when try create table on hbase use hive, anyone can help?
>>
>> hive> CREATE TABLE hive_hbasetable_demo(key int,value string)
>> > STORED BY 'ora.apache.hadoop.hive.hbase.HBaseStorageHandler'
>> > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
>> > TBLPROPERTIES ("hbase.table.name" = "hivehbasedemo");
>> Failed with exception org.apache.hadoop.hive.ql.metadata.HiveException:
>> Error in loading st

Re: Strange error in hive

2013-07-08 Thread bejoy_ks
Hii Jerome


Can you send the error log of the MapReduce task that failed? That should have 
some pointers which can help you troubleshoot the issue.

Regards 
Bejoy KS

Sent from remote device, Please excuse typos

-Original Message-
From: Jérôme Verdier 
Date: Mon, 8 Jul 2013 11:25:34 
To: 
Reply-To: user@hive.apache.org
Subject: Strange error in hive

Hi everybody,

I faced a strange error in hive this morning.

The error message is this one :

FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.MapRedTask

after a quick search on Google, it appears that this is a Hive bug :

https://issues.apache.org/jira/browse/HIVE-4650

Is there a way to pass through this error ?

Thanks.

NB : my hive script is in the attachment.


-- 
*Jérôme VERDIER*
06.72.19.17.31
verdier.jerom...@gmail.com



Strange error in hive

2013-07-08 Thread Jérôme Verdier
Hi everybody,

I faced a strange error in hive this morning.

The error message is this one :

FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.MapRedTask

after a quick search on Google, it appears that this is a Hive bug :

https://issues.apache.org/jira/browse/HIVE-4650

Is there a way to pass through this error ?

Thanks.

NB : my hive script is in the attachment.


-- 
*Jérôme VERDIER*
06.72.19.17.31
verdier.jerom...@gmail.com
INSERT INTO TABLE default.THM_RENTA_RGRP_PRODUITS_JOUR

  SELECT * FROM (

-- Cumul OS
SELECT

  '${hiveconf:in_co_societe}'  as co_societe, -- A modifier
  renta_prod.dt_jour,
  renta_prod.type_entite,
  renta_prod.code_entite,
  renta_prod.type_rgrp_produitsas type_rgrp_produits,
  renta_prod.co_rgrp_produits  as co_rgrp_produits,
  renta_prod.co_type_ref,
  -2   as co_os,
  renta_prod.co_trad_lsas co_trad_ls,
  min(flg_demarque_valide) as flg_demarque_valide,
  sum(me_vente_ht) as me_vente_ht,
  sum(me_marge_avt_dem)as me_marge_avt_dem,
  sum(me_cession)  as me_cession,
  sum(qt_vente)as qt_vente,
  sum(me_stickers) as me_stickers,
  sum(MT_CA_BRUT_TTC)  as MT_CA_BRUT_TTC,
  SUM(MT_AVANTAGE_AFFECTE) as MT_AVANTAGE_AFFECTE,
  SUM(MT_AVANTAGE_NON_AFFECTE) as MT_AVANTAGE_NON_AFFECTE,
  SUM(MT_COUPON)   as MT_COUPON,
  NULL  
 as FLG_DEM_INC_PRX_CS_VAL,
  SUM(MT_CHEQUE_FIDELITE_TTC)  as MT_CHEQUE_FIDELITE_TTC,
  SUM(MT_CA_NET_TTC)   as MT_CA_NET_TTC,
  SUM(MT_CHEQUE_FIDELITE_HT)   as MT_CHEQUE_FIDELITE_HT,
  SUM(NB_PT_AFFECTE)   as NB_PT_AFFECTE,
  SUM(NB_PT_VALORISE_HT)   as NB_PT_VALORISE_HT,
  SUM(MT_PT_NON_AFFECTE_HT)as MT_PT_NON_AFFECTE_HT,
  SUM(MT_POINTS_FINANCES_HT)   as MT_POINTS_FINANCES_HT,
  SUM(MT_REMISE_IMMEDIATE_MP_FIN_HT)   as MT_REMISE_IMMEDIATE_MP_FIN_HT,
  SUM(MT_TARIF_BRUT_TTC)   as MT_TARIF_BRUT_TTC,
  sum(me_dem_prx_cs)   as me_dem_prx_cs,
  sum(me_dem_con_prx_cs)   as me_dem_con_prx_cs,
  sum(me_dem_inc_prx_cs)   as me_dem_inc_prx_cs,
  sum(me_dem_prov_stk_cs)  as me_dem_prov_stk_cs,
  sum(qt_dem)  as qt_dem,
  sum(qt_dem_con)  as qt_dem_con,
  sum(qt_dem_inc)  as qt_dem_inc,
  sum(qt_dem_prov_stk) as qt_dem_prov_stk
from
  default.THM_RENTA_RGRP_PRODUITS_JOUR renta_prod
WHERE
renta_prod.co_societe = '${hiveconf:in_co_societe}' --A modifier
and renta_prod.dt_jour = '${hiveconf:in_dt_jour}' -- A modifier
and renta_prod.co_os >= 0
GROUP BY
  renta_prod.dt_jour,
  renta_prod.type_entite,
  renta_prod.code_entite,
  renta_prod.type_rgrp_produits,
  renta_prod.co_rgrp_produits,
  renta_prod.co_type_ref,
  renta_prod.co_trad_ls

UNION ALL

-- Cumul Total
SELECT
  '${hiveconf:in_co_societe}'  as co_societe, -- A modifier
  renta_prod.dt_jour,
  renta_prod.type_entite,
  renta_prod.code_entite,
  renta_prod.type_rgrp_produitsas type_rgrp_produits,
  renta_prod.co_rgrp_produits  as co_rgrp_produits,
  renta_prod.co_type_ref,
  -3   as co_os,
  renta_prod.co_trad_lsas co_trad_ls,
  min(flg_demarque_valide) as flg_demarque_valide,
  sum(me_vente_ht) as me_vente_ht,
  sum(me_marge_avt_dem)as me_marge_avt_dem,
  sum(me_cession)  as me_cession,
  sum(qt_vente)as qt_vente,
  sum(me_stickers) as me_stickers,
  sum(MT_CA_BRUT_TTC)  as MT_CA_BRUT_TTC,
  SUM(MT_AVANTAGE_AFFECTE) as MT_AVANTAGE_AFFECTE,
  SUM(MT_AVANTAGE_NON_AFFECTE) as MT_AVANTAGE_NON_AFFECTE,
  SUM(MT_COUPON)   as MT_COUPON,
  NULL as FLG_DEM_INC_PRX_CS_VAL,
  SUM(MT_CHEQUE_FIDELITE_TTC)  as MT_CHEQUE_FIDELITE_TTC,
  SUM(MT_CA_NET_TTC)   as MT_CA_NET_TTC,
  SUM(MT_CHEQUE_FIDELITE_HT)   as MT_CHEQUE_FIDELITE_HT,
  SUM(NB

Re: integration issure about hive and hbase

2013-07-08 Thread ch huang
i replace the zookeeper jar ,the error is different

hive> CREATE TABLE hbase_table_1(key int, value string)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
> TBLPROPERTIES ("hbase.table.name" = "xyz");
FAILED: Error in metadata:
MetaException(message:org.apache.hadoop.hbase.ZooKeeperConnectionException:
HBase is able to connect to ZooKeeper but the connection closes
immediately. This could be a sign that the server has too many connections
(30 is the default). Consider inspecting your ZK server logs for that error
and then make sure you are reusing HBaseConfiguration as often as you can.
See HTable's javadoc for more information.
at
org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.(ZooKeeperWatcher.java:160)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1265)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:526)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.(HConnectionManager.java:516)
at
org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:173)
at
org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:93)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.getHBaseAdmin(HBaseStorageHandler.java:74)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:158)
at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:344)
at
org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:470)
at
org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3176)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:213)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:131)
at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1063)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:900)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:748)
at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:209)
at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:286)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:516)
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:197)
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:843)
at
org.apache.hadoop.hbase.zookeeper.ZKUtil.createAndFailSilent(ZKUtil.java:930)
at
org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.(ZooKeeperWatcher.java:138)
... 24 more
)
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask


On Mon, Jul 8, 2013 at 2:52 PM, Cheng Su  wrote:

>  Did you hbase cluster start up?
>
> The error message is more like that something wrong with the classpath.
> So maybe you'd better also check that.
>
>
> On Mon, Jul 8, 2013 at 1:54 PM, ch huang  wrote:
>
>> i get error when try create table on hbase use hive, anyone can help?
>>
>> hive> CREATE TABLE hive_hbasetable_demo(key int,value string)
>> > STORED BY 'ora.apache.hadoop.hive.hbase.HBaseStorageHandler'
>> > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
>> > TBLPROPERTIES ("hbase.table.name" = "hivehbasedemo");
>> Failed with exception org.apache.hadoop.hive.ql.metadata.HiveException:
>> Error in loading storage
>> handler.ora.apache.hadoop.hive.hbase.HBaseStorageHandler
>> FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.DDLTask
>>
>
>
>
> --
>
> Regards,
> Cheng Su
>


Re: integration issure about hive and hbase

2013-07-08 Thread ch huang
and i have zookeeper on port  2281 ,not default port

On Mon, Jul 8, 2013 at 2:52 PM, Cheng Su  wrote:

>  Did you hbase cluster start up?
>
> The error message is more like that something wrong with the classpath.
> So maybe you'd better also check that.
>
>
> On Mon, Jul 8, 2013 at 1:54 PM, ch huang  wrote:
>
>> i get error when try create table on hbase use hive, anyone can help?
>>
>> hive> CREATE TABLE hive_hbasetable_demo(key int,value string)
>> > STORED BY 'ora.apache.hadoop.hive.hbase.HBaseStorageHandler'
>> > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
>> > TBLPROPERTIES ("hbase.table.name" = "hivehbasedemo");
>> Failed with exception org.apache.hadoop.hive.ql.metadata.HiveException:
>> Error in loading storage
>> handler.ora.apache.hadoop.hive.hbase.HBaseStorageHandler
>> FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.DDLTask
>>
>
>
>
> --
>
> Regards,
> Cheng Su
>


Re: integration issure about hive and hbase

2013-07-08 Thread ch huang
hbase cluster is running
and i also define the jar path in hive-site.xml


  hive.aux.jars.path

file:///usr/lib/hive/lib/hive-hbase-handler-0.7.1-cdh3u4.jar,file:///usr/lib/hive/lib/hbase-0.90.6-cdh3u4.jar,file:///usr/lib/hive/lib/zookeeper-3.3.1.jar


On Mon, Jul 8, 2013 at 2:52 PM, Cheng Su  wrote:

>  Did you hbase cluster start up?
>
> The error message is more like that something wrong with the classpath.
> So maybe you'd better also check that.
>
>
> On Mon, Jul 8, 2013 at 1:54 PM, ch huang  wrote:
>
>> i get error when try create table on hbase use hive, anyone can help?
>>
>> hive> CREATE TABLE hive_hbasetable_demo(key int,value string)
>> > STORED BY 'ora.apache.hadoop.hive.hbase.HBaseStorageHandler'
>> > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
>> > TBLPROPERTIES ("hbase.table.name" = "hivehbasedemo");
>> Failed with exception org.apache.hadoop.hive.ql.metadata.HiveException:
>> Error in loading storage
>> handler.ora.apache.hadoop.hive.hbase.HBaseStorageHandler
>> FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.DDLTask
>>
>
>
>
> --
>
> Regards,
> Cheng Su
>


Re: Need help in Hive

2013-07-08 Thread Matouk IFTISSEN
Hello,
Try this function in hive query:
1- transform your data (type integer ) in timestamp (linux),
then do this:
2- from_unixtimeyour_date_timestamp), 'mm:ss') AS time

Hope this,  you will give help.



2013/7/8 Maheedhar Reddy 

> Hi All,
>
> I have Hive 0.8.0 version installed in my single node Apache Hadoop
> cluster.
>
> I have a time column which is in format *MM:SS* (Minutes:seconds). I
> tried the date functions to get the value in MM:SS format. But its not
> working out.
>
> Below is my column for your reference.
>
> *Active Time*
> *12:01*
> 0:20
> 2:18
>
> in the first record 12:01, 12 is the number of minutes and 01 is the
> seconds.
>
> so when the time i'm creating a table in Hive, i have to give a data type
> for this column Active Time,
> I have tried with various date type columns but none of them worked out
> for me. Please guide me.
>
> What function should I use, to get the time in *MM:SS* format?
>
>
> "You only live once, but if you do it right, once is enough."
>
>
> Cheers!!
>
> Maheedhar Reddy K V
>
>
> http://about.me/maheedhar.kv/#
>
>