Strategy on joining on partial keys

2015-06-29 Thread Yiannis Gkoufas
Hi there, I have two tables I want to join. TABLE_A: ( (A,B), C, D, E) where (A,B) is the composite key TABLE_B: ( (A), C, D, E) where A is the key I basically want to join TABLE_A and TABLE_B on A and update TABLE_A with the values C, D, E coming from TABLE_B When I try to use UPSERT SELECT

RE: How to count table rows from Java?

2015-06-29 Thread Riesland, Zack
Thanks, James! Can you point me to some instructions or some syntax for setting those timeout values in Java code? I’ve seen lots of information about setting them on the classpath when launching different query clients. But how do I set a high timeout so that I can do a large query via

Re: How to count table rows from Java?

2015-06-29 Thread James Taylor
Server side HBase properties such as hbase.rpc.timeout need to be set in your hbase-sites.xml. There's no API to set these. The phoenix.query.timeoutMs can be set using http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setQueryTimeout(int) prior to executing the query. The units in

RE: How to count table rows from Java?

2015-06-29 Thread Riesland, Zack
Perfect. Thank you so much! -Original Message- From: James Taylor [mailto:jamestay...@apache.org] Sent: Monday, June 29, 2015 11:51 AM To: user Subject: Re: How to count table rows from Java? Server side HBase properties such as hbase.rpc.timeout need to be set in your

RE: How to count table rows from Java?

2015-06-29 Thread Riesland, Zack
I REALLY hate to be a bother, but I just can't seem to get this timeout stuff to work for me. It looks like setQueryTimeout() is not supported (I get a java.sql.SQLFeatureNotSupportedException). I'm guessing maybe we need a newer version of Phoenix ? And I also tried the property approach:

Re: Writing to Underlying HBase Tables

2015-06-29 Thread Nick Dimiduk
+user Hi Jeff, Phoenix and non-Phoenix tables can co-exist in the same cluster, no problem. Sharing the same table with both Phoenix and non-Phoenix clients can be a bit tricky. Likely you'll become intimately familiar Phoenix's encoding formats and compound-types. This interoperability is a

Re: Join create OOM with java heap space on phoenix client

2015-06-29 Thread Krunal Varajiya
Hi Maryann, Here is the error message with “USE_SORT_MERGE_JOIN” hint: java.lang.RuntimeException: java.io.IOException: Map failed at org.apache.phoenix.iterate.MappedByteBufferQueue$MappedByteBufferSegmentQueue$SegmentQueueFileIterator.readNext(MappedByteBufferQueue.java:399) at

RE: Avoid deleting Hbase table when droping table with Phoenix

2015-06-29 Thread Jose M
Hi Thomas (and James), thank you both. Regarding hbase-site.xml, i think it's being picked up, cause first when I tried to create the table I have a timeout error and after adding in that file the property phoenix.query.timeoutMs with a higher timeout, i manage to create the table. Do I have

Re: Avoid deleting Hbase table when droping table with Phoenix

2015-06-29 Thread Thomas D'Silva
Jose, hbase-site.xml needs to be on the classpath in order for the config to get picked up. Regarding the empty key value see : https://groups.google.com/forum/#!msg/phoenix-hbase-user/UWdBghSfePo/BmCxOUOPHn8J -Thomas On Mon, Jun 29, 2015 at 4:38 PM, Jose M soloning...@hotmail.com wrote: Hi,

new blog on Phoenix/Spark integration

2015-06-29 Thread James Taylor
I've posted a new blog, courtesy of Josh Mahonin, that explains how to use the new Phoenix/Spark integration by walking through a nice simple example: https://blogs.apache.org/phoenix/entry/spark_integration_in_apache_phoenix Thanks so much, Josh! James

Avoid deleting Hbase table when droping table with Phoenix

2015-06-29 Thread Jose M
Hi, I'm new to Phoenix and trying it right now. I had installed it as Parcel in Cloudera 5.4. I'm planning to use it with an already existant Hbase table (other systems use it and I can't recreate it). I see that I can create it without problem with the CREATE TABLE command. But in case I

Re: Avoid deleting Hbase table when droping table with Phoenix

2015-06-29 Thread James Taylor
You can avoid the creation of the empty value and avoid data being dropped by using the CREATE VIEW command instead of creating a table. Follow the link that Thomas posted to see some of the trade-offs between a view versus table. The main one is that a view is read-only and don't support