Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C69B71733F for ; Mon, 2 Mar 2015 23:42:59 +0000 (UTC) Received: (qmail 92249 invoked by uid 500); 2 Mar 2015 23:42:56 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 92186 invoked by uid 500); 2 Mar 2015 23:42:56 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 92176 invoked by uid 99); 2 Mar 2015 23:42:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 23:42:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nidmgg@gmail.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 23:42:51 +0000 Received: by iecrl12 with SMTP id rl12so52558029iec.2 for ; Mon, 02 Mar 2015 15:42:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=VMwY75G5bPi2ZJJg9cOJWU/JLW+YoAyJHK3CeS2soHg=; b=o1LTwgkAxuG9D9Nx3u5IFrB6F/KOFjEwzcx4tcTHBmDrqMg2wbY+SIDo0rTVJMkPah 4NdAahARL+9+BjO0+rwaunvwWcmRph+MZLyyxvX3UG8g+IEMDoBg0g49WQ3rPx/9DG33 V6KmlOuRoEFP8KVZ29JwOVSqwdt7Kdmrh7zUzikv2dREffanuzanONxpQyEltUCBiebO MHRXjJ9OZTaI4CbOfBIcxioPPFDGmxyKU1De7g9R/fIDSR3AtsAhbV55ZJNo21qFXVjD 0tC4ZtZ3sX5wuYnoRGetWnSfKrBttvsI8vTosOGkshVTbxEEqyDDB8WR0nuGCaALp0ua 6vxA== MIME-Version: 1.0 X-Received: by 10.42.36.6 with SMTP id s6mr23957926icd.33.1425339751444; Mon, 02 Mar 2015 15:42:31 -0800 (PST) Received: by 10.64.162.225 with HTTP; Mon, 2 Mar 2015 15:42:31 -0800 (PST) Date: Mon, 2 Mar 2015 15:42:31 -0800 Message-ID: Subject: load TPCH HBase tables through Hive From: Demai Ni To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a11c3a80291b9f3051056c5b3 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3a80291b9f3051056c5b3 Content-Type: text/plain; charset=UTF-8 hi, folks, I am using the HBaseintergration feature from hive ( https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration) to load TPCH tables into HBase. Hive 0.13 and HBase 0.98.6. The load works well. However, as documented here: https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-KeyUniqueness. The key uniqueness prevents me from loading all 'lineitem' rows. As 'lineitem' table is using "L_ORDERKEY, L_LINENUMBER" as compound primary key. If I only mapped to 'L_ORDERKEY" as hbase key(aka, row #). Many rows will get overwritten. Any suggestion? someone on this list must go through this already. :-). Thanks BTW, here is my hive ddl. create table hbase_lineitem( *l_orderkey bigint*, l_partkey bigint, l_suppkey int, l_linenumber bigint, l_quantity double, l_extendedprice double, l_discount double, l_tax double, l_returnflag string, l_linestatus string, l_shipdate string, l_commitdate string, l_receiptdate string, l_shipinstruct string, l_shipmode string, l_comment string ) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping"* = ":key*,l_partkey:val,l_suppkey:val, l_linenumber:val, l_quantity:val, l_extendedprice:val, l_discount:val, l_tax:val, l_returnflag:val, l_linestatus:val, l_shipdate:val, l_commitdate:val, l_receiptdate:val, l_shipinstruct:val, l_shipmode:val, l_comment:val ") TBLPROPERTIES ("hbase.table.name" = "lineitem"); insert overwrite table hbase_lineitem select * from lineitem; Demai --001a11c3a80291b9f3051056c5b3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hi, folks,

I am= using the HBaseintergration feature from hive (https://cwiki.apache.org= /confluence/display/Hive/HBaseIntegration) to load TPCH tables into HBa= se. Hive 0.13 and HBase 0.98.6.

The load works well. Ho= wever, as documented here: https://cwiki.= apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-KeyUni= queness.

The key uniqueness prevents me from loading all = 'lineitem' rows. As 'lineitem' table is using "L_ORDER= KEY, L_LINENUMBER" as compound primary key. If I only mapped to 'L= _ORDERKEY" as hbase key(aka, row #). Many rows will get overwritten. <= br>
Any suggestion? someone on this list must go through this alre= ady. :-). Thanks

BTW, here is my hive ddl.
=

create table hbase_lineitem( l_orderkey bigint, l_partkey bigint, = l_suppkey int, l_linenumber=C2=A0 bigint, l_quantity=C2=A0 double, l_extend= edprice=C2=A0 double, l_discount=C2=A0 double, l_tax=C2=A0 double, l_return= flag=C2=A0 string, l_linestatus=C2=A0 string, l_shipdate=C2=A0 string, l_co= mmitdate=C2=A0 string, l_receiptdate=C2=A0 string, l_shipinstruct=C2=A0 str= ing, l_shipmode=C2=A0 string, l_comment=C2=A0 string ) STORED BY 'org.a= pache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES (&quo= t;hbase.columns.mapping" =3D ":key,l_partkey:val,l_suppkey= :val, l_linenumber:val, l_quantity:val, l_extendedprice:val, l_discount:val= , l_tax:val, l_returnflag:val, l_linestatus:val, l_shipdate:val, l_commitda= te:val, l_receiptdate:val, l_shipinstruct:val, l_shipmode:val, l_comment:va= l ") TBLPROPERTIES ("hbase.ta= ble.name" =3D "lineitem");

=C2=A0
insert overw= rite table hbase_lineitem select * from lineitem;


= Demai
--001a11c3a80291b9f3051056c5b3--