Indexes

2014-12-03 Thread Siddharth Ubale
Hi All, I am using local indexes for a table in phoenix. After creating the index on a table containing 1 million records if I update the table for another 30 thousand records I am unable to see the index being updated even though I use the ‘UPDATE STATISTICS’ command . However when I rebuild

Parsing rowkey of existing Hbase table while creating a View

2014-12-03 Thread Vijay Kukkala
Hi, Phoenix version: 4.0 on HDP 2.1 I have an existing Hbase table with rowkey whose format is (customerId, date, category). It is stored as bytes[100] in Hbase. I am trying to create a Phoenix view on this table using this DDL command create table events (pk VARBINARY PRIMARY KEY, D.pc VARCHAR,

Re: Parsing rowkey of existing Hbase table while creating a View

2014-12-03 Thread James Taylor
Hi Vijay, Yes, you can declare a composite primary key with fixed length sizes for each part. The types you use for each column depend on how you serialized the data into the rowkey. Are they all strings with a fixed length? If so, it'd look something like this: create table events (

Re: Parsing rowkey of existing Hbase table while creating a View

2014-12-03 Thread Vijay Kukkala
James, Thank you for your response. Wondering if I would be able to parse the rowkey in the view as you specified using the table definition. create *view* events ( cid UNSIGNED_LONG, timestamp UNSIGNED_LONG, category CHAR(128), D.pc VARCHAR,

Re: Parsing rowkey of existing Hbase table while creating a View

2014-12-03 Thread Vijay Kukkala
James, Thank you for your response. Would I be able to apply constraints while creating a view. Running this query gave me an error. create *view* events ( cid UNSIGNED_LONG, timestamp UNSIGNED_LONG, category CHAR(128), D.ug VARCHAR) CONSTRAINT pk

Re: Phoenix - loading via mapreduce

2014-12-03 Thread James Taylor
See https://issues.apache.org/jira/browse/PHOENIX-976 On Wed, Dec 3, 2014 at 5:38 PM, Rama Ramani rama.ram...@live.com wrote: Sorry, send to dev alias by mistake, sending to the user DL When running the Mapreduce command fromhttp://phoenix.apache.org/bulk_dataload.html, I am getting an Access

RE: Indexes

2014-12-03 Thread rajeshbabu chintaguntla
Hi Siddharth, Index table also should be updated automatically in your case. But there is a case if any updates failed to index table then we are disabling the index and later automatically rebuild after 5 mins. FYI PHOENIX-1112(https://issues.apache.org/jira/browse/PHOENIX-1112) Can you please

How to write customized timestamp via UPSERT or other ways on phoenix?

2014-12-03 Thread chenwenhui
My application need multi-versions of a cell and customized timestamp, but it looks like that the UPSERT statement does not support the ability. How to realize it? Any ideas can be appreciated!

Phoenix4.2.1 against HBase0.98.6 encountered a strange problem when using connection with props

2014-12-03 Thread chenwenhui
The main code fragment is as follow: final Properties props = new Properties(); final long ts = 141759720L; props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts)); Class.forName(org.apache.phoenix.jdbc.PhoenixDriver); final Connection con =

回复: Phoenix4.2.1 against HBase0.98.6 encountered a strange problem when using connection with props

2014-12-03 Thread su...@certusnet.com.cn
Hi, The main cause is that you put inappropriate props key value for the parameter. What properties would you expect to utilize at the phoenix connection time ? Thanks, Sun CertusNet 发件人: chenwenhui 发送时间: 2014-12-04 13:49 收件人: user 主题: Phoenix4.2.1 against HBase0.98.6 encountered a

Re: Phoenix4.2.1 against HBase0.98.6 encountered a strange problem when using connection with props

2014-12-03 Thread Samarth Jain
Is there a reason why you are using CURRENT_SCN_ATTRIBUTE while you are getting a phoenix connection? Is it because you want to query data at a point of time? If yes, you probably want to check that the create time stamp of the table MYTEST1 = 141759720L. If you don't want any snapshot like