Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Sort Order in HBase with Pig/Piglatin in Java


Copy link to this message
-
Sort Order in HBase with Pig/Piglatin in Java
I have created a HBase Table in the hbase shell and added some data. In
http://hbase.apache.org/book/dm.sort.html is written that the datasets are
first sorted by the rowkey and then the column. So I tried something in the
HBase Shell: http://pastebin.com/gLVAX0rJ

Everything looks fine. I got the right order a -> c -> d like expected.

Now I tried the same with Apache Pig in Java: http://pastebin.com/jdTpj4Fu

I got this result:

(key1,[c#val,d#val,a#val])

So, now the order is c -> d -> a. That seems a little odd to me, shouldn't
it be the same like in HBase? It's important for me to get the right order
because I transform the map afterwards into a bag and then join it with
other tables. If both inputs are sorted I could use a merge join without
sorting these two datasets. So does anyone know how it is possible to get
the sorted map (or bag) of the columns?
thanks
+
Pradeep Gollakota 2013-09-13, 16:25
+
John 2013-09-13, 16:29
+
Shahab Yunus 2013-09-13, 16:45
+
John 2013-09-13, 16:50
+
Shahab Yunus 2013-09-13, 16:55
+
Pradeep Gollakota 2013-09-13, 16:44
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB