Re: Too many connections from / - max is 60

2020-06-17 Thread anil gupta
Sorry for the late reply.
Yes, we plan to upgrade to HBase2 and Phoenix5 by the end of this year but
it's a bigger effort to upgrade the entire platform.
I was able to resolve the problem by:
1. Creating the secondary index table in hbase if its missing.
2. Disabling and dropping the indexes that were not in index_state='a'
3. Rebuild the dropped indexes if they are needed.

I used the following sql to find out all the indexes that were not in
active state(especially focused on index_state='b' and 'i') by querying
system_catalog:






*SELECT TABLE_NAME, TABLE_SCHEM, TABLE_TYPE, DATA_TABLE_NAME, INDEX_STATE,
LINK_TYPE, INDEX_TYPE, IS_NAMESPACE_MAPPED, COLUMN_NAME FROM
SYSTEM."CATALOG" WHERE COLUMN_NAME IS NULLAND TABLE_TYPE ='i'AND LINK_TYPE
IS NULL AND index_state!='a'AND table_name IS NOT NULL *

We still don't know how we got into this situation with secondary indexes
but we are happy that the cluster is not freaking out anymore.
Thanks for all the pointers!

-Anil


On Tue, Jun 9, 2020 at 12:09 AM Sukumar Maddineni 
wrote:

> Hi Anil,
>
> I think if you create that missing HBase table (index table) with dummy
> metadata(using have shell) and then Phoenix drop index and recreate index
> should work.
>
> Phoenix 4.7 indexing code might have issues related cross rpc calls
> between RS which can cause zk connection leaks. I would recommend upgrading
> 4.14.3 of possible which has lot of indexing improvements related to
> consistency a d also performance.
>
> --
> Sukumar
>
> On Mon, Jun 8, 2020, 10:15 PM anil gupta  wrote:
>
>> You were right from the beginning. It is a problem with phoenix secondary
>> index!
>> I tried 4LW zk commands after enabling them, they didnt really provide me
>> much extra information.
>> Then, i took heap and thread dump of a RS that was throwing a lot of max
>> connection error. Most of the rpc were busy with:
>> *RpcServer.FifoWFPBQ.default.handler=129,queue=9,port=16020*
>> *org.apache.phoenix.hbase.index.exception.SingleIndexWriteFailureException
>> @ 0x63d837320*
>> *org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException @
>> 0x41f9a0270*
>>
>> *Failed 499 actions: Table 'DE:TABLE_IDX_NEW' was not found, got:
>> DE:TABLE_IDX.: 499 times, *
>>
>> After finding the above error, i queried SYSTEM.CATALOG table. DE:TABLE
>> has two secondary index but has only 1 secondary index table in
>> hbase(DE:TABLE_IDX). Other table DE:TABLE_IDX_NEW' is missing from hbase. I
>> am not really sure how this would happen.
>> DE:TABLE_IDX_NEW is listed with index_state='i' in catalog table. Can you
>> tell me what does this mean?(incomplete?)
>> Now, i am trying to delete the primary table to get rid of index and then
>> we can recreate the primary table since this is a small table but i am
>> unable to do so via phoenix. Can you please tell me how i can
>> *delete this table?(restart of cluster? or doing an upsert in catalog?)*
>>
>> *Lat one, if table_type='u' then its a user defined table? if
>> table_type='i' then its an index table? *
>>
>> *Thanks a lot for your help!*
>>
>> *~Anil *
>>
>> On Wed, Jun 3, 2020 at 8:14 AM Josh Elser  wrote:
>>
>>> The RegionServer hosting hbase:meta will certainly have "load" placed
>>> onto it, commensurate to the size of your cluster and the number of
>>> clients you're running. However, this shouldn't be increasing the amount
>>> of connections to ZK from a RegionServer.
>>>
>>> The RegionServer hosting system.catalog would be unique WRT other
>>> Phoenix-table Regions. I don't recall off of the top of my head if there
>>> is anything specific in the RegionServer code that runs alongside
>>> system.catalog (the MetaDataEndpoint protocol) that reaches out to
>>> ZooKeeper.
>>>
>>> If you're using HDP 2.6.3, I wouldn't be surprised if you're running
>>> into known and fixed issues where ZooKeeper connections are not cleaned
>>> up. That's multiple-years old code.
>>>
>>> netstat and tcpdump isn't really going to tell you anything you don't
>>> already. From a thread dump or a heap dump, you'll be able to see the
>>> number of ZooKeeper connections from a RegionServer. The 4LW commands
>>> from ZK will be able to tell you which clients (i.e. RegionServers) have
>>> the most connections. These numbers should match (X connections from a
>>> RS to a ZK, and X connections in the Java RS process). The focus would
>>> need to be on what opens a new connection and what is not properly
>>> closing that connection (in every case).
>>>
>>> On 6/3/20

Re: Too many connections from / - max is 60

2020-06-08 Thread anil gupta
You were right from the beginning. It is a problem with phoenix secondary
index!
I tried 4LW zk commands after enabling them, they didnt really provide me
much extra information.
Then, i took heap and thread dump of a RS that was throwing a lot of max
connection error. Most of the rpc were busy with:
*RpcServer.FifoWFPBQ.default.handler=129,queue=9,port=16020*
*org.apache.phoenix.hbase.index.exception.SingleIndexWriteFailureException
@ 0x63d837320*
*org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException @
0x41f9a0270*

*Failed 499 actions: Table 'DE:TABLE_IDX_NEW' was not found, got:
DE:TABLE_IDX.: 499 times, *

After finding the above error, i queried SYSTEM.CATALOG table. DE:TABLE has
two secondary index but has only 1 secondary index table in
hbase(DE:TABLE_IDX). Other table DE:TABLE_IDX_NEW' is missing from hbase. I
am not really sure how this would happen.
DE:TABLE_IDX_NEW is listed with index_state='i' in catalog table. Can you
tell me what does this mean?(incomplete?)
Now, i am trying to delete the primary table to get rid of index and then
we can recreate the primary table since this is a small table but i am
unable to do so via phoenix. Can you please tell me how i can
*delete this table?(restart of cluster? or doing an upsert in catalog?)*

*Lat one, if table_type='u' then its a user defined table? if
table_type='i' then its an index table? *

*Thanks a lot for your help!*

*~Anil *

On Wed, Jun 3, 2020 at 8:14 AM Josh Elser  wrote:

> The RegionServer hosting hbase:meta will certainly have "load" placed
> onto it, commensurate to the size of your cluster and the number of
> clients you're running. However, this shouldn't be increasing the amount
> of connections to ZK from a RegionServer.
>
> The RegionServer hosting system.catalog would be unique WRT other
> Phoenix-table Regions. I don't recall off of the top of my head if there
> is anything specific in the RegionServer code that runs alongside
> system.catalog (the MetaDataEndpoint protocol) that reaches out to
> ZooKeeper.
>
> If you're using HDP 2.6.3, I wouldn't be surprised if you're running
> into known and fixed issues where ZooKeeper connections are not cleaned
> up. That's multiple-years old code.
>
> netstat and tcpdump isn't really going to tell you anything you don't
> already. From a thread dump or a heap dump, you'll be able to see the
> number of ZooKeeper connections from a RegionServer. The 4LW commands
> from ZK will be able to tell you which clients (i.e. RegionServers) have
> the most connections. These numbers should match (X connections from a
> RS to a ZK, and X connections in the Java RS process). The focus would
> need to be on what opens a new connection and what is not properly
> closing that connection (in every case).
>
> On 6/3/20 4:57 AM, anil gupta wrote:
> > Thanks for sharing insights. Moving hbase mailing list to cc.
> > Sorry, forgot to mention that we are using Phoenix4.7(HDP 2.6.3). This
> > cluster is mostly being queried via Phoenix apart from few pure NoSql
> > cases that uses raw HBase api's.
> >
> > I looked further into zk logs and found that only 6/15 RS are running
> > into max connection problems(no other ip/hosts of our client apps were
> > found) constantly. One of those RS is getting 3-4x the connections
> > errors as compared to others, this RS is hosting hbase:meta
> > <
> http://ip-10-74-10-228.us-west-2.compute.internal:16030/region.jsp?name=1588230740>,
>
> > regions of phoenix secondary indexes and region of Phoenix and HBase
> > tables. I also looked into other 5 RS that are getting max connection
> > errors, for me nothing really stands out since all of them are hosting
> > regions of phoenix secondary indexes and region of Phoenix and HBase
> tables.
> >
> > I also tried to run netstat and tcpdump on zk host to find out anomaly
> > but couldn't find anything apart from above mentioned analysis. Also ran
> > hbck and it reported that things are fine. I am still unable to pin
> > point exact problem(maybe something with phoenix secondary index?). Any
> > other pointer to further debug the problem will be appreciated.
> >
> > Lastly, I constantly see following zk connection loss logs in above
> > mentioned 6 RS:
> > /2020-06-03 06:40:30,859 WARN
> >
>  
> [RpcServer.FifoWFPBQ.default.handler=123,queue=3,port=16020-SendThread(ip-10-74-0-120.us-west-2.compute.internal:2181)]
> zookeeper.ClientCnxn: Session 0x0 for server
> ip-10-74-0-120.us-west-2.compute.internal/10.74.0.120:2181 <
> http://10.74.0.120:2181>, unexpected error, closing socket connection and
> attempting reconnect
> > java.io.IOException: Connection reset by peer
> >  at sun.nio.ch.FileDispatcherImpl.read0(Native M

Re: Too many connections from / - max is 60

2020-06-03 Thread anil gupta
Thanks for sharing insights. Moving hbase mailing list to cc.
Sorry, forgot to mention that we are using Phoenix4.7(HDP 2.6.3). This
cluster is mostly being queried via Phoenix apart from few pure NoSql cases
that uses raw HBase api's.

I looked further into zk logs and found that only 6/15 RS are running into
max connection problems(no other ip/hosts of our client apps were found)
constantly. One of those RS is getting 3-4x the connections errors as
compared to others, this RS is hosting hbase:meta
<http://ip-10-74-10-228.us-west-2.compute.internal:16030/region.jsp?name=1588230740>,
regions of phoenix secondary indexes and region of Phoenix and HBase
tables. I also looked into other 5 RS that are getting max connection
errors, for me nothing really stands out since all of them are hosting
regions of phoenix secondary indexes and region of Phoenix and HBase tables.

I also tried to run netstat and tcpdump on zk host to find out anomaly but
couldn't find anything apart from above mentioned analysis. Also ran hbck
and it reported that things are fine. I am still unable to pin point exact
problem(maybe something with phoenix secondary index?). Any other pointer
to further debug the problem will be appreciated.

Lastly, I constantly see following zk connection loss logs in above
mentioned 6 RS:





















*2020-06-03 06:40:30,859 WARN
 
[RpcServer.FifoWFPBQ.default.handler=123,queue=3,port=16020-SendThread(ip-10-74-0-120.us-west-2.compute.internal:2181)]
zookeeper.ClientCnxn: Session 0x0 for server
ip-10-74-0-120.us-west-2.compute.internal/10.74.0.120:2181
<http://10.74.0.120:2181>, unexpected error, closing socket connection and
attempting reconnectjava.io.IOException: Connection reset by peerat
sun.nio.ch.FileDispatcherImpl.read0(Native Method)at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)at
sun.nio.ch.IOUtil.read(IOUtil.java:192)at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)at
org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68)
  at
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
  at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)2020-06-03
06:40:30,861 INFO
 
[RpcServer.FifoWFPBQ.default.handler=137,queue=17,port=16020-SendThread(ip-10-74-9-182.us-west-2.compute.internal:2181)]
zookeeper.ClientCnxn: Opening socket connection to server
ip-10-74-9-182.us-west-2.compute.internal/10.74.9.182:2181
<http://10.74.9.182:2181>. Will not attempt to authenticate using SASL
(unknown error)2020-06-03 06:40:30,861 INFO
 
[RpcServer.FifoWFPBQ.default.handler=137,queue=17,port=16020-SendThread(ip-10-74-9-182.us-west-2.compute.internal:2181)]
zookeeper.ClientCnxn: Socket connection established, initiating session,
client: /10.74.10.228:60012 <http://10.74.10.228:60012>, server:
ip-10-74-9-182.us-west-2.compute.internal/10.74.9.182:2181
<http://10.74.9.182:2181>2020-06-03 06:40:30,861 WARN
 
[RpcServer.FifoWFPBQ.default.handler=137,queue=17,port=16020-SendThread(ip-10-74-9-182.us-west-2.compute.internal:2181)]
zookeeper.ClientCnxn: Session 0x0 for server
ip-10-74-9-182.us-west-2.compute.internal/10.74.9.182:2181
<http://10.74.9.182:2181>, unexpected error, closing socket connection and
attempting reconnectjava.io.IOException: Connection reset by peerat
sun.nio.ch.FileDispatcherImpl.read0(Native Method)at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)at
sun.nio.ch.IOUtil.read(IOUtil.java:192)at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)at
org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68)
  at
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
  at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)*

Thanks!

On Tue, Jun 2, 2020 at 6:57 AM Josh Elser  wrote:

> HBase (daemons) try to use a single connection for themselves. A RS also
> does not need to mutate state in ZK to handle things like gets and puts.
>
> Phoenix is probably the thing you need to look at more closely
> (especially if you're using an old version of Phoenix that matches the
> old HBase 1.1 version). Internally, Phoenix acts like an HBase client
> which results in a new ZK connection. There have certainly been bugs
> like that in the past (speaking generally, not specifically).
>
> On 6/1/20 5:59 PM, anil gupta wrote:
> > Hi Folks,
> >
> > We are running in HBase problems due to hitting the limit of ZK
> > connections. This cluster is running HBase 1.1.x and ZK 3.4.6.x on I3en
> ec2
> > instance type in AWS. Almost all our Region server are listed in zk logs
> > with "Too many connec

Re: timestamp and pre-existing HBase tables

2020-03-18 Thread anil gupta
AFAIK, Phoenix cannot surface the cell level timestamps that hbase stores
for each cell. Row Timestamp in Phoenix not equivalent to hbase cell
timestamp. RowTimestamp is nothing but a numerical/date column being part
of composite Primary key of table that stores time component and allows
phoenix to do some filter optimizations.
However, we have written a udf to grab cell timestamp with Phoenix at my
current workplace. So, its doable with custom udf.

On Wed, Mar 18, 2020 at 8:23 AM Kupersanin, William 
wrote:

> Hello,
>
>
>
> I’m new to HBase/Phoenix and trying to reconcile the guidance for making a
> Phoenix view for a preexisting table in HBase (found in the FAQ), and the
> guidance for being able to search versions using the built-in HBase
> timestamp ( https://phoenix.apache.org/rowtimestamp.html)
>
>
>
> I can create a view in Phoenix where I can see my pre-existing data as
> follows.
>
> CREATE view   "dev_host_ip" (pk VARCHAR PRIMARY KEY, "f1"."ip" VARCHAR);
>
>
>
> If I create a table instead of a view, I can not access my data via
> Phoenix.
>
>
>
> However, if I try to add a timestamp with view, I get an error “Declaring
> a column as row_timestamp is not allowed for views"
>
>
>
> So is there a way to take advantage of built-in timestamps on preexisting
> HBase tables? If so, could someone please point me in the right direction?
>
>
>
> Thanks!
>
> --Willie
>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Apache Phoenix website search seems to be broken

2019-12-13 Thread anil gupta
AFAIK, it was run by folks at https://sematext.com/


On Fri, Dec 13, 2019 at 3:21 PM Josh Elser  wrote:

> I'm not sure who actually runs search-hadoop. I don't believe it's
> anyone affiliated with Apache Phoenix. Thanks for letting us know it's
> broken, Anil!
>
> I'll drop it from the website for now. Maybe we can find something akin
> to a `site:phoenix.apache.org ` Google search that we can embed?
>
> On 12/13/19 4:42 PM, anil gupta wrote:
> > Hi,
> >
> > When i try to use the search feature on https://phoenix.apache.org/
> > <https://phoenix.apache.org/> it takes me to:
> > http://www1.search-hadoop.com/?subid4=1576273131.0028120806
> > <http://www1.search-hadoop.com/?subid4=1576273131.0028120806> and there
> > are no results. Is this a temporary error or search-hadoop website is
> gone.
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
>


-- 
Thanks & Regards,
Anil Gupta


Apache Phoenix website search seems to be broken

2019-12-13 Thread anil gupta
Hi,

When i try to use the search feature on https://phoenix.apache.org/ it
takes me to: http://www1.search-hadoop.com/?subid4=1576273131.0028120806
and there are no results. Is this a temporary error or search-hadoop
website is gone.

-- 
Thanks & Regards,
Anil Gupta


Re: Phoenix non-Kerberos security ?

2019-11-04 Thread anil gupta
To the best of my knowledge Phoenix/HBase only supports Kerberos.
In past, i have used secure HBase/Phoenix cluster in web services and it
worked fine. Kerberos can be integrated with AD. But, you might need to
check whether Queryserver supports security or not. In worst case, a
potential workaround would be to put Phoenix query server behind a
homegrown webservice that authenticates and authorizes the users before
forwarding the request to Queryserver.

HTH,
Anil Gupta

On Mon, Nov 4, 2019 at 12:45 AM Aleksandr Saraseka 
wrote:

> Hello community.
> Does Phoenix have some kind of security for authentication and
> authorization other then Kerberos ?
> We're allowing our users connect to our cluster with QueryServer, but at
> the same time we want to authenticate them and control what kind of access
> they can have (read only, write only to some tables) without enabling
> Kerberos for HBase/HDFS clusters.
>
> --
> Aleksandr Saraseka
> DBA
> 380997600401
>  *•*  asaras...@eztexting.com  *•*  eztexting.com
> <http://eztexting.com?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
>
> <http://facebook.com/eztexting?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <http://linkedin.com/company/eztexting/?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <http://twitter.com/eztexting?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <https://www.youtube.com/eztexting?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <https://www.instagram.com/ez_texting/?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <https://www.facebook.com/alex.saraseka?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
> <https://www.linkedin.com/in/alexander-saraseka-32616076/?utm_source=WiseStamp_medium=email_term=_content=_campaign=signature>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Materialized views in Hbase/Phoenix

2019-09-27 Thread anil gupta
For your use case, i would suggest to create another table that stores the
matrix. Since this data doesnt change that often, maybe you can write a
nightly spark/MR job to update/rebuild the matrix table.(If you want near
real time that is also possible with any streaming system) Have you looked
into bloom filters? It might help if you have sparse dataset and you are
using Phoenix dynamic columns.
We use dynamic columns for a table that has columns upto 40k. Here is the
presentation and optimizations we made for that use case:
https://www.slideshare.net/anilgupta84/phoenix-con2017-truecarfinal
IMO, Hive integration with HBase is not fully baked and it has a lot of
rough edges. So, it better to stick with native Phoenix/HBase if you care
about performance and ease of operations.

HTH,
Anil Gupta


On Wed, Sep 25, 2019 at 10:01 AM Gautham Acharya <
gauth...@alleninstitute.org> wrote:

> Hi,
>
>
>
> Currently I'm using Hbase to store large, sparse matrices of 50,000
> columns 10+ million rows of integers.
>
>
>
> This matrix is used for fast, random access - we need to be able to fetch
> random row/column subsets, as well as entire columns. We also want to very
> quickly fetch aggregates (Mean, median, etc) on this matrix.
>
>
>
> The data does not change very often for these matrices (a few times a week
> at most), so pre-computing is very feasible here. What I would like to do
> is maintain a column store (store the column names as row keys, and a
> compressed list of all the row values) for the use case where we select an
> entire column. Additionally, I would like to maintain a separate table for
> each precomputed aggregate (median table, mean table, etc).
>
>
>
> The query time for all these use cases needs to be low latency - under
> 100ms.
>
>
>
> When the data does change for a certain matrix, it would be nice to easily
> update the optimized table. Ideally, I would like the column
> store/aggregation tables to just be materialized views of the original
> matrix. It doesn't look like Apache Phoenix supports materialized views. It
> looks like Hive does, but unfortunately Hive doesn't normally offer low
> latency queries.
>
>
>
> Maybe Hive can create the materialized view, and we can just query the
> underlying Hbase store for lower latency responses?
>
>
>
> What would be a good solution for this?
>
>
>
> --gautham
>
>
>
>
>
>
>
> --gautham
>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: A strange question about Phoenix

2019-06-19 Thread anil gupta
Sounds strange.
What steps you followed to restore snapshot of Phoenix table?

On Tue, Jun 18, 2019 at 9:34 PM jesse  wrote:

> hi:
>
>  When my table is restored via hbase clone-snapshot,
>
> 1) sqlline.py console shows the proper number of records:  select count(*)
> from my_table.
> 2) select my_column from my_table limit 1 works fine.
>
>  However, select * from my_table limit 1; returns no row.
>
>  Do I need to perform some extra operations?
>
>  thanks
>
>
>
>
>
>
>

-- 
Thanks & Regards,
Anil Gupta


Re: Hbase vs Phienix column names

2019-01-08 Thread Anil
Thanks. its working. But i needs phoenix connection and convert operation
must be done for each column :(. Thanks.


Re: Hbase vs Phienix column names

2019-01-07 Thread Anil
I mean can I use following methods ?

TWO_BYTE_QUALIFIERS.decode()
TWO_BYTE_QUALIFIERS.encode()

are there any additional transformations (eg : storage formats) to be
considered while reading from hbase ?

Thanks. Regards


On Tue, 8 Jan 2019 at 11:46, Anil  wrote:

> Hi Thomas,
>
> I have checked the hbase system.catalog table and COLUMN_QUALIFIER value
> is not encoded.  From the internal code, i understood default encoded
> scheme used for column is QualifierEncodingScheme.TWO_BYTE_QUALIFIERS.
>
> Can i use this encoding to get the values from hbase ? Thanks.
>
> Regards,
> Anil
>
> On Tue, 8 Jan 2019 at 11:24, Thomas D'Silva 
> wrote:
>
>> There isn't an existing utility that does that. You would have to look up
>> the COLUMN_QUALIFIER for the columns you are interested in from
>> SYSTEM.CATALOG
>> and use then create a Scan.
>>
>> On Mon, Jan 7, 2019 at 9:22 PM Anil  wrote:
>>
>>> Hi Team,
>>>
>>> Is there any utility to read hbase data using hbase apis which is
>>> created with phoniex with column name encoding ?
>>>
>>> Idea is to use the all performance and disk usage improvements achieved
>>> with phoenix column name encoding feature and use our existing hbase jobs
>>> for our data analysis.
>>>
>>> Thanks,
>>> Anil
>>>
>>> On Tue, 11 Dec 2018 at 14:02, Anil  wrote:
>>>
>>>> Thanks.
>>>>
>>>> On Tue, 11 Dec 2018 at 11:51, Jaanai Zhang 
>>>> wrote:
>>>>
>>>>> The difference since used encode column names that support in 4.10
>>>>> version(Also see PHOENIX-1598
>>>>> <https://issues.apache.org/jira/browse/PHOENIX-1598>).
>>>>> You can config COLUMN_ENCODED_BYTES property to keep the original
>>>>> column names in the create table SQL, an example for:
>>>>>
>>>>> create table test(
>>>>>
>>>>> id varchar  primary key,
>>>>>
>>>>> col varchar
>>>>>
>>>>> )COLUMN_ENCODED_BYTES =0 ;
>>>>>
>>>>>
>>>>>
>>>>> 
>>>>>Jaanai Zhang
>>>>>Best regards!
>>>>>
>>>>>
>>>>>
>>>>> Anil  于2018年12月11日周二 下午1:24写道:
>>>>>
>>>>>> HI,
>>>>>>
>>>>>> We have upgraded phoenix to Phoenix-4.11.0-cdh5.11.2 from phoenix
>>>>>> 4.7.
>>>>>>
>>>>>> Problem - When a table is created in phoenix, underlying hbase column
>>>>>> names and phoenix column names are different. Tables created in 4.7 
>>>>>> version
>>>>>> looks good. Looks
>>>>>>
>>>>>> CREATE TABLE TST_TEMP (TID VARCHAR PRIMARY KEY ,PRI VARCHAR,SFLG
>>>>>> VARCHAR,PFLG VARCHAR,SOLTO VARCHAR,BILTO VARCHAR) COMPRESSION = 'SNAPPY';
>>>>>>
>>>>>> 0: jdbc:phoenix:dq-13.labs.> select TID,PRI,SFLG from TST_TEMP limit
>>>>>> 2;
>>>>>> +-++---+
>>>>>> |   TID   |PRI |SFLG   |
>>>>>> +-++---+
>>>>>> | 0060189122  | 0.00   |   |
>>>>>> | 0060298478  | 13390.26   |   |
>>>>>> +-++---+
>>>>>>
>>>>>>
>>>>>> hbase(main):011:0> scan 'TST_TEMP', {LIMIT => 2}
>>>>>> ROW  COLUMN+CELL
>>>>>>  0060189122  column=0:\x00\x00\x00\x00,
>>>>>> timestamp=1544296959236, value=x
>>>>>>  0060189122  column=0:\x80\x0B,
>>>>>> timestamp=1544296959236, value=0.00
>>>>>>  0060298478  column=0:\x00\x00\x00\x00,
>>>>>> timestamp=1544296959236, value=x
>>>>>>  0060298478  column=0:\x80\x0B,
>>>>>> timestamp=1544296959236, value=13390.26
>>>>>>
>>>>>>
>>>>>> hbase columns names are completely different than phoenix column
>>>>>> names. This change observed only post up-gradation. all existing tables
>>>>>> created in earlier versions looks good and alter statements to existing
>>>>>> tables also looks good.
>>>>>>
>>>>>> Is there any workaround to avoid this difference? we could not run
>>>>>> hbase mapreduce jobs on hbase tables created  by phoenix. Thanks.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>


Re: Hbase vs Phienix column names

2019-01-07 Thread Anil
Hi Thomas,

I have checked the hbase system.catalog table and COLUMN_QUALIFIER value is
not encoded.  From the internal code, i understood default encoded scheme
used for column is QualifierEncodingScheme.TWO_BYTE_QUALIFIERS.

Can i use this encoding to get the values from hbase ? Thanks.

Regards,
Anil

On Tue, 8 Jan 2019 at 11:24, Thomas D'Silva  wrote:

> There isn't an existing utility that does that. You would have to look up
> the COLUMN_QUALIFIER for the columns you are interested in from
> SYSTEM.CATALOG
> and use then create a Scan.
>
> On Mon, Jan 7, 2019 at 9:22 PM Anil  wrote:
>
>> Hi Team,
>>
>> Is there any utility to read hbase data using hbase apis which is created
>> with phoniex with column name encoding ?
>>
>> Idea is to use the all performance and disk usage improvements achieved
>> with phoenix column name encoding feature and use our existing hbase jobs
>> for our data analysis.
>>
>> Thanks,
>> Anil
>>
>> On Tue, 11 Dec 2018 at 14:02, Anil  wrote:
>>
>>> Thanks.
>>>
>>> On Tue, 11 Dec 2018 at 11:51, Jaanai Zhang 
>>> wrote:
>>>
>>>> The difference since used encode column names that support in 4.10
>>>> version(Also see PHOENIX-1598
>>>> <https://issues.apache.org/jira/browse/PHOENIX-1598>).
>>>> You can config COLUMN_ENCODED_BYTES property to keep the original
>>>> column names in the create table SQL, an example for:
>>>>
>>>> create table test(
>>>>
>>>> id varchar  primary key,
>>>>
>>>> col varchar
>>>>
>>>> )COLUMN_ENCODED_BYTES =0 ;
>>>>
>>>>
>>>>
>>>> 
>>>>Jaanai Zhang
>>>>Best regards!
>>>>
>>>>
>>>>
>>>> Anil  于2018年12月11日周二 下午1:24写道:
>>>>
>>>>> HI,
>>>>>
>>>>> We have upgraded phoenix to Phoenix-4.11.0-cdh5.11.2 from phoenix 4.7.
>>>>>
>>>>> Problem - When a table is created in phoenix, underlying hbase column
>>>>> names and phoenix column names are different. Tables created in 4.7 
>>>>> version
>>>>> looks good. Looks
>>>>>
>>>>> CREATE TABLE TST_TEMP (TID VARCHAR PRIMARY KEY ,PRI VARCHAR,SFLG
>>>>> VARCHAR,PFLG VARCHAR,SOLTO VARCHAR,BILTO VARCHAR) COMPRESSION = 'SNAPPY';
>>>>>
>>>>> 0: jdbc:phoenix:dq-13.labs.> select TID,PRI,SFLG from TST_TEMP limit 2;
>>>>> +-++---+
>>>>> |   TID   |PRI |SFLG   |
>>>>> +-++---+
>>>>> | 0060189122  | 0.00   |   |
>>>>> | 0060298478  | 13390.26   |   |
>>>>> +-++---+
>>>>>
>>>>>
>>>>> hbase(main):011:0> scan 'TST_TEMP', {LIMIT => 2}
>>>>> ROW  COLUMN+CELL
>>>>>  0060189122  column=0:\x00\x00\x00\x00,
>>>>> timestamp=1544296959236, value=x
>>>>>  0060189122  column=0:\x80\x0B,
>>>>> timestamp=1544296959236, value=0.00
>>>>>  0060298478  column=0:\x00\x00\x00\x00,
>>>>> timestamp=1544296959236, value=x
>>>>>  0060298478  column=0:\x80\x0B,
>>>>> timestamp=1544296959236, value=13390.26
>>>>>
>>>>>
>>>>> hbase columns names are completely different than phoenix column
>>>>> names. This change observed only post up-gradation. all existing tables
>>>>> created in earlier versions looks good and alter statements to existing
>>>>> tables also looks good.
>>>>>
>>>>> Is there any workaround to avoid this difference? we could not run
>>>>> hbase mapreduce jobs on hbase tables created  by phoenix. Thanks.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>


Re: Hbase vs Phienix column names

2019-01-07 Thread Anil
Hi Team,

Is there any utility to read hbase data using hbase apis which is created
with phoniex with column name encoding ?

Idea is to use the all performance and disk usage improvements achieved
with phoenix column name encoding feature and use our existing hbase jobs
for our data analysis.

Thanks,
Anil

On Tue, 11 Dec 2018 at 14:02, Anil  wrote:

> Thanks.
>
> On Tue, 11 Dec 2018 at 11:51, Jaanai Zhang  wrote:
>
>> The difference since used encode column names that support in 4.10
>> version(Also see PHOENIX-1598
>> <https://issues.apache.org/jira/browse/PHOENIX-1598>).
>> You can config COLUMN_ENCODED_BYTES property to keep the original column
>> names in the create table SQL, an example for:
>>
>> create table test(
>>
>> id varchar  primary key,
>>
>> col varchar
>>
>> )COLUMN_ENCODED_BYTES =0 ;
>>
>>
>>
>> 
>>Jaanai Zhang
>>Best regards!
>>
>>
>>
>> Anil  于2018年12月11日周二 下午1:24写道:
>>
>>> HI,
>>>
>>> We have upgraded phoenix to Phoenix-4.11.0-cdh5.11.2 from phoenix 4.7.
>>>
>>> Problem - When a table is created in phoenix, underlying hbase column
>>> names and phoenix column names are different. Tables created in 4.7 version
>>> looks good. Looks
>>>
>>> CREATE TABLE TST_TEMP (TID VARCHAR PRIMARY KEY ,PRI VARCHAR,SFLG
>>> VARCHAR,PFLG VARCHAR,SOLTO VARCHAR,BILTO VARCHAR) COMPRESSION = 'SNAPPY';
>>>
>>> 0: jdbc:phoenix:dq-13.labs.> select TID,PRI,SFLG from TST_TEMP limit 2;
>>> +-++---+
>>> |   TID   |PRI |SFLG   |
>>> +-++---+
>>> | 0060189122  | 0.00   |   |
>>> | 0060298478  | 13390.26   |   |
>>> +-++---+
>>>
>>>
>>> hbase(main):011:0> scan 'TST_TEMP', {LIMIT => 2}
>>> ROW  COLUMN+CELL
>>>  0060189122  column=0:\x00\x00\x00\x00,
>>> timestamp=1544296959236, value=x
>>>  0060189122  column=0:\x80\x0B,
>>> timestamp=1544296959236, value=0.00
>>>  0060298478  column=0:\x00\x00\x00\x00,
>>> timestamp=1544296959236, value=x
>>>  0060298478  column=0:\x80\x0B,
>>> timestamp=1544296959236, value=13390.26
>>>
>>>
>>> hbase columns names are completely different than phoenix column names.
>>> This change observed only post up-gradation. all existing tables created in
>>> earlier versions looks good and alter statements to existing tables also
>>> looks good.
>>>
>>> Is there any workaround to avoid this difference? we could not run hbase
>>> mapreduce jobs on hbase tables created  by phoenix. Thanks.
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>>
>>>


Re: Hbase vs Phienix column names

2018-12-11 Thread Anil
Thanks.

On Tue, 11 Dec 2018 at 11:51, Jaanai Zhang  wrote:

> The difference since used encode column names that support in 4.10
> version(Also see PHOENIX-1598
> <https://issues.apache.org/jira/browse/PHOENIX-1598>).
> You can config COLUMN_ENCODED_BYTES property to keep the original column
> names in the create table SQL, an example for:
>
> create table test(
>
> id varchar  primary key,
>
> col varchar
>
> )COLUMN_ENCODED_BYTES =0 ;
>
>
>
> ----
>Jaanai Zhang
>Best regards!
>
>
>
> Anil  于2018年12月11日周二 下午1:24写道:
>
>> HI,
>>
>> We have upgraded phoenix to Phoenix-4.11.0-cdh5.11.2 from phoenix 4.7.
>>
>> Problem - When a table is created in phoenix, underlying hbase column
>> names and phoenix column names are different. Tables created in 4.7 version
>> looks good. Looks
>>
>> CREATE TABLE TST_TEMP (TID VARCHAR PRIMARY KEY ,PRI VARCHAR,SFLG
>> VARCHAR,PFLG VARCHAR,SOLTO VARCHAR,BILTO VARCHAR) COMPRESSION = 'SNAPPY';
>>
>> 0: jdbc:phoenix:dq-13.labs.> select TID,PRI,SFLG from TST_TEMP limit 2;
>> +-++---+
>> |   TID   |PRI |SFLG   |
>> +-++---+
>> | 0060189122  | 0.00   |   |
>> | 0060298478  | 13390.26   |   |
>> +-++---+
>>
>>
>> hbase(main):011:0> scan 'TST_TEMP', {LIMIT => 2}
>> ROW  COLUMN+CELL
>>  0060189122  column=0:\x00\x00\x00\x00,
>> timestamp=1544296959236, value=x
>>  0060189122  column=0:\x80\x0B,
>> timestamp=1544296959236, value=0.00
>>  0060298478  column=0:\x00\x00\x00\x00,
>> timestamp=1544296959236, value=x
>>  0060298478  column=0:\x80\x0B,
>> timestamp=1544296959236, value=13390.26
>>
>>
>> hbase columns names are completely different than phoenix column names.
>> This change observed only post up-gradation. all existing tables created in
>> earlier versions looks good and alter statements to existing tables also
>> looks good.
>>
>> Is there any workaround to avoid this difference? we could not run hbase
>> mapreduce jobs on hbase tables created  by phoenix. Thanks.
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>


Hbase vs Phienix column names

2018-12-10 Thread Anil
HI,

We have upgraded phoenix to Phoenix-4.11.0-cdh5.11.2 from phoenix 4.7.

Problem - When a table is created in phoenix, underlying hbase column names
and phoenix column names are different. Tables created in 4.7 version looks
good. Looks

CREATE TABLE TST_TEMP (TID VARCHAR PRIMARY KEY ,PRI VARCHAR,SFLG
VARCHAR,PFLG VARCHAR,SOLTO VARCHAR,BILTO VARCHAR) COMPRESSION = 'SNAPPY';

0: jdbc:phoenix:dq-13.labs.> select TID,PRI,SFLG from TST_TEMP limit 2;
+-++---+
|   TID   |PRI |SFLG   |
+-++---+
| 0060189122  | 0.00   |   |
| 0060298478  | 13390.26   |   |
+-++---+


hbase(main):011:0> scan 'TST_TEMP', {LIMIT => 2}
ROW  COLUMN+CELL
 0060189122  column=0:\x00\x00\x00\x00,
timestamp=1544296959236, value=x
 0060189122  column=0:\x80\x0B,
timestamp=1544296959236, value=0.00
 0060298478  column=0:\x00\x00\x00\x00,
timestamp=1544296959236, value=x
 0060298478  column=0:\x80\x0B,
timestamp=1544296959236, value=13390.26


hbase columns names are completely different than phoenix column names.
This change observed only post up-gradation. all existing tables created in
earlier versions looks good and alter statements to existing tables also
looks good.

Is there any workaround to avoid this difference? we could not run hbase
mapreduce jobs on hbase tables created  by phoenix. Thanks.

Thanks


Re: Heap Size Recommendation

2018-11-20 Thread anil gupta
Phoenix query read performance is not only related to JVM heapsize but
increasing heapsize helps in having a bigger cache and read perf in some
cases.
I am assuming you are talking about increasing heapsize of
RegionServer(RS). For a 32 gb RS machine(assuming its only running a
Datanode daemon and not used for MR/Spark jobs), i think its gonna be ok if
you have a heap size of 24 gb for RS.

Hope this helps,
Anil Gupta

On Tue, Nov 20, 2018 at 3:45 AM Azhar Shaikh 
wrote:

> Hi All,
>
> Is there any update on Heap Size Recommendation.
>
> Your help is greatly appreciated.
>
> Thanks
>
>
>
> --
> Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/
>


-- 
Thanks & Regards,
Anil Gupta


Re: Row Scan In HBase Not Working When Table Created With Phoenix

2018-07-28 Thread anil gupta
In addition to Miles comment, its recommended to use Phoenix for reads if
you wrote data using Phoenix.
To mimic your range scan in Phoenix query: select * from EMPPH2 where id >=
1 and id < 3;

On Thu, Jul 26, 2018 at 11:10 PM, Miles Spielberg  wrote:

> SQL INTEGER is not stored as strings, but as 4-bytes of encoded binary.
> See https://phoenix.apache.org/language/datatypes.html#integer_type
>
> Miles Spielberg
> Staff Software Engineer
>
>
> O. 650.485.1102
> 900 Jefferson Ave
> <https://maps.google.com/?q=900+Jefferson+Ave+%0D%0A%0D%0ARedwood+City+,+CA+94063=gmail=g>
> Redwood City, CA 94063
> <https://maps.google.com/?q=900+Jefferson+Ave+%0D%0A%0D%0ARedwood+City+,+CA+94063=gmail=g>
>
> On Thu, Jul 26, 2018 at 5:44 PM, alchemist 
> wrote:
>
>> create table empPh2(id integer primary key, fname varchar, lname
>> varchar)COLUMN_ENCODED_BYTES=0
>> upsert into empPh2 values (1, 'A', 'B');
>> upsert into empPh2 values (2, 'B', 'B');
>> upsert into empPh2 values (3, 'C', 'B');
>> upsert into empPh2 values (4, 'John', 'B');
>>
>>
>> Then when to HBase to do the range query using following command:
>>
>> hbase(main):004:0> scan 'EMPPH2', {STARTROW => '1', ENDROW => '3'}
>> ROWCOLUMN+CELL
>>
>>
>> 0 row(s) in 0.0030 seconds
>>
>> I saw row in HBASE has extra symbols.  Not sure how to have 1:1 mapping
>> between HBASE table to Phoenix table.
>>
>> ROW  COLUMN+CELL
>>
>>
>>  \x80\x00\x00\x01column=0:FNAME,
>> timestamp=1532651140732, value=A
>>
>>  \x80\x00\x00\x01column=0:LNAME,
>> timestamp=1532651140732, value=B
>>
>>  \x80\x00\x00\x01column=0:_0,
>> timestamp=1532651140732, value=x
>>
>>  \x80\x00\x00\x02column=0:FNAME,
>> timestamp=1532651151877, value=B
>>
>>  \x80\x00\x00\x02column=0:LNAME,
>> timestamp=1532651151877, value=B
>>
>>  \x80\x00\x00\x02column=0:_0,
>> timestamp=1532651151877, value=x
>>
>>  \x80\x00\x00\x03column=0:FNAME,
>> timestamp=1532651164899, value=C
>>
>>  \x80\x00\x00\x03column=0:LNAME,
>> timestamp=1532651164899, value=B
>>
>>
>>
>> --
>> Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.

2018-05-06 Thread anil gupta
flect.Constructor.newInstance(Constructor.java:423)
> at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(
> ConnectionFactory.java:238)
> ... 32 more
> Caused by: java.lang.RuntimeException: Could not create  interface
> org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSource Is the hadoop
> compatibility jar on the classpath?
> at org.apache.hadoop.hbase.CompatibilitySingletonFactory.getInstance(
> CompatibilitySingletonFactory.java:75)
> at org.apache.hadoop.hbase.zookeeper.MetricsZooKeeper.<
> init>(MetricsZooKeeper.java:38)
> at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.(
> RecoverableZooKeeper.java:130)
> at org.apache.hadoop.hbase.zookeeper.ZKUtil.connect(ZKUtil.java:143)
> at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<
> init>(ZooKeeperWatcher.java:181)
> at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<
> init>(ZooKeeperWatcher.java:155)
> at org.apache.hadoop.hbase.client.ZooKeeperKeepAliveConnection.(
> ZooKeeperKeepAliveConnection.java:43)
> at org.apache.hadoop.hbase.client.ConnectionManager$
> HConnectionImplementation.getKeepAliveZooKeeperWatcher(
> ConnectionManager.java:1737)
> at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(
> ZooKeeperRegistry.java:104)
> at org.apache.hadoop.hbase.client.ConnectionManager$
> HConnectionImplementation.retrieveClusterId(ConnectionManager.java:945)
> at org.apache.hadoop.hbase.client.ConnectionManager$
> HConnectionImplementation.(ConnectionManager.java:721)
> ... 37 more
> Caused by: java.util.ServiceConfigurationError: org.apache.hadoop.hbase.
> zookeeper.MetricsZooKeeperSource: Provider org.apache.hadoop.hbase.
> zookeeper.MetricsZooKeeperSourceImpl could not be instantiated
> at java.util.ServiceLoader.fail(ServiceLoader.java:232)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
> at java.util.ServiceLoader$LazyIterator.nextService(
> ServiceLoader.java:384)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
> at org.apache.hadoop.hbase.CompatibilitySingletonFactory.getInstance(
> CompatibilitySingletonFactory.java:59)
> ... 47 more
> Caused by: java.lang.IllegalAccessError: tried to access class
> org.apache.hadoop.metrics2.lib.MetricsInfoImpl from class
> org.apache.hadoop.metrics2.lib.DynamicMetricsRegistry
> at org.apache.hadoop.metrics2.lib.DynamicMetricsRegistry.newGauge(
> DynamicMetricsRegistry.java:139)
> at org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl.(
> MetricsZooKeeperSourceImpl.java:59)
> at org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl.(
> MetricsZooKeeperSourceImpl.java:51)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at java.lang.Class.newInstance(Class.java:442)
> at java.util.ServiceLoader$LazyIterator.nextService(
> ServiceLoader.java:380)
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: hotspot in System.catalog table

2018-04-13 Thread anil gupta
We saw atleast 5x improvement in Upsert performance from our streaming app
just by altering table and adding UPDATE_CACHE_FREQUENCY=6 in all our
tables. Overall our cluster, system.catalog table and apps looks more
happy. Thanks Again!

On Thu, Apr 12, 2018 at 11:37 PM, anil gupta <anilgupt...@gmail.com> wrote:

> Thanks a lot. Going to do that and see the impact.
>
> On Thu, Apr 12, 2018 at 11:33 PM, James Taylor <jamestay...@apache.org>
> wrote:
>
>> It’s client side, but that’ll only impact newly created tables. You’ll
>> need to use the ALTER TABLE command for existing tables.
>>
>> On Thu, Apr 12, 2018 at 11:30 PM anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> I have set phoenix.default.update.cache.frequency=6 in
>>> hbase-site.xml via ambari(we barely alter schema). Is this a client or
>>> server side property?
>>>
>>> On Thu, Apr 12, 2018 at 11:14 PM, anil gupta <anilgupt...@gmail.com>
>>> wrote:
>>>
>>>> I c. As per documentation[1], even for commits of upsert system.catalog
>>>> is called. IMO, ALWAYS seems to be really aggressive. Is there any reason
>>>> UPDATE_CACHE_FREQUENCY is set to ALWAYS by default? Do we plan to change
>>>> the default value to 5 or 10 sec? Thanks for your help.
>>>>
>>>>
>>>> PS: we were running into a lot of Phoenix scalability issues due to
>>>> this.
>>>>
>>>> [1] https://phoenix.apache.org/language/index.html#options
>>>>
>>>> On Thu, Apr 12, 2018 at 11:06 PM, James Taylor <jamestay...@apache.org>
>>>> wrote:
>>>>
>>>>> No, that won’t make a difference.
>>>>>
>>>>> On Thu, Apr 12, 2018 at 10:51 PM anil gupta <anilgupt...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thanks for quick reply, James. We will look into
>>>>>> UPDATE_CACHE_FREQUENCY property. If we just replace PS with Statement, 
>>>>>> will
>>>>>> it fix the problem(AFAIK, Statement is not compiled)?
>>>>>>
>>>>>> On Thu, Apr 12, 2018 at 10:43 PM, James Taylor <
>>>>>> jamestay...@apache.org> wrote:
>>>>>>
>>>>>>> Try setting the UPDATE_CACHE_FREQUENCY table property (and
>>>>>>> configuring the phoenix.default.update.cache.frequency system-wide
>>>>>>> property). That'll prevent pinging the region hosting SYSTEM.CATALOG 
>>>>>>> every
>>>>>>> time a query is compiled. We've found value of even 5 seconds makes a 
>>>>>>> big
>>>>>>> difference. For more on that, see here[1] and here[2].
>>>>>>>
>>>>>>> In the future, we'll let the SYSTEM.CATALOG table span multiple
>>>>>>> regions - keep an eye on PHOENIX-3534.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> James
>>>>>>>
>>>>>>> [1] https://phoenix.apache.org/#Altering
>>>>>>> [2] https://phoenix.apache.org/language/index.html#options
>>>>>>>
>>>>>>> On Thu, Apr 12, 2018 at 10:32 PM, anil gupta <anilgupt...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> System.catalog table seems to be single region table(correct?). We
>>>>>>>> are currently facing a problem of hotspot on System.catalog table.
>>>>>>>> One of our app does around 4-5k select queries/sec. And, It is
>>>>>>>> creating a new preparedstatement everytime. I suspect that while
>>>>>>>> instantiating a new preparedstatement(contrary to Statement),
>>>>>>>> system.catalog table is queried first. Hence, it is resulting into
>>>>>>>> hotspotting. Is my analysis correct?
>>>>>>>>
>>>>>>>> (I have already suggested my colleagues to try using Statement
>>>>>>>> instead of PS if they have to create a new one everytime.)
>>>>>>>>
>>>>>>>> --
>>>>>>>> Thanks & Regards,
>>>>>>>> Anil Gupta
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks & Regards,
>>>>>> Anil Gupta
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Anil Gupta
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Anil Gupta
>>>
>>
>
>
> --
> Thanks & Regards,
> Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta


Re: hotspot in System.catalog table

2018-04-13 Thread anil gupta
Thanks a lot. Going to do that and see the impact.

On Thu, Apr 12, 2018 at 11:33 PM, James Taylor <jamestay...@apache.org>
wrote:

> It’s client side, but that’ll only impact newly created tables. You’ll
> need to use the ALTER TABLE command for existing tables.
>
> On Thu, Apr 12, 2018 at 11:30 PM anil gupta <anilgupt...@gmail.com> wrote:
>
>> I have set phoenix.default.update.cache.frequency=6 in
>> hbase-site.xml via ambari(we barely alter schema). Is this a client or
>> server side property?
>>
>> On Thu, Apr 12, 2018 at 11:14 PM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> I c. As per documentation[1], even for commits of upsert system.catalog
>>> is called. IMO, ALWAYS seems to be really aggressive. Is there any reason
>>> UPDATE_CACHE_FREQUENCY is set to ALWAYS by default? Do we plan to change
>>> the default value to 5 or 10 sec? Thanks for your help.
>>>
>>>
>>> PS: we were running into a lot of Phoenix scalability issues due to
>>> this.
>>>
>>> [1] https://phoenix.apache.org/language/index.html#options
>>>
>>> On Thu, Apr 12, 2018 at 11:06 PM, James Taylor <jamestay...@apache.org>
>>> wrote:
>>>
>>>> No, that won’t make a difference.
>>>>
>>>> On Thu, Apr 12, 2018 at 10:51 PM anil gupta <anilgupt...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks for quick reply, James. We will look into
>>>>> UPDATE_CACHE_FREQUENCY property. If we just replace PS with Statement, 
>>>>> will
>>>>> it fix the problem(AFAIK, Statement is not compiled)?
>>>>>
>>>>> On Thu, Apr 12, 2018 at 10:43 PM, James Taylor <jamestay...@apache.org
>>>>> > wrote:
>>>>>
>>>>>> Try setting the UPDATE_CACHE_FREQUENCY table property (and
>>>>>> configuring the phoenix.default.update.cache.frequency system-wide
>>>>>> property). That'll prevent pinging the region hosting SYSTEM.CATALOG 
>>>>>> every
>>>>>> time a query is compiled. We've found value of even 5 seconds makes a big
>>>>>> difference. For more on that, see here[1] and here[2].
>>>>>>
>>>>>> In the future, we'll let the SYSTEM.CATALOG table span multiple
>>>>>> regions - keep an eye on PHOENIX-3534.
>>>>>>
>>>>>> Thanks,
>>>>>> James
>>>>>>
>>>>>> [1] https://phoenix.apache.org/#Altering
>>>>>> [2] https://phoenix.apache.org/language/index.html#options
>>>>>>
>>>>>> On Thu, Apr 12, 2018 at 10:32 PM, anil gupta <anilgupt...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> System.catalog table seems to be single region table(correct?). We
>>>>>>> are currently facing a problem of hotspot on System.catalog table.
>>>>>>> One of our app does around 4-5k select queries/sec. And, It is
>>>>>>> creating a new preparedstatement everytime. I suspect that while
>>>>>>> instantiating a new preparedstatement(contrary to Statement),
>>>>>>> system.catalog table is queried first. Hence, it is resulting into
>>>>>>> hotspotting. Is my analysis correct?
>>>>>>>
>>>>>>> (I have already suggested my colleagues to try using Statement
>>>>>>> instead of PS if they have to create a new one everytime.)
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>> Anil Gupta
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Anil Gupta
>>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Anil Gupta
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: hotspot in System.catalog table

2018-04-12 Thread anil gupta
Thanks for quick reply, James. We will look into UPDATE_CACHE_FREQUENCY
property. If we just replace PS with Statement, will it fix the
problem(AFAIK, Statement is not compiled)?

On Thu, Apr 12, 2018 at 10:43 PM, James Taylor <jamestay...@apache.org>
wrote:

> Try setting the UPDATE_CACHE_FREQUENCY table property (and configuring
> the phoenix.default.update.cache.frequency system-wide property). That'll
> prevent pinging the region hosting SYSTEM.CATALOG every time a query is
> compiled. We've found value of even 5 seconds makes a big difference. For
> more on that, see here[1] and here[2].
>
> In the future, we'll let the SYSTEM.CATALOG table span multiple regions -
> keep an eye on PHOENIX-3534.
>
> Thanks,
> James
>
> [1] https://phoenix.apache.org/#Altering
> [2] https://phoenix.apache.org/language/index.html#options
>
> On Thu, Apr 12, 2018 at 10:32 PM, anil gupta <anilgupt...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> System.catalog table seems to be single region table(correct?). We are
>> currently facing a problem of hotspot on System.catalog table.
>> One of our app does around 4-5k select queries/sec. And, It is creating a
>> new preparedstatement everytime. I suspect that while instantiating a new
>> preparedstatement(contrary to Statement), system.catalog table is queried
>> first. Hence, it is resulting into hotspotting. Is my analysis correct?
>>
>> (I have already suggested my colleagues to try using Statement instead of
>> PS if they have to create a new one everytime.)
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


hotspot in System.catalog table

2018-04-12 Thread anil gupta
Hi All,

System.catalog table seems to be single region table(correct?). We are
currently facing a problem of hotspot on System.catalog table.
One of our app does around 4-5k select queries/sec. And, It is creating a
new preparedstatement everytime. I suspect that while instantiating a new
preparedstatement(contrary to Statement), system.catalog table is queried
first. Hence, it is resulting into hotspotting. Is my analysis correct?

(I have already suggested my colleagues to try using Statement instead of
PS if they have to create a new one everytime.)

-- 
Thanks & Regards,
Anil Gupta


Re: Phoenix Exception - Connection is null or closed.

2018-03-29 Thread Anil
Hi Yun,

You mean, we need to increase the connections in connection pool ?. We dint
have any changes to our code before upgrade. Same code is working on 4.7
version.

Note : We are using APACHE_PHOENIX-4.11.0-cdh5.11.2.p0.1.

Thanks,
Anil



On 24 March 2018 at 20:57, zhang yun <cloud.pos...@gmail.com> wrote:

> Hi, Anil.
> It seems that this exception is not bug,  you should check your code of
> logical layer. Sometimes this exception will be trigger when multiple
> thread to access connections pool( some connections are closed at that
> time).
>
>
> 
>Yun Zhang
>Best regards!
>
>
> 2018-03-23 23:45 GMT+08:00 Anil <anilk...@gmail.com>:
>
>> Hi Josh,
>>
>> i didn't find any other exception. i will check again. Exceptions
>> happened only on few nodes. i have seen failed to get regions exception on
>> few nodes. I will check agian and comeback to more details. Thanks.
>>
>> Regards,
>> Anil
>>
>> On 22 March 2018 at 21:56, Josh Elser <els...@apache.org> wrote:
>>
>>> Hey Anil,
>>>
>>> You sure there isn't another exception earlier on in the output of your
>>> application? The exception you have here looks more like the JVM was
>>> already shutting down and Phoenix had closed the connection (the exceptions
>>> were about queued tasks being cleared out after the decision to shutdown
>>> was already made).
>>>
>>> On 3/22/18 8:14 AM, Anil wrote:
>>>
>>>> HI Team,
>>>>
>>>> We have upgraded the phoenix from 4.7.0 to 4.11.0 and started noticing
>>>> the attached exception.
>>>>
>>>> Can you help me identifying the root cause of the exception ? Thanks.
>>>>
>>>> Regards,
>>>> Anil
>>>>
>>>
>>
>


Re: Phoenix Exception - Connection is null or closed.

2018-03-23 Thread Anil
Hi Josh,

i didn't find any other exception. i will check again. Exceptions happened
only on few nodes. i have seen failed to get regions exception on few
nodes. I will check agian and comeback to more details. Thanks.

Regards,
Anil

On 22 March 2018 at 21:56, Josh Elser <els...@apache.org> wrote:

> Hey Anil,
>
> You sure there isn't another exception earlier on in the output of your
> application? The exception you have here looks more like the JVM was
> already shutting down and Phoenix had closed the connection (the exceptions
> were about queued tasks being cleared out after the decision to shutdown
> was already made).
>
> On 3/22/18 8:14 AM, Anil wrote:
>
>> HI Team,
>>
>> We have upgraded the phoenix from 4.7.0 to 4.11.0 and started noticing
>> the attached exception.
>>
>> Can you help me identifying the root cause of the exception ? Thanks.
>>
>> Regards,
>> Anil
>>
>


Phoenix Exception - Connection is null or closed.

2018-03-22 Thread Anil
HI Team,

We have upgraded the phoenix from 4.7.0 to 4.11.0 and started noticing the
attached exception.

Can you help me identifying the root cause of the exception ? Thanks.

Regards,
Anil
2018-03-21 08:13:19,684 ERROR 
com.tst.hadoop.flume.writer.inventory.AccountPersistenceImpl: Error querying 
account UUIDs for siteId 0101293035
org.springframework.dao.DataAccessResourceFailureException: 
PreparedStatementCallback; SQL [select uuids from account where siteid = ?]; 
java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: 
Task 
org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture@5ddc0ec5
 rejected from java.util.concurrent.ThreadPoolExecutor@5204afb0[Shutting down, 
pool size = 59, active threads = 0, queued tasks = 0, completed tasks = 
2667625]; nested exception is org.apache.phoenix.exception.PhoenixIOException: 
java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: 
Task 
org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture@5ddc0ec5
 rejected from java.util.concurrent.ThreadPoolExecutor@5204afb0[Shutting down, 
pool size = 59, active threads = 0, queued tasks = 0, completed tasks = 2667625]
at 
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:105)
at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:660)
at 
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:695)
at 
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722)
at 
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772)
at 
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:192)
at 
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForList(NamedParameterJdbcTemplate.java:290)
at 
com.tst.hadoop.flume.writer.inventory.AccountPersistenceImpl.getUUIDs(AccountPersistenceImpl.java:187)
at 
net.juniper.spark.stream.sap.data.mapper.ServiceContractMapper.populatePartnerAccountId(ServiceContractMapper.java:134)
at 
net.juniper.spark.stream.sap.data.mapper.ServiceContractMapper.map(ServiceContractMapper.java:70)
at 
net.juniper.spark.stream.sap.data.mapper.ServiceContractMapper.map(ServiceContractMapper.java:39)
at 
net.juniper.spark.stream.sap.processor.SAPDataProcessor.mapObject(SAPDataProcessor.java:34)
at 
net.juniper.spark.stream.sap.processor.SAPDataProcessor.processData(SAPDataProcessor.java:43)
at 
com.tst.hadoop.flume.sink.SAPContractCustomSink.process(SAPContractCustomSink.java:113)
at 
org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:67)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.phoenix.exception.PhoenixIOException: 
java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: 
Task 
org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture@5ddc0ec5
 rejected from java.util.concurrent.ThreadPoolExecutor@5204afb0[Shutting down, 
pool size = 59, active threads = 0, queued tasks = 0, completed tasks = 2667625]
at 
org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:116)
at 
org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:875)
at 
org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:819)
at 
org.apache.phoenix.iterate.RoundRobinResultIterator.getIterators(RoundRobinResultIterator.java:176)
at 
org.apache.phoenix.iterate.RoundRobinResultIterator.next(RoundRobinResultIterator.java:91)
at 
org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
at 
org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
at 
org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
at 
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
at 
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
at 
org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:708)
at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
... 15 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException

Phoenix Mapreduce

2017-12-28 Thread Anil
HI Team,

I was looking at the PhoenixOutputFormat and PhoenixRecordWriter.java ,
could not see connection autocommit is set to false. Did i miss something
here ?

Is there any way to read from phoenix table and create HFiles for bulk
import instead of committing every record (batch).

I have written a mapreduce job to create a datasets for my target table and
data load to target table is taking long time and want to avoid load time
by avoiding statement execution or frequent commits.

Any help would be appreciated. thanks.

Thanks,
Anil


Re: Salt Number

2017-09-12 Thread anil gupta
Hi Pradheep,

customerid+type+orderid as rowkey should be able to support range scan on
basis of multiple customer rows at high scale. I dont think you need to do
salting unless i am missing something here.
Salting is usually used to avoid hot-spotting when hbase read/write are
incremental rowkeys(non-random). Example: Timeseries data with time as
leading part of rowkey
Another way to avoid salting with incremental rowkey is to reverse the
leading number of your rowkey. example: reverse(45668) = 86654.

HTH,
Anil Gupta


On Fri, Sep 8, 2017 at 10:23 AM, Pradheep Shanmugam <
pradheep.shanmu...@infor.com> wrote:

> HI James,
>
>
> We have a table where multiple customer could have rows.
>
> Some of them may be large and some very small in terms for number of rows.
>
> we have a row key based on customerid+type+orderid..if not salted all the
> rows of large customer will end up in some regions leading to hot
> spotting(being large customer and more frequently used)
>
>
> Thanks,
>
> Pradheep
> --
> *From:* James Taylor <jamestay...@apache.org>
> *Sent:* Friday, September 8, 2017 12:56:31 PM
> *To:* user
> *Subject:* Re: Salt Number
>
> Hi Pradheep,
> Would you be able to describe your use case and why you're salting? We
> really only recommend salting if you have write hotspotting. Otherwise, it
> increases the overall load on your cluster.
> Thanks,
> James
>
> On Fri, Sep 8, 2017 at 9:13 AM, Pradheep Shanmugam <
> pradheep.shanmu...@infor.com> wrote:
>
>> Hi,
>>
>>
>> As the salt number cannot be changed later, what is is best number we can
>> give in different cases for cluster with 10 region servers with say 6 cores
>> in each.
>>
>> Should we consider cores while deciding the number..
>>
>> In some places i see number can be in the range 1-256 and in some place i
>> see that it is equal to the number of region servers..can the number in the
>> multiples of region server(say 20, 30 etc)
>>
>>
>> read heavy large(several 100 millions) table with range scans
>>
>> write heavy large table with less frequent range scans
>>
>> large table with hybrid load with range scans
>>
>>
>> Thanks,
>>
>> Pradheep
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Phoenix Storage Not Working on AWS EMR 5.8.0

2017-08-21 Thread anil gupta
And forgot to mention that we invoke our pig scripts through oozie.

On Mon, Aug 21, 2017 at 2:20 PM, anil gupta <anilgupt...@gmail.com> wrote:

> Sorry, cant share the pig script.
> Here is what we are registering:
> REGISTER /usr/lib/phoenix/phoenix-4.7.0-HBase-1.2-client.jar;
> REGISTER /usr/lib/pig/lib/piggybank.jar;
>
>
> Following is the classpath of Hadoop and Yarn:
> [hadoop@ip-52-143 ~]$ hadoop classpath
> /etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.
> //*:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/
> usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/lib/*:/usr/
> lib/hadoop-yarn/.//*:/usr/lib/hadoop-mapreduce/lib/*:/usr/
> lib/hadoop-mapreduce/.//*::/etc/tez/conf:/usr/lib/tez/*:/
> usr/lib/tez/lib/*:/usr/lib/hadoop-lzo/lib/*:/usr/share/
> aws/aws-java-sdk/*:/usr/share/aws/emr/emrfs/conf:/usr/share/
> aws/emr/emrfs/lib/*:/usr/share/aws/emr/emrfs/auxlib/*:/
> usr/share/aws/emr/ddb/lib/emr-ddb-hadoop.jar:/usr/share/aws/
> emr/goodies/lib/emr-hadoop-goodies.jar:/usr/share/aws/
> emr/kinesis/lib/emr-kinesis-hadoop.jar:/usr/share/aws/emr/
> cloudwatch-sink/lib/*:/usr/share/aws/emr/security/conf:/
> usr/share/aws/emr/security/lib/*
> [hadoop@ip-52-143 ~]$ yarn classpath
> /etc/hadoop/conf:/etc/hadoop/conf:/etc/hadoop/conf:/usr/
> lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hadoop-
> hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//
> *:/usr/lib/hadoop-yarn/lib/*:/usr/lib/hadoop-yarn/.//*:/usr/
> lib/hadoop-mapreduce/lib/*:/usr/lib/hadoop-mapreduce/.//*:
> :/etc/tez/conf:/usr/lib/tez/*:/usr/lib/tez/lib/*:/usr/lib/
> hadoop-lzo/lib/*:/usr/share/aws/aws-java-sdk/*:/usr/share/
> aws/emr/emrfs/conf:/usr/share/aws/emr/emrfs/lib/*:/usr/
> share/aws/emr/emrfs/auxlib/*:/usr/share/aws/emr/ddb/lib/emr-
> ddb-hadoop.jar:/usr/share/aws/emr/goodies/lib/emr-hadoop-
> goodies.jar:/usr/share/aws/emr/kinesis/lib/emr-kinesis-
> hadoop.jar:/usr/share/aws/emr/cloudwatch-sink/lib/*:/usr/
> share/aws/emr/security/conf:/usr/share/aws/emr/security/
> lib/*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-yarn/lib/*
>
>
>
> On Mon, Aug 21, 2017 at 11:21 AM, Steve Terrell <sterr...@oculus360.us>
> wrote:
>
>> Hmm...  just repeated my test on emr-5.2.0.  This time I went with the
>> default EMR console selections for master and core nodes (2 of them).
>>
>> When running my simple Pig Phoenix store script, still getting the errors
>> I got for other 5.x.x versions:
>> 2017-08-21 17:50:52,431 [ERROR] [main] |app.DAGAppMaster|: Error starting
>> DAGAppMaster
>> java.lang.NoSuchMethodError: org.apache.hadoop.yarn.api.rec
>> ords.ContainerId.fromString(Ljava/lang/String;)Lorg/
>> apache/hadoop/yarn/api/records/ContainerId;
>> at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(Con
>> verterUtils.java:179)
>> at org.apache.tez.dag.app.DAGAppMaster.main(DAGAppMaster.java:2304)
>>
>> The simple test script:
>> REGISTER /usr/lib/phoenix/phoenix-client.jar;
>> A = load '/steve/a.txt' as (TXT:chararray);
>> store A into 'hbase://A_TABLE' using org.apache.phoenix.pig.Phoenix
>> HBaseStorage('10.0.100.51','-batchSize 2500');
>>
>> Calling directly from the command line like
>> pig try.pig
>>
>> Maybe other people are calling their Phoenix Pig script some other way
>> (EMR steps) or with different parameters?  Details where this works would
>> really help out a lot.
>>
>> Thanks,
>> Steve
>>
>> On Mon, Aug 21, 2017 at 10:23 AM, Steve Terrell <sterr...@oculus360.us>
>> wrote:
>>
>>> Anil,
>>>
>>> That's good news (about 5.2).  Any chance I could see your
>>>
>>>- full pig command line
>>>- PIG_CLASSPATH env variable
>>>- pig script or at least the REGISTER and PhoenixHBaseStorage()
>>>lines?
>>>
>>> Might help me figure out what I'm doing wrong or differently.
>>>
>>> One thing I did not mention because I thought it should not matter is
>>> that to avoid extra costs while testing, I was only running a master node
>>> with no slaves (no task or core nodes).  Maybe lack of slaves causes
>>> problems not normally seen.  Interesting...
>>>
>>> Thanks so much,
>>> Steve
>>>
>>>
>>> On Sun, Aug 20, 2017 at 11:04 AM, anil gupta <anilgupt...@gmail.com>
>>> wrote:
>>>
>>>> Hey Steve,
>>>>
>>>> We are currently using EMR5.2 and pig-phoenix is working fine for us.
>>>> We are gonna try EMR5.8 next week.
>>>>
>>>> HTH,
>>>> Anil
>>>>
>>>> On Fri, Au

Re: Phoenix Storage Not Working on AWS EMR 5.8.0

2017-08-21 Thread anil gupta
Sorry, cant share the pig script.
Here is what we are registering:
REGISTER /usr/lib/phoenix/phoenix-4.7.0-HBase-1.2-client.jar;
REGISTER /usr/lib/pig/lib/piggybank.jar;


Following is the classpath of Hadoop and Yarn:
[hadoop@ip-52-143 ~]$ hadoop classpath
/etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/lib/*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-mapreduce/lib/*:/usr/lib/hadoop-mapreduce/.//*::/etc/tez/conf:/usr/lib/tez/*:/usr/lib/tez/lib/*:/usr/lib/hadoop-lzo/lib/*:/usr/share/aws/aws-java-sdk/*:/usr/share/aws/emr/emrfs/conf:/usr/share/aws/emr/emrfs/lib/*:/usr/share/aws/emr/emrfs/auxlib/*:/usr/share/aws/emr/ddb/lib/emr-ddb-hadoop.jar:/usr/share/aws/emr/goodies/lib/emr-hadoop-goodies.jar:/usr/share/aws/emr/kinesis/lib/emr-kinesis-hadoop.jar:/usr/share/aws/emr/cloudwatch-sink/lib/*:/usr/share/aws/emr/security/conf:/usr/share/aws/emr/security/lib/*
[hadoop@ip-52-143 ~]$ yarn classpath
/etc/hadoop/conf:/etc/hadoop/conf:/etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/lib/*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-mapreduce/lib/*:/usr/lib/hadoop-mapreduce/.//*::/etc/tez/conf:/usr/lib/tez/*:/usr/lib/tez/lib/*:/usr/lib/hadoop-lzo/lib/*:/usr/share/aws/aws-java-sdk/*:/usr/share/aws/emr/emrfs/conf:/usr/share/aws/emr/emrfs/lib/*:/usr/share/aws/emr/emrfs/auxlib/*:/usr/share/aws/emr/ddb/lib/emr-ddb-hadoop.jar:/usr/share/aws/emr/goodies/lib/emr-hadoop-goodies.jar:/usr/share/aws/emr/kinesis/lib/emr-kinesis-hadoop.jar:/usr/share/aws/emr/cloudwatch-sink/lib/*:/usr/share/aws/emr/security/conf:/usr/share/aws/emr/security/lib/*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-yarn/lib/*



On Mon, Aug 21, 2017 at 11:21 AM, Steve Terrell <sterr...@oculus360.us>
wrote:

> Hmm...  just repeated my test on emr-5.2.0.  This time I went with the
> default EMR console selections for master and core nodes (2 of them).
>
> When running my simple Pig Phoenix store script, still getting the errors
> I got for other 5.x.x versions:
> 2017-08-21 17:50:52,431 [ERROR] [main] |app.DAGAppMaster|: Error starting
> DAGAppMaster
> java.lang.NoSuchMethodError: org.apache.hadoop.yarn.api.
> records.ContainerId.fromString(Ljava/lang/String;)
> Lorg/apache/hadoop/yarn/api/records/ContainerId;
> at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(
> ConverterUtils.java:179)
> at org.apache.tez.dag.app.DAGAppMaster.main(DAGAppMaster.java:2304)
>
> The simple test script:
> REGISTER /usr/lib/phoenix/phoenix-client.jar;
> A = load '/steve/a.txt' as (TXT:chararray);
> store A into 'hbase://A_TABLE' using org.apache.phoenix.pig.
> PhoenixHBaseStorage('10.0.100.51','-batchSize 2500');
>
> Calling directly from the command line like
> pig try.pig
>
> Maybe other people are calling their Phoenix Pig script some other way
> (EMR steps) or with different parameters?  Details where this works would
> really help out a lot.
>
> Thanks,
> Steve
>
> On Mon, Aug 21, 2017 at 10:23 AM, Steve Terrell <sterr...@oculus360.us>
> wrote:
>
>> Anil,
>>
>> That's good news (about 5.2).  Any chance I could see your
>>
>>- full pig command line
>>- PIG_CLASSPATH env variable
>>- pig script or at least the REGISTER and PhoenixHBaseStorage() lines?
>>
>> Might help me figure out what I'm doing wrong or differently.
>>
>> One thing I did not mention because I thought it should not matter is
>> that to avoid extra costs while testing, I was only running a master node
>> with no slaves (no task or core nodes).  Maybe lack of slaves causes
>> problems not normally seen.  Interesting...
>>
>> Thanks so much,
>> Steve
>>
>>
>> On Sun, Aug 20, 2017 at 11:04 AM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> Hey Steve,
>>>
>>> We are currently using EMR5.2 and pig-phoenix is working fine for us. We
>>> are gonna try EMR5.8 next week.
>>>
>>> HTH,
>>> Anil
>>>
>>> On Fri, Aug 18, 2017 at 9:00 AM, Steve Terrell <sterr...@oculus360.us>
>>> wrote:
>>>
>>>> More info...
>>>>
>>>> By trial and error, I tested different EMR versions and made a little
>>>> incomplete list of which ones support Pig Phoenix storage and which ones
>>>> don't:
>>>>
>>>> emr-5.8.0 JacksonJaxbJsonProvider error
>>>> emr-5.6.0 JacksonJaxbJsonProvider error
>>>> emr-5.4.0 JacksonJaxbJsonProvider error
>>>> emr-5.3.1 ContainerId.fromString() error
>>>> emr-5.3.0 ContainerId.fromStrin

Re: Phoenix Storage Not Working on AWS EMR 5.8.0

2017-08-20 Thread anil gupta
Hey Steve,

We are currently using EMR5.2 and pig-phoenix is working fine for us. We
are gonna try EMR5.8 next week.

HTH,
Anil

On Fri, Aug 18, 2017 at 9:00 AM, Steve Terrell <sterr...@oculus360.us>
wrote:

> More info...
>
> By trial and error, I tested different EMR versions and made a little
> incomplete list of which ones support Pig Phoenix storage and which ones
> don't:
>
> emr-5.8.0 JacksonJaxbJsonProvider error
> emr-5.6.0 JacksonJaxbJsonProvider error
> emr-5.4.0 JacksonJaxbJsonProvider error
> emr-5.3.1 ContainerId.fromString() error
> emr-5.3.0 ContainerId.fromString() error
> emr-5.0.0 ContainerId.fromString() error
> emr-4.9.2 Works!
> emr-4.7.0 Works!
>
> I ran out of time trying to get 5.8.0 working, so will start using 4.9.2.
> But I would like to switch to 5.8.0 if anyone has a solution.  Meanwhile, I
> hope this list saves other people some time and headache.
>
> Thanks,
> Steve
>
> On Thu, Aug 17, 2017 at 2:40 PM, Steve Terrell <sterr...@oculus360.us>
> wrote:
>
>> I'm running EMR 5.8.0 with these applications installed:
>> Pig 0.16.0, Phoenix 4.11.0, HBase 1.3.1
>>
>> Here is my pig script (try.pig):
>>
>> REGISTER /usr/lib/phoenix/phoenix-4.11.0-HBase-1.3-client.jar;
>> A = load '/steve/a.txt' as (TXT:chararray);
>> store A into 'hbase://A_TABLE' using org.apache.phoenix.pig.Phoenix
>> HBaseStorage('10.0.100.51','-batchSize 2500');
>>
>> I run it like this from the command line:
>> pig try.pig
>>
>> When it fails, I dig into the hadoop task logs and find this:
>> 2017-08-17 19:11:37,539 [ERROR] [main] |app.DAGAppMaster|: Error starting
>> DAGAppMaster
>> java.lang.NoClassDefFoundError: org/apache/phoenix/shaded/org/
>> codehaus/jackson/jaxrs/JacksonJaxbJsonProvider
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>> at java.security.SecureClassLoader.defineClass(SecureClassLoade
>> r.java:142)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
>> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl.se
>> rviceInit(TimelineClientImpl.java:269)
>> at org.apache.hadoop.service.AbstractService.init(AbstractServi
>> ce.java:163)
>> at org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingServ
>> ice.serviceInit(ATSHistoryLoggingService.java:102)
>> at org.apache.hadoop.service.AbstractService.init(AbstractServi
>> ce.java:163)
>> at org.apache.hadoop.service.CompositeService.serviceInit(Compo
>> siteService.java:107)
>> at org.apache.tez.dag.history.HistoryEventHandler.serviceInit(H
>> istoryEventHandler.java:73)
>> at org.apache.hadoop.service.AbstractService.init(AbstractServi
>> ce.java:163)
>> at org.apache.tez.dag.app.DAGAppMaster.initServices(DAGAppMaste
>> r.java:1922)
>> at org.apache.tez.dag.app.DAGAppMaster.serviceInit(DAGAppMaster.java:624)
>> at org.apache.hadoop.service.AbstractService.init(AbstractServi
>> ce.java:163)
>> at org.apache.tez.dag.app.DAGAppMaster$8.run(DAGAppMaster.java:2557)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at javax.security.auth.Subject.doAs(Subject.java:422)
>> at org.apache.hadoop.security.UserGroupInformation.doAs(UserGro
>> upInformation.java:1698)
>> at org.apache.tez.dag.app.DAGAppMaster.initAndStartAppMaster(DA
>> GAppMaster.java:2554)
>> at org.apache.tez.dag.app.DAGAppMaster.main(DAGAppMaster.java:2359)
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.phoenix.shaded.org.codehaus.jackson.jaxrs.Jackson
>> JaxbJsonProvider
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> ... 28 more
>>
>> Has anyone been able to get org.apache.phoenix.pig.PhoenixHBaseStorage()
>> to work on recent EMR versions? Please help if you can.
>>
>> Thank you,
>> Steve
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Append sequenceId=8689

2017-07-06 Thread anil gupta
Thanks for the pointers Aaron. We checked hdfs. Its reporting 0
underreplicated or corrupted blocks.

@Ted: we are using Hadoop 2.7.3(EMR5.7.2)

On Thu, Jul 6, 2017 at 4:49 PM, Ted Yu <yuzhih...@gmail.com> wrote:

> Which hadoop release are you using ?
>
> In FSOutputSummer.java, I see the following around line 106:
>
> checkClosed();
>
> if (off < 0 || len < 0 || off > b.length - len) {
>   throw new ArrayIndexOutOfBoundsException();
>
> You didn't get ArrayIndexOutOfBoundsException - maybe b was null ?
>
> On Thu, Jul 6, 2017 at 2:08 PM, anil gupta <anilgupt...@gmail.com> wrote:
>
>> Hey Ted,
>>
>> This is what i see in one of region server log(NPE at the bottom):
>> 2017-07-06 19:07:07,778 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 155739ms
>> 2017-07-06 19:07:17,853 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 132731ms
>> 2017-07-06 19:07:28,038 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 4316ms
>> 2017-07-06 19:07:37,819 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 190960ms
>> 2017-07-06 19:07:47,767 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 41231ms
>> 2017-07-06 19:07:57,767 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 222748ms
>> 2017-07-06 19:08:07,973 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 245966ms
>> 2017-07-06 19:08:18,669 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 76257ms
>> 2017-07-06 19:08:28,029 INFO
>> [ip-10-74-5-153.us-west-2.compute.internal,16020,14993202605
>> 01_ChoreService_1]
>> regionserver.HRegionServer:
>> ip-10-74-5-153.us-west-2.compute.internal,16020,149932026050
>> 1-MemstoreFlusherChore
>> requesting flush of
>> SYSTEM.CATALOG,,1499317930655.a47ffa359aa4588f5f360790ac8e4561. because 0
>> has an old edit so flush to free WALs after random delay 78310ms
>> 2017-07-06 19:08:38,459 INFO
>> [ip-10-74-5-15

Re: org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Append sequenceId=8689

2017-07-06 Thread anil gupta
(BatchEventProcessor.java:128)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-07-06 19:48:39,255 WARN
[regionserver/ip-10-74-5-153.us-west-2.compute.internal/10.74.5.153:16020.logRoller]
wal.FSHLog: Failed sync-before-close but no outstanding appends; closing
WAL: org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Append
sequenceId=7846, requesting roll of WAL
2017-07-06 19:48:39,261 INFO
[regionserver/ip-10-74-5-153.us-west-2.compute.internal/10.74.5.153:16020.logRoller]
wal.FSHLog: Rolled WAL
/user/hbase/WALs/ip-10-74-5-153.us-west-2.compute.internal,16020,1499320260501/ip-10-74-5-153.us-west-2.compute.internal%2C16020%2C1499320260501.default.1499370518086
with entries=0, filesize=174 B; new WAL
/user/hbase/WALs/ip-10-74-5-153.us-west-2.compute.internal,16020,1499320260501/ip-10-74-5-153.us-west-2.compute.internal%2C16020%2C1499320260501.default.1499370519235
2017-07-06 19:48:39,261 INFO
[regionserver/ip-10-74-5-153.us-west-2.compute.internal/10.74.5.153:16020.logRoller]
wal.FSHLog: Archiving
hdfs://ip-10-74-31-169.us-west-2.compute.internal:8020/user/hbase/WALs/ip-10-74-5-153.us-west-2.compute.internal,16020,1499320260501/ip-10-74-5-153.us-west-2.compute.internal%2C16020%2C1499320260501.default.1499370518086
to
hdfs://ip-10-74-31-169.us-west-2.compute.internal:8020/user/hbase/oldWALs/ip-10-74-5-153.us-west-2.compute.internal%2C16020%2C1499320260501.default.1499370518086
2017-07-06 19:48:40,322 WARN
[regionserver/ip-10-74-5-153.us-west-2.compute.internal/10.74.5.153:16020.append-pool1-t1]
wal.FSHLog: Append sequenceId=7847, requesting roll of WAL
java.lang.NullPointerException
at org.apache.hadoop.fs.FSOutputSummer.write(FSOutputSummer.java:106)
at
org.apache.hadoop.fs.FSDataOutputStream$PositionCache.write(FSDataOutputStream.java:60)
at java.io.DataOutputStream.write(DataOutputStream.java:107)
at org.apache.hadoop.hbase.KeyValue.oswrite(KeyValue.java:2571)
at org.apache.hadoop.hbase.KeyValueUtil.oswrite(KeyValueUtil.java:623)
at
org.apache.hadoop.hbase.regionserver.wal.WALCellCodec$EnsureKvEncoder.write(WALCellCodec.java:338)
at
org.apache.hadoop.hbase.regionserver.wal.ProtobufLogWriter.append(ProtobufLogWriter.java:122)
at
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.append(FSHLog.java:1909)
at
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1773)
at
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1695)
at
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

On Thu, Jul 6, 2017 at 1:55 PM, Ted Yu <yuzhih...@gmail.com> wrote:

> HBASE-16960 mentioned the following :
>
> Caused by: java.net.SocketTimeoutException: 2 millis timeout while
> waiting for channel to be ready for read
>
> Do you see similar line in region server log ?
>
> Cheers
>
> On Thu, Jul 6, 2017 at 1:48 PM, anil gupta <anilgupt...@gmail.com> wrote:
>
> > Hi All,
> >
> > We are running HBase/Phoenix on EMR5.2(HBase1.2.3 and Phoenix4.7) and we
> running into following exception when we are trying to load data into one
> of our Phoenix table:
> > 2017-07-06 19:57:57,507 INFO [hconnection-0x60e5272-shared--pool2-t249]
> org.apache.hadoop.hbase.client.AsyncProcess: #1, table=DE.CONFIG_DATA,
> attempt=30/35 failed=38ops, last exception: org.apache.hadoop.hbase.
> regionserver.wal.DamagedWALException: org.apache.hadoop.hbase.
> regionserver.wal.DamagedWALException: Append sequenceId=8689, requesting
> roll of WAL
> >   at org.apache.hadoop.hbase.regionserver.wal.FSHLog$
> RingBufferEventHandler.append(FSHLog.java:1921)
> >   at org.apache.hadoop.hbase.regionserver.wal.FSHLog$
> RingBufferEventHandler.onEvent(FSHLog.java:1773)
> >   at org.apache.hadoop.hbase.regionserver.wal.FSHLog$
> RingBufferEventHandler.onEvent(FSHLog.java:1695)
> >   at com.lmax.disruptor.BatchEventProcessor.run(
> BatchEventProcessor.java:128)
> >   at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> >   at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> >   at java.lang.Thread.run(Thread.java:745)
> >
> > We are OK with wiping out this table and rebuilding the dataset. We
> tried to drop the table and recreate the table but it didnt fix it.
> > Can anyone please let us know how can we get rid of above problem? Are
> we running into https://issues.apache.org/jira/browse/HBASE-16960?
> >
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
> >
>



-- 
Thanks & Regards,
Anil Gupta


org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Append sequenceId=8689

2017-07-06 Thread anil gupta
Hi All,

We are running HBase/Phoenix on EMR5.2(HBase1.2.3 and Phoenix4.7) and
we running into following exception when we are trying to load data
into one of our Phoenix table:
2017-07-06 19:57:57,507 INFO
[hconnection-0x60e5272-shared--pool2-t249]
org.apache.hadoop.hbase.client.AsyncProcess: #1, table=DE.CONFIG_DATA,
attempt=30/35 failed=38ops, last exception:
org.apache.hadoop.hbase.regionserver.wal.DamagedWALException:
org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Append
sequenceId=8689, requesting roll of WAL
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.append(FSHLog.java:1921)
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1773)
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1695)
at 
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

We are OK with wiping out this table and rebuilding the dataset. We
tried to drop the table and recreate the table but it didnt fix it.
Can anyone please let us know how can we get rid of above problem? Are
we running into https://issues.apache.org/jira/browse/HBASE-16960?


-- 
Thanks & Regards,
Anil Gupta


[IndexTool NOT working] mapreduce.LoadIncrementalHFiles: Split occured while grouping HFiles

2017-05-25 Thread anil gupta
00:10,348 INFO  [LoadIncrementalHFiles-4]
mapreduce.LoadIncrementalHFiles: Trying to load
hfile=hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/5580694921e846949f49c1426162da6e
first=2GKALMEK7H6220949\x00\x80\x00!\x1A\x80\x00\x01Y!\xE5\xCF\xC110e1f23860ff6a21fe848bb85e2e0969
last=3C7WRNAJ6GG313342\x00\x80\x00NB\x80\x00\x01V}\x1D\xF5\x10620faf6227fb4181a7ee99fa07a52f08
2017-05-24 18:00:10,349 INFO  [LoadIncrementalHFiles-7]
mapreduce.LoadIncrementalHFiles: Trying to load
hfile=hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/7bc03c5b15304ec083e18c2376789562
first=1FMCU9J90EUB68140\x00\x80\x01X\xA4\x80\x00\x01[\x1D&\x9D\x12f80b9cac0af584642ecbd6e1b1bbd617
last=1G1JD5SB5H4136951\x00\x80\x00!\x8A\x80\x00\x01Z$\xB0\xAC\x1625dc1ae357cb3e9332d823210102de85
2017-05-24 18:00:10,349 INFO  [LoadIncrementalHFiles-13]
mapreduce.LoadIncrementalHFiles: Trying to load
hfile=hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/d28c4d2668cc4169b201b349b2522f9a
first=3N1CE2CP2FL407531\x00\x80\x00\x0A\xC9\x80\x00\x01X\xD1\xBC\xD195d73fa7cd13082d2e6f590ca1578b453
last=5FNRL5H4XFB033259\x00\x80\x00\x1EZ\x80\x00\x01\x5C!8\xA7.dd776deeea36c2c5b132fafed7013b16
2017-05-24 18:00:10,350 INFO  [LoadIncrementalHFiles-6]
mapreduce.LoadIncrementalHFiles: Trying to load
hfile=hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/5d90de564af645f084319a03f64b0a3d
first=KNDPMCAC1H7201793\x00\x80\x00\x1E\xC7\x80\x00\x01X\xD7F#\xEBcd2872ac4f258a091a79a55d4dbfef9e
last=WMWZP3C58FT708786\x00\x80\x00\xE0\x16\x80\x00\x01Y\xB7?\xCA\xADb28da871b5581e409561c813ed9c0805
2017-05-24 18:00:11,780 WARN  [LoadIncrementalHFiles-15]
mapreduce.LoadIncrementalHFiles: Attempt to bulk load region containing
into table BI.VIN_IDX with files [family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/d28c4d2668cc4169b201b349b2522f9a,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/23df78bafd304ff887385a2b6becf06d,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/39dc73882bec49a0bdd5d787b06ac032,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/a37a2a56ff5c48399cf1abd92f99662f,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/11627a2861e3446e9d6f684ab534563e,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/ac4edbfdf7394e88aaf84f5489511b7e,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/f0e97b218aed4abf9949cf49a57e559b,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/7bc03c5b15304ec083e18c2376789562,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/5d90de564af645f084319a03f64b0a3d,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/5580694921e846949f49c1426162da6e,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/595e89b2fae8494d8a878bc6ba306e2f,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/27c0a905ee174c9898d324acf1554bf9,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/c79ae6d27824424f99523dad586e86b1,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/b5843a62a6bd47fbbfc29303bee158e3,
family:I
path:hdfs://HDFS1/user/hbase/idx_test_7/BI.VIN_IDX/I/d0a6c4b727bb416f840ed254658f3982]
failed.  This is recoverable and they will be retried.
2017-05-24 18:00:11,793 INFO  [main] mapreduce.LoadIncrementalHFiles: Split
occured while grouping HFiles, retry attempt 1 with 15 files remaining to
group or split


-- 
Thanks & Regards,
Anil Gupta


Re: Async Index Creation fails due to permission issue

2017-05-23 Thread anil gupta
I think you need to run the tool as "hbase" user.

On Tue, May 23, 2017 at 5:43 AM, cmbendre <chaitanya.ben...@zeotap.com>
wrote:

> I created an ASYNC index and ran the IndexTool Map-Reduce job to populate
> it.
> Here is the command i used
>
> hbase org.apache.phoenix.mapreduce.index.IndexTool --data-table MYTABLE
> --index-table MYTABLE_GLOBAL_INDEX --output-path MYTABLE_GLOBAL_INDEX_HFILE
>
> I can see that index HFiles are created successfully on HDFS but then the
> job fails due to permission errors. The files are created as "hadoop" user,
> and they do not have any permission for "hbase" user. Here is the error i
> get -
>
> /Caused by:
> org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.
> AccessControlException):
> Permission denied: user=hbase, access=EXECUTE,
> inode="/user/hadoop/MYTABLE_GLOBAL_INDEX_HFILE/MYTABLE_GLOBAL_INDEX/0/
> a4c9888f8e284158bfb79b30b2cdee82":hadoop:hadoop:drwxrwx---
> at
> org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.
> check(FSPermissionChecker.java:320)
> at
> org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(
> FSPermissionChecker.java:259)
> at
> org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.
> checkPermission(FSPermissionChecker.java:205)
> at
> org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.
> checkPermission(FSPermissionChecker.java:190)
> at
> org.apache.hadoop.hdfs.server.namenode.FSDirectory.
> checkPermission(FSDirectory.java:1728)
> at
> org.apache.hadoop.hdfs.server.namenode.FSDirectory.
> checkPermission(FSDirectory.java:1712)
> at
> org.apache.hadoop.hdfs.server.namenode.FSDirectory.
> checkPathAccess(FSDirectory.java:1686)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(
> FSNamesystem.java:1830)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(
> FSNamesystem.java:1799)
> at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(
> FSNamesystem.java:1712)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.
> getBlockLocations(NameNodeRpcServer.java:588)
> at
> org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSi
> deTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSi
> deTranslatorPB.java:365)
> at
> org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$
> ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.
> java)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(
> ProtobufRpcEngine.java:616)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(
> UserGroupInformation.java:1698)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2045)/
>
> The hack i am using right now is to set the permissions manually for these
> files when the IndexTool job is running. Is there a better way ?
>
>
>
> --
> View this message in context: http://apache-phoenix-user-
> list.1124778.n5.nabble.com/Async-Index-Creation-fails-
> due-to-permission-issue-tp3573.html
> Sent from the Apache Phoenix User List mailing list archive at Nabble.com.
>



-- 
Thanks & Regards,
Anil Gupta


Re: ERROR 201 (22000): Unable to load CSV files using CsvBulkLoadTool due to blank columns

2017-03-30 Thread anil gupta
I agree, It doesn't. Unfortunately, we have it for historical reasons.
And pig-phoenix integration treats '' as null for an Integer column so the
behavior of ingestion is varying.


On Thu, Mar 30, 2017 at 11:07 AM, Pedro Boado <pedro.bo...@gmail.com> wrote:

> It doesn't make a lot of sense having quotes in an integer column, does
> it?
>
> Maybe removing this quotes from the source would solve the problem.
>
> On 30 Mar 2017 18:43, "anil gupta" <anilgupt...@gmail.com> wrote:
>
>> Hi Brian,
>>
>> It seems like Phoenix is not liking ''(single quotes) in an integer
>> column. IMO, it will be better if phoenix can handle that by providing an
>> option in csvbulkloadtool to specify '' to be treated as null. Single
>> quotes works fine for varchar columns.
>>
>> Thanks,
>> Anil Gupta
>>
>> On Thu, Mar 30, 2017 at 4:15 AM, Brian Jeltema <bdjelt...@gmail.com>
>> wrote:
>>
>>> The record in question
>>>
>>>45056, 82851, Both, Deal.com, 23, MODERNFHICKORY, '', '', Internal
>>> API, 2017-03-19 21:56:39.0, Tim , 2016-02-25 07:53:05.0
>>>
>>> doesn’t appear to have a blank or null value. There are either two
>>> columns containing a single quote character, or more likely
>>> a column containinig a quoted comma which the parser treats a two fields.
>>>
>>> > On Mar 30, 2017, at 3:09 AM, anil gupta <anilgupt...@gmail.com> wrote:
>>> >
>>> > Hi,
>>> >
>>> > We are trying load a simple CSV file to a table via CsvBulkLoadTool
>>> and some of the columns have blank/null value. We are using HDP 2.3 and
>>> Phoenix 4.4. We are getting following error:
>>> > 2017-03-29 21:53:34,106 ERROR [main] 
>>> > org.apache.phoenix.mapreduce.CsvToKeyValueMapper:
>>> Error on record [45056, 82851, Both, Deal.com, 23, MODERNFHICKORY, '', '',
>>> Internal API, 2017-03-19 21:56:39.0, Tim , 2016-02-25 07:53:05.0]:
>>> java.sql.SQLException: ERROR 201 (22000): Illegal data.
>>> >
>>> > Isn't there a way to handle blank or null value in input dataset while
>>> using CsvBulkLoadTool? I have looked at documentation but i am unable to
>>> find a solution for this.
>>> >
>>> > --
>>> > Thanks & Regards,
>>> > Anil Gupta
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: ERROR 201 (22000): Unable to load CSV files using CsvBulkLoadTool due to blank columns

2017-03-30 Thread anil gupta
Hi Brian,

It seems like Phoenix is not liking ''(single quotes) in an integer column.
IMO, it will be better if phoenix can handle that by providing an option in
csvbulkloadtool to specify '' to be treated as null. Single quotes works
fine for varchar columns.

Thanks,
Anil Gupta

On Thu, Mar 30, 2017 at 4:15 AM, Brian Jeltema <bdjelt...@gmail.com> wrote:

> The record in question
>
>45056, 82851, Both, Deal.com, 23, MODERNFHICKORY, '', '', Internal API,
> 2017-03-19 21:56:39.0, Tim , 2016-02-25 07:53:05.0
>
> doesn’t appear to have a blank or null value. There are either two columns
> containing a single quote character, or more likely
> a column containinig a quoted comma which the parser treats a two fields.
>
> > On Mar 30, 2017, at 3:09 AM, anil gupta <anilgupt...@gmail.com> wrote:
> >
> > Hi,
> >
> > We are trying load a simple CSV file to a table via CsvBulkLoadTool and
> some of the columns have blank/null value. We are using HDP 2.3 and Phoenix
> 4.4. We are getting following error:
> > 2017-03-29 21:53:34,106 ERROR [main] 
> > org.apache.phoenix.mapreduce.CsvToKeyValueMapper:
> Error on record [45056, 82851, Both, Deal.com, 23, MODERNFHICKORY, '', '',
> Internal API, 2017-03-19 21:56:39.0, Tim , 2016-02-25 07:53:05.0]:
> java.sql.SQLException: ERROR 201 (22000): Illegal data.
> >
> > Isn't there a way to handle blank or null value in input dataset while
> using CsvBulkLoadTool? I have looked at documentation but i am unable to
> find a solution for this.
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
>
>


-- 
Thanks & Regards,
Anil Gupta


ERROR 201 (22000): Unable to load CSV files using CsvBulkLoadTool due to blank columns

2017-03-30 Thread anil gupta
Hi,

We are trying load a simple CSV file to a table via CsvBulkLoadTool and
some of the columns have blank/null value. We are using HDP 2.3 and Phoenix
4.4. We are getting following error:
2017-03-29 21:53:34,106 ERROR [main]
org.apache.phoenix.mapreduce.CsvToKeyValueMapper: Error on record [45056,
82851, Both, Deal.com, 23, MODERNFHICKORY, '', '', Internal API, 2017-03-19
21:56:39.0, Tim , 2016-02-25 07:53:05.0]: java.sql.SQLException: ERROR 201
(22000): Illegal data.

Isn't there a way to handle blank or null value in input dataset while
using CsvBulkLoadTool? I have looked at documentation but i am unable to
find a solution for this.

-- 
Thanks & Regards,
Anil Gupta


MultipleInput in Phoenix mapreduce job

2017-03-24 Thread Anil
Hi,

I have two table called PERSON and PERSON_DETAIL. i need to populate the of
the person Detail info into Person record.

Does phoenix map reduce support Multiple mappers from multiple tables
through MultipleInput ?

Currently i am populating consolidated details information into a temporary
table and each execute a sql query to get the details info to populate into
Person record in Person table.

and this approach is taking little more time.

So you suggest any better approach ?

Thanks


Re: Phoenix4.8+ support for HBase(1.2+) on EMR 5.x

2017-02-06 Thread anil gupta
Thanks Zach. Seems like BigTop already has Phoenix4.9. I'll probably need
to talk to EMR team.

On Mon, Feb 6, 2017 at 5:13 PM, York, Zach <zy...@amazon.com> wrote:

> EMR internally manages the versions of Phoenix. If you are interested in
> what version Bigtop ships with, you can find it here:
> https://github.com/apache/bigtop/blob/master/bigtop.bom#L323
>
>
>
> *From: *anil gupta <anilgupt...@gmail.com>
> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Date: *Monday, February 6, 2017 at 4:22 PM
> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Subject: *Re: Phoenix4.8+ support for HBase(1.2+) on EMR 5.x
>
>
>
> It seems like Phoenix version is mentioned here in Bigtop:
> https://github.com/apache/bigtop/blob/2b0d4a56fdf8a2427470c3fa454bb1
> 8bd173884b/pom.xml#L54
>
>
>
> On Mon, Feb 6, 2017 at 4:19 PM, anil gupta <anilgupt...@gmail.com> wrote:
>
> Hi Folks,
>
> I have been using EMR 5.x(http://docs.aws.amazon.
> com//emr/latest/ReleaseGuide/emr-release-components.html
> <http://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html>),
> it ships with HBase1.2.3 and Phoenix4.7.
>
> As per maven repo(https://mvnrepository.com/artifact/org.apache.
> phoenix/phoenix), Phoenix4.7 does not support HBase1.2.x. As per my
> understanding EMR is based on Apache BigTop.
>
> I would like to know whether Phoenix community is responsible to update
> the version of Phoenix in BigTop or its the EMR team that controls it
> internally? And how do i check the current version of Phoenix in BigTop?
>
> Also, what are known issues of using Phoenix4.7 with HBase1.2.3?
>
>
> --
>
> Thanks & Regards,
> Anil Gupta
>
>
>
>
> --
>
> Thanks & Regards,
> Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta


Phoenix4.8+ support for HBase(1.2+) on EMR 5.x

2017-02-06 Thread anil gupta
Hi Folks,

I have been using EMR 5.x(
http://docs.aws.amazon.com//emr/latest/ReleaseGuide/emr-release-components.html),
it ships with HBase1.2.3 and Phoenix4.7.
As per maven repo(
https://mvnrepository.com/artifact/org.apache.phoenix/phoenix), Phoenix4.7
does not support HBase1.2.x. As per my understanding EMR is based on Apache
BigTop.
I would like to know whether Phoenix community is responsible to update the
version of Phoenix in BigTop or its the EMR team that controls it
internally? And how do i check the current version of Phoenix in BigTop?
Also, what are known issues of using Phoenix4.7 with HBase1.2.3?

-- 
Thanks & Regards,
Anil Gupta


Phoenix mapreduce

2017-01-31 Thread Anil
Hello,

I have phoenix table which have both child and parent records.
now i have created a phoenix mapreduce job to populate few columns of
parent record into child record.

Two ways of populating parent columns into child record are

1.
a. Get the parent columns information by phoenix query for each child
record in mapper.
b. Set number of reducers to zero

2.
a. Group by the records by parent id (which is available in both parent and
child records). it mean use parent id as key of mapper output and record as
value of mapper output
b. populate parent coulmns information into child record in reducer.

I tried #1 and always see container memory insufficient error or GC
overhead error.

What is the recommended approach ? thanks for your help.

Thanks.


Re: Index in Phoenix view on Hbase is not updated

2016-10-23 Thread anil gupta
Hi MIch,

I would recommend you to use Phoenix API/Tools to write data to a Phoenix
table so that it can handle secondary index seamlessly. Your approach of
**Rebuilding** index after every bulkload will run into scalability
problems as your primary table keeps growing.

~Anil

On Sat, Oct 22, 2016 at 11:22 AM, Mich Talebzadeh <mich.talebza...@gmail.com
> wrote:

> A workout I deployed was to rebuild the index immediately after bulk load
> of data into Hbase table
>
> ALTER INDEX MARKETDATAHBASE_IDX1 ON "marketDataHbase" REBUILD;
>
>
>
> Dr Mich Talebzadeh
>
>
>
> LinkedIn * 
> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>
>
>
> http://talebzadehmich.wordpress.com
>
>
> *Disclaimer:* Use it at your own risk. Any and all responsibility for any
> loss, damage or destruction of data or any other property which may arise
> from relying on this email's technical content is explicitly disclaimed.
> The author will in no case be liable for any monetary damages arising from
> such loss, damage or destruction.
>
>
>
> On 22 October 2016 at 18:25, Mich Talebzadeh <mich.talebza...@gmail.com>
> wrote:
>
>> Sorry Ted,
>>
>> This is the syntax for view
>>
>> create view "marketDataHbase" (PK VARCHAR PRIMARY KEY,
>> “price_info”.”ticker” VARCHAR,"price_info"."timecreated" VARCHAR,
>> "price_info"."price" VARCHAR);
>>
>> Thanks James for clarification.
>>
>> My understanding is that when one creates an index on a Phoenix view on
>> an Hbase table,  a local index file is created in Phoenix with data as is
>> and that Phoenix table has no way of knowing if new data is added to Hbase
>> table.
>>
>> From an operational point of view unless index in Phoenix is immediately
>> updated after any append to Hbase, then it is pretty useless.
>>
>> In my case data is inserted to Hbase table. I am just using Phoenix for
>> data queries (DQ) as opposed to inserts.
>>
>> Regards,
>>
>>
>>
>>
>>
>>
>>
>> Dr Mich Talebzadeh
>>
>>
>>
>> LinkedIn * 
>> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>
>>
>>
>> http://talebzadehmich.wordpress.com
>>
>>
>> *Disclaimer:* Use it at your own risk. Any and all responsibility for
>> any loss, damage or destruction of data or any other property which may
>> arise from relying on this email's technical content is explicitly
>> disclaimed. The author will in no case be liable for any monetary damages
>> arising from such loss, damage or destruction.
>>
>>
>>
>> On 22 October 2016 at 17:59, James Taylor <jamestay...@apache.org> wrote:
>>
>>> Hi Mich,
>>> Phoenix indexes are only updated if you use Phoenix APIs to input the
>>> data.
>>> Thanks,
>>> James
>>>
>>>
>>> On Saturday, October 22, 2016, Ted Yu <yuzhih...@gmail.com> wrote:
>>>
>>>> The first statement creates index, not view.
>>>>
>>>> Can you check ?
>>>>
>>>> Cheers
>>>>
>>>> > On Oct 22, 2016, at 1:51 AM, Mich Talebzadeh <
>>>> mich.talebza...@gmail.com> wrote:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I have a Hbase table that is populated via
>>>> > org.apache.hadoop.hbase.mapreduce.ImportTsv
>>>> > through bulk load ever 15 minutes. This works fine.
>>>> >
>>>> > In Phoenix I created a view on this table
>>>> >
>>>> > jdbc:phoenix:rhes564:2181> create index marketDataHbase_idx on
>>>> > "marketDataHbase" ("price_info"."ticker", "price_info"."price",
>>>> > "price_info"."timecreated");
>>>> >
>>>> > This also does what is supposed to do and shows correct count.
>>>> >
>>>> > I then created an index in Phoenix as below
>>>> >
>>>> > create index index_dx1 on "marketDataHbase"
>>>> > ("price_info"."timecreated","price_info"."ticker",
>>>> "price_info"."price");
>>>> >
>>&g

Re: Load into Phoenix table via CsvBulkLoadTool cannot find table and fails

2016-10-23 Thread anil gupta
I am not sure why you are creating underlying HBase tables. If you create
table in Phoenix, it will create HBase table automatically with correct
name.
If you are using Phoenix, i would recommend you to let Phoenix handle the
interaction with HBase.

On Sun, Oct 23, 2016 at 9:26 AM, Mich Talebzadeh <mich.talebza...@gmail.com>
wrote:

> Thanks gents
>
> I dropped and recreated the table name and columns in UPPERCASE as follows:
>
> create table DUMMY (PK VARCHAR PRIMARY KEY, PRICE_INFO.TICKER VARCHAR,
> PRICE_INFO.TIMECREATED VARCHAR, PRICE_INFO.PRICE VARCHAR);
>
> and used this command as below passing table name in UPPERCASE as well
>
> HADOOP_CLASSPATH=/home/hduser/jars/hbase-protocol-1.2.3.jar:/usr/lib/hbase/conf
> hadoop jar /usr/lib/hbase/lib/phoenix-4.8.1-HBase-1.2-client.jar
> org.apache.phoenix.mapreduce.CsvBulkLoadTool --table DUMMY --input
> /data/prices/2016-10-23/prices.1477228923115
>
> and this worked!
>
> 2016-10-23 17:20:33,089 INFO  [main] mapreduce.AbstractBulkLoadTool:
> Incremental load complete for table=DUMMY
> 2016-10-23 17:20:33,089 INFO  [main] mapreduce.AbstractBulkLoadTool:
> Removing output directory /tmp/261410fb-14d5-49fc-a717-dd0469db1673
>
> It will be helpful if documentation is updated to refelect this.
>
> So bottom line I create Phoenix tables and columns on Hbase tables
> UPPERCASE regardless of case of underlying Hbase table?
>
> Thanks
>
>
> Dr Mich Talebzadeh
>
>
>
> LinkedIn * 
> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>
>
>
> http://talebzadehmich.wordpress.com
>
>
> *Disclaimer:* Use it at your own risk. Any and all responsibility for any
> loss, damage or destruction of data or any other property which may arise
> from relying on this email's technical content is explicitly disclaimed.
> The author will in no case be liable for any monetary damages arising from
> such loss, damage or destruction.
>
>
>
> On 23 October 2016 at 17:10, anil gupta <anilgupt...@gmail.com> wrote:
>
>> Hi Mich,
>>
>> Its recommended to use upper case for table and column name so that you
>> dont to explicitly quote table and column names.
>>
>> ~Anil
>>
>>
>>
>> On Sun, Oct 23, 2016 at 9:07 AM, Ravi Kiran <maghamraviki...@gmail.com>
>> wrote:
>>
>>> Sorry, I meant to say table names are case sensitive.
>>>
>>> On Sun, Oct 23, 2016 at 9:06 AM, Ravi Kiran <maghamraviki...@gmail.com>
>>> wrote:
>>>
>>>> Hi Mich,
>>>>Apparently, the tables are case sensitive. Since you have enclosed a
>>>> double quote when creating the table, please pass the same when running the
>>>> bulk load job.
>>>>
>>>> HADOOP_CLASSPATH=/home/hduser/jars/hbase-protocol-1.2.3.jar:/usr/lib/hbase/conf
>>>> hadoop jar phoenix-4.8.1-HBase-1.2-client.jar
>>>> org.apache.phoenix.mapreduce.CsvBulkLoadTool --table "dummy" --input
>>>> /data/prices/2016-10-23/prices.1477228923115
>>>>
>>>> Regards
>>>>
>>>>
>>>> On Sun, Oct 23, 2016 at 8:39 AM, Mich Talebzadeh <
>>>> mich.talebza...@gmail.com> wrote:
>>>>
>>>>> Not sure whether phoenix-4.8.1-HBase-1.2-client.jar is the correct
>>>>> jar file?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Dr Mich Talebzadeh
>>>>>
>>>>>
>>>>>
>>>>> LinkedIn * 
>>>>> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>>>>> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>>>>
>>>>>
>>>>>
>>>>> http://talebzadehmich.wordpress.com
>>>>>
>>>>>
>>>>> *Disclaimer:* Use it at your own risk. Any and all responsibility for
>>>>> any loss, damage or destruction of data or any other property which may
>>>>> arise from relying on this email's technical content is explicitly
>>>>> disclaimed. The author will in no case be liable for any monetary damages
>>>>> arising from such loss, damage or destruction.
>>>>>
>>>>>
>>>>>
>>>>> On 23 October 2016 at 15:39, Mich Talebzadeh <
>>>>> mich.talebza...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
&

Re: Load into Phoenix table via CsvBulkLoadTool cannot find table and fails

2016-10-23 Thread anil gupta
Hi Mich,

Its recommended to use upper case for table and column name so that you
dont to explicitly quote table and column names.

~Anil



On Sun, Oct 23, 2016 at 9:07 AM, Ravi Kiran <maghamraviki...@gmail.com>
wrote:

> Sorry, I meant to say table names are case sensitive.
>
> On Sun, Oct 23, 2016 at 9:06 AM, Ravi Kiran <maghamraviki...@gmail.com>
> wrote:
>
>> Hi Mich,
>>Apparently, the tables are case sensitive. Since you have enclosed a
>> double quote when creating the table, please pass the same when running the
>> bulk load job.
>>
>> HADOOP_CLASSPATH=/home/hduser/jars/hbase-protocol-1.2.3.jar:/usr/lib/hbase/conf
>> hadoop jar phoenix-4.8.1-HBase-1.2-client.jar
>> org.apache.phoenix.mapreduce.CsvBulkLoadTool --table "dummy" --input
>> /data/prices/2016-10-23/prices.1477228923115
>>
>> Regards
>>
>>
>> On Sun, Oct 23, 2016 at 8:39 AM, Mich Talebzadeh <
>> mich.talebza...@gmail.com> wrote:
>>
>>> Not sure whether phoenix-4.8.1-HBase-1.2-client.jar is the correct jar
>>> file?
>>>
>>> Thanks
>>>
>>> Dr Mich Talebzadeh
>>>
>>>
>>>
>>> LinkedIn * 
>>> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>>> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>>
>>>
>>>
>>> http://talebzadehmich.wordpress.com
>>>
>>>
>>> *Disclaimer:* Use it at your own risk. Any and all responsibility for
>>> any loss, damage or destruction of data or any other property which may
>>> arise from relying on this email's technical content is explicitly
>>> disclaimed. The author will in no case be liable for any monetary damages
>>> arising from such loss, damage or destruction.
>>>
>>>
>>>
>>> On 23 October 2016 at 15:39, Mich Talebzadeh <mich.talebza...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> My stack
>>>>
>>>> Hbase: hbase-1.2.3
>>>> Phoenix: apache-phoenix-4.8.1-HBase-1.2-bin
>>>>
>>>>
>>>> As a suggestion I tried to load an Hbase file via
>>>> org.apache.phoenix.mapreduce.CsvBulkLoadTool
>>>>
>>>> So
>>>>
>>>> I created a dummy table in Hbase as below
>>>>
>>>> create 'dummy', 'price_info'
>>>>
>>>> Then in Phoenix I created a table on Hbase table
>>>>
>>>>
>>>> create table "dummy" (PK VARCHAR PRIMARY KEY, "price_info"."ticker"
>>>> VARCHAR,"price_info"."timecreated" VARCHAR, "price_info"."price"
>>>> VARCHAR);
>>>>
>>>> And then used the following comman to load the csv file
>>>>
>>>>  
>>>> HADOOP_CLASSPATH=/home/hduser/jars/hbase-protocol-1.2.3.jar:/usr/lib/hbase/conf
>>>> hadoop jar phoenix-4.8.1-HBase-1.2-client.jar
>>>> org.apache.phoenix.mapreduce.CsvBulkLoadTool --table dummy --input
>>>> /data/prices/2016-10-23/prices.1477228923115
>>>>
>>>> However, it does not seem to find the table dummy !
>>>>
>>>> 2016-10-23 14:38:39,442 INFO  [main] metrics.Metrics: Initializing
>>>> metrics system: phoenix
>>>> 2016-10-23 14:38:39,479 INFO  [main] impl.MetricsConfig: loaded
>>>> properties from hadoop-metrics2.properties
>>>> 2016-10-23 14:38:39,529 INFO  [main] impl.MetricsSystemImpl: Scheduled
>>>> snapshot period at 10 second(s).
>>>> 2016-10-23 14:38:39,529 INFO  [main] impl.MetricsSystemImpl: phoenix
>>>> metrics system started
>>>> Exception in thread "main" java.lang.IllegalArgumentException: Table
>>>> DUMMY not found
>>>> at org.apache.phoenix.util.SchemaUtil.generateColumnInfo(Schema
>>>> Util.java:873)
>>>> at org.apache.phoenix.mapreduce.AbstractBulkLoadTool.buildImpor
>>>> tColumns(AbstractBulkLoadTool.java:377)
>>>> at org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(A
>>>> bstractBulkLoadTool.java:214)
>>>> at org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(Abstra
>>>> ctBulkLoadTool.java:183)
>>>> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>>>> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
>>>>

Re: Region start row and end row

2016-10-18 Thread Anil
after spending some time on Phoenix map reduce, i was able to get the
phoenix input splits for given sql query.

As query plan and phoenix input split are not Serializable, i am not able
to use them directly for ignite load.

Was there any way to read using scan on phoenix table  (not on hbase
table)?

Thanks.


On 13 October 2016 at 15:13, Anil <anilk...@gmail.com> wrote:

> HI Cheyenne*,*
>
> Thank you very much.
>
> Load cannot be done in parallel with one jdbc connection. To make it
> parallel, each node must read a set of records
>
> Following is my approach.
>
> 1. Create Cluster wide singleton distributed custom service
>
> 2. Get all region(s) information (for each records has be to read) in the
> init() method of custom service
>
> 3. Broadcast region(s) using ignite.compute().call() in execute() method
> of custom service. so that each node reads a region data.
>
> 4. Scan a particular region (with start row and end row) using scan query
> and load into cache
>
>
> Hope this give clear idea.
>
>
> Please let me know if you have any questions.
>
>
> Thanks.
>
>
>
>
> On 13 October 2016 at 13:34, Cheyenne Forbes <cheyenne.osanu.forbes@gmail.
> com> wrote:
>
>> Check out this post for loading data from MySQL to Ignite
>> https://dzone.com/articles/apache-ignite-how-to-read-data-
>> from-persistent-sto
>>
>> and this one (recommended) on how to UPSERT to Phoenix on Ignite PUT...
>> *delete, etc.*
>> https://apacheignite.readme.io/docs/persistent-store#cachestore-example
>>
>> Just replace the MySQL things with Phoenix things (eg. the JDBC driver,
>> INSERT to UPSERT, etc.). If after reading you still have issues, feel free
>> ask in this thread for more help
>>
>
>


Re: Region start row and end row

2016-10-13 Thread Anil
HI Cheyenne*,*

Thank you very much.

Load cannot be done in parallel with one jdbc connection. To make it
parallel, each node must read a set of records

Following is my approach.

1. Create Cluster wide singleton distributed custom service

2. Get all region(s) information (for each records has be to read) in the
init() method of custom service

3. Broadcast region(s) using ignite.compute().call() in execute() method of
custom service. so that each node reads a region data.

4. Scan a particular region (with start row and end row) using scan query
and load into cache


Hope this give clear idea.


Please let me know if you have any questions.


Thanks.




On 13 October 2016 at 13:34, Cheyenne Forbes <
cheyenne.osanu.for...@gmail.com> wrote:

> Check out this post for loading data from MySQL to Ignite
> https://dzone.com/articles/apache-ignite-how-to-read-
> data-from-persistent-sto
>
> and this one (recommended) on how to UPSERT to Phoenix on Ignite PUT...
> *delete, etc.*
> https://apacheignite.readme.io/docs/persistent-store#cachestore-example
>
> Just replace the MySQL things with Phoenix things (eg. the JDBC driver,
> INSERT to UPSERT, etc.). If after reading you still have issues, feel free
> ask in this thread for more help
>


Re: Region start row and end row

2016-10-13 Thread Anil
Apache Ignite.

On 13 October 2016 at 12:05, Cheyenne Forbes <
cheyenne.osanu.for...@gmail.com> wrote:

> May I ask which in memory db are you using?
>


Re: Region start row and end row

2016-10-13 Thread Anil
You are correct. Not all the data.. but with specific start row and end row.

Thanks.

On 13 October 2016 at 11:39, Cheyenne Forbes <
cheyenne.osanu.for...@gmail.com> wrote:

> Hi Anil,
>
> Basically what you want to do is copy all the data you had input with
> Phoenix to your in memory db?
>


Re: Region start row and end row

2016-10-12 Thread Anil
Do you have any inputs ?

On 12 October 2016 at 15:45, Anil <anilk...@gmail.com> wrote:

> HI,
>
> I am trying to load Phoenix data into In-Memory DB.
>
> Is there any way to get the regions information (start row and end row) of
> a table based on a column of composite primary key ? So that data will be
> loaded into in-memory in parallel.
>
> Are there any better approaches for the same ?
>
> Thanks
>


Re: Bulk dataload and dynamic columns

2016-10-07 Thread anil gupta
I dont think that feature is supported yet in bulk load tool.

On Thu, Oct 6, 2016 at 9:55 PM, Sanooj Padmakumar <p.san...@gmail.com>
wrote:

> Hi All,
>
> Can we populate dynamic columns as well while bulk loading data (
> https://phoenix.apache.org/bulk_dataload.html) into Hbase using Phoenix
> ?  It didn't work when we tried and hence posting it here. Thanks in advance
>
> --
> Thanks,
> Sanooj Padmakumar
>



-- 
Thanks & Regards,
Anil Gupta


Re: java.util.ConcurrentModificationException at java.util.HashMap while doing Upserts

2016-10-02 Thread anil gupta
Thanks for quick response. James. I'll try out some stuff.

On Sun, Oct 2, 2016 at 5:00 PM, James Taylor <jamestay...@apache.org> wrote:

> Option #2 is fine. Connections are cheap in Phoenix.
>
>
> On Sunday, October 2, 2016, anil gupta <anilgupt...@gmail.com> wrote:
>
>> Hi James,
>>
>> There is a high possibility that we might be sharing connection among
>> multiple threads. This MR job is fairly complicated because we spin up a
>> separate thread(to kill the download if it doesnt completes in a
>> prespecified time.) within Mapper to perform image downloads from internet.
>> #1. One solution would be to make the method that is doing upsert to
>> synchronize on connection(or PreparedStatement object). We dont write at a
>> very high throughput to Phoenix table coz it only logs errors. What do you
>> think about that?
>>
>> #2. I will need to create a connection in every thread. But, AFAIK,
>> creating connection everytime and then the PreparedStatement is expensive.
>> Right?
>>
>> Please let me know if there is any other better approach that i am
>> missing.
>>
>> On Sun, Oct 2, 2016 at 3:50 PM, James Taylor <jamestay...@apache.org>
>> wrote:
>>
>>> Hi Anil,
>>> Make sure you're not sharing the same Connection between multiple
>>> threads as it's not thread safe.
>>> Thanks,
>>> James
>>>
>>>
>>> On Sunday, October 2, 2016, anil gupta <anilgupt...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> We are running HDP2.3.4(HBase 1.1 and Phoenix 4.4). I have a MapReduce
>>>> job thats writing data to a very simple Phoenix table. We intermittently
>>>> get and due to this our job fails:
>>>> java.util.ConcurrentModificationException at
>>>> java.util.HashMap$HashIterator.remove(HashMap.java:944) at
>>>> org.apache.phoenix.execute.MutationState.commit(MutationState.java:472)
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:461)
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:458)
>>>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
>>>> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:458)
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:308)
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297)
>>>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
>>>> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295)
>>>> at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeUpda
>>>> te(PhoenixPreparedStatement.java:200)
>>>>
>>>> We are running these upserts as part of code in Mapper that executes as
>>>> part of ChainReducer. One problem i noticed that we were instantiating
>>>> PreparedStatment everytime(conn == Connection object) we were doing an
>>>> upsert :
>>>>
>>>> conn.prepareStatement(TcErrorWritable.buildUpsertNewRowStatement(TC_DOWNLOAD_ERRORS_TABLE));
>>>>
>>>> This is the only line that seems awkward to me in that code. We have
>>>> other projects writing to Phoenix at a much higher throughput and volume of
>>>> data but we never ran into this problem. Can anyone provide me more details
>>>> on why we are getting ConcurrentModificationException while doing
>>>> upserts?
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Anil Gupta
>>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: java.util.ConcurrentModificationException at java.util.HashMap while doing Upserts

2016-10-02 Thread anil gupta
Hi James,

There is a high possibility that we might be sharing connection among
multiple threads. This MR job is fairly complicated because we spin up a
separate thread(to kill the download if it doesnt completes in a
prespecified time.) within Mapper to perform image downloads from internet.
#1. One solution would be to make the method that is doing upsert to
synchronize on connection(or PreparedStatement object). We dont write at a
very high throughput to Phoenix table coz it only logs errors. What do you
think about that?

#2. I will need to create a connection in every thread. But, AFAIK,
creating connection everytime and then the PreparedStatement is expensive.
Right?

Please let me know if there is any other better approach that i am missing.

On Sun, Oct 2, 2016 at 3:50 PM, James Taylor <jamestay...@apache.org> wrote:

> Hi Anil,
> Make sure you're not sharing the same Connection between multiple threads
> as it's not thread safe.
> Thanks,
> James
>
>
> On Sunday, October 2, 2016, anil gupta <anilgupt...@gmail.com> wrote:
>
>> Hi,
>>
>> We are running HDP2.3.4(HBase 1.1 and Phoenix 4.4). I have a MapReduce
>> job thats writing data to a very simple Phoenix table. We intermittently
>> get and due to this our job fails:
>> java.util.ConcurrentModificationException at
>> java.util.HashMap$HashIterator.remove(HashMap.java:944) at
>> org.apache.phoenix.execute.MutationState.commit(MutationState.java:472)
>> at 
>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:461)
>> at 
>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:458)
>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
>> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:458)
>> at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:308)
>> at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297)
>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
>> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295)
>> at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeUpda
>> te(PhoenixPreparedStatement.java:200)
>>
>> We are running these upserts as part of code in Mapper that executes as
>> part of ChainReducer. One problem i noticed that we were instantiating
>> PreparedStatment everytime(conn == Connection object) we were doing an
>> upsert :
>>
>> conn.prepareStatement(TcErrorWritable.buildUpsertNewRowStatement(TC_DOWNLOAD_ERRORS_TABLE));
>>
>> This is the only line that seems awkward to me in that code. We have
>> other projects writing to Phoenix at a much higher throughput and volume of
>> data but we never ran into this problem. Can anyone provide me more details
>> on why we are getting ConcurrentModificationException while doing
>> upserts?
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>


-- 
Thanks & Regards,
Anil Gupta


java.util.ConcurrentModificationException at java.util.HashMap while doing Upserts

2016-10-02 Thread anil gupta
Hi,

We are running HDP2.3.4(HBase 1.1 and Phoenix 4.4). I have a MapReduce job
thats writing data to a very simple Phoenix table. We intermittently get
and due to this our job fails:
java.util.ConcurrentModificationException at
java.util.HashMap$HashIterator.remove(HashMap.java:944) at
org.apache.phoenix.execute.MutationState.commit(MutationState.java:472) at
org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:461)
at
org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:458)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:458)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:308)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295)
at
org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeUpdate(PhoenixPreparedStatement.java:200)


We are running these upserts as part of code in Mapper that executes as
part of ChainReducer. One problem i noticed that we were instantiating
PreparedStatment everytime(conn == Connection object) we were doing an
upsert :

conn.prepareStatement(TcErrorWritable.buildUpsertNewRowStatement(TC_DOWNLOAD_ERRORS_TABLE));

This is the only line that seems awkward to me in that code. We have other
projects writing to Phoenix at a much higher throughput and volume of data
but we never ran into this problem. Can anyone provide me more details on
why we are getting ConcurrentModificationException while doing upserts?

-- 
Thanks & Regards,
Anil Gupta


Re: Full text query in Phoenix

2016-09-18 Thread anil gupta
IMO, you should not use HBase or anyone other Database for full text query.
You should look into using search engines like Solr, Elastic Search, etc
for implementing full text search/query.

On Sun, Sep 18, 2016 at 7:10 AM, Cheyenne Forbes <
cheyenne.osanu.for...@gmail.com> wrote:

> Hi James,
>
> I found this for Hbase
> https://issues.apache.org/jira/browse/HBASE-3529
>
> its patch that can be added to hbase based on what I am seeing
>



-- 
Thanks & Regards,
Anil Gupta


Re: Joins dont work

2016-09-18 Thread anil gupta
Maybe this might help you:
https://issues.apache.org/jira/browse/PHOENIX-1531

It seems like a classpath problem in your setup.

On Sat, Sep 17, 2016 at 2:14 PM, Cheyenne Forbes <
cheyenne.osanu.for...@gmail.com> wrote:

> does anyone have an idea whats causing this?
>



-- 
Thanks & Regards,
Anil Gupta


Re: Decode rowkey

2016-09-16 Thread Anil
HI,

Please use the attached utils. let me know if you see any issue. thanks.

Regards,
Anil



On 16 September 2016 at 22:45, Krishna <research...@gmail.com> wrote:

> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple
> columns) and in ImmutableBytesRow format to split into primary key columns?
> I am performing a scan directly from HBase and would like to convert the
> rowkey into column values. We used Phoenix standard JDBC API while writing
> to the table.
>
> Thanks
>


GenericPDatum.java
Description: Binary data


PhoenixUtils.java
Description: Binary data


Re: Extracting column values from Phoenix composite primary key

2016-09-01 Thread Anil
Thanks James.

I am able to extract columns using row schema.



On 31 August 2016 at 02:50, James Taylor <jamestay...@apache.org> wrote:

> Anil,
> Phoenix's API is JDBC, so just be aware that you're embarking on usage of
> unsupported and mostly undocumented APIs. Not to say they will change, but
> they can and might. It'll require you looking at source code, running it in
> a debugger, and some trial and error to use these.
>
> For walking through a byte[] row key to get the primary key column values,
> use RowKeySchema and in particular the iterator methods. Lots of examples
> in the code. You can access the RowKeySchema from PTable which is the
> object representation of a table in Phoenix.
>
> For the inverse, building the byte[] of a row key, just use the UPSERT
> VALUES statement where you're setting the value of all primary key columns.
> Then you can use the PhoenixRuntime.getUncommittedDataIterator() call to
> get the List that will be sent to the server (afterward you can
> do a connection.rollback()).
>
> HTH. Thanks,
>
> James
>
> On Tue, Aug 30, 2016 at 1:49 PM, Michael McAllister <
> mmcallis...@homeaway.com> wrote:
>
>> Not yet sorry.
>>
>>
>>
>> Michael McAllister
>>
>> Staff Data Warehouse Engineer | Decision Systems
>>
>> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
>> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>>
>> This electronic communication (including any attachment) is
>> confidential.  If you are not an intended recipient of this communication,
>> please be advised that any disclosure, dissemination, distribution, copying
>> or other use of this communication or any attachment is strictly
>> prohibited.  If you have received this communication in error, please
>> notify the sender immediately by reply e-mail and promptly destroy all
>> electronic and printed copies of this communication and any attachment.
>>
>>
>>
>> *From: *Anil <anilk...@gmail.com>
>> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
>> *Date: *Monday, August 29, 2016 at 9:48 PM
>>
>> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
>> *Subject: *Re: Extracting column values from Phoenix composite primary
>> key
>>
>>
>>
>> HI Michael and All ,
>>
>>
>>
>> Did you get a chance to look into this ? Thanks.
>>
>>
>>
>>
>>
>> Thanks.
>>
>>
>>
>>
>>
>> On 26 August 2016 at 07:38, Anil <anilk...@gmail.com> wrote:
>>
>> HI Michael,
>>
>>
>>
>> Following the table create and upsert query -
>>
>>
>>
>> CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
>> VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
>> NOT NULL, TARGET VARCHAR,"cf".ID VARCHAR, CONSTRAINT pk PRIMARY
>> KEY(TYPE,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
>> 'SNAPPY';
>>
>>
>>
>> upsert into SAMPLE(TYPE, SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET,
>> ID) values('test', 'src', 'label', 'direction', 134424245, 'target', 'id');
>>
>> .
>>
>> Thanks
>>
>>
>>
>>
>>
>> On 25 August 2016 at 20:50, Michael McAllister <mmcallis...@homeaway.com>
>> wrote:
>>
>> Can you please provide the sample rowkey? It is blank in your email
>> below. Alternatively, an UPSERT VALUES statement I can use to insert a row
>> that I can work with myself.
>>
>>
>>
>> Michael McAllister
>>
>> Staff Data Warehouse Engineer | Decision Systems
>>
>> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
>> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>>
>> This electronic communication (including any attachment) is
>> confidential.  If you are not an intended recipient of this communication,
>> please be advised that any disclosure, dissemination, distribution, copying
>> or other use of this communication or any attachment is strictly
>> prohibited.  If you have received this communication in error, please
>> notify the sender immediately by reply e-mail and promptly destroy all
>> electronic and printed copies of this communication and any attachment.
>>
>>
>>
>> *From: *Anil <anilk...@gmail.com>
>> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
>> *Date: *Thursday, August 25, 2016 at

Re: Extracting column values from Phoenix composite primary key

2016-08-29 Thread Anil
HI Michael and All ,

Did you get a chance to look into this ? Thanks.


Thanks.


On 26 August 2016 at 07:38, Anil <anilk...@gmail.com> wrote:

> HI Michael,
>
> Following the table create and upsert query -
>
> CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
> VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
> NOT NULL, TARGET VARCHAR,"cf".ID VARCHAR, CONSTRAINT pk PRIMARY
> KEY(TYPE,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
> 'SNAPPY';
>
> upsert into SAMPLE(TYPE, SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET,
> ID) values('test', 'src', 'label', 'direction', 134424245, 'target', 'id');
> .
> Thanks
>
>
> On 25 August 2016 at 20:50, Michael McAllister <mmcallis...@homeaway.com>
> wrote:
>
>> Can you please provide the sample rowkey? It is blank in your email
>> below. Alternatively, an UPSERT VALUES statement I can use to insert a row
>> that I can work with myself.
>>
>>
>>
>> Michael McAllister
>>
>> Staff Data Warehouse Engineer | Decision Systems
>>
>> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
>> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>>
>> This electronic communication (including any attachment) is
>> confidential.  If you are not an intended recipient of this communication,
>> please be advised that any disclosure, dissemination, distribution, copying
>> or other use of this communication or any attachment is strictly
>> prohibited.  If you have received this communication in error, please
>> notify the sender immediately by reply e-mail and promptly destroy all
>> electronic and printed copies of this communication and any attachment.
>>
>>
>>
>> *From: *Anil <anilk...@gmail.com>
>> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
>> *Date: *Thursday, August 25, 2016 at 10:08 AM
>> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
>> *Subject: *Re: Extracting column values from Phoenix composite primary
>> key
>>
>>
>>
>> HI Michael,
>>
>>
>>
>> Table create statement :
>>
>>
>>
>> CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
>> VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
>> NOT NULL, TARGET VARCHAR,"CF".ID VARCHAR,CONSTRAINT PK PRIMARY
>> KEY(TYPE,,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
>> 'SNAPPY'
>>
>>
>>
>> No salt buckets defined.
>>
>>
>>
>> Smaple table row key -
>>
>>
>>
>> byte[] startRow = ByteUtil.concat(PVarchar.INSTANCE.toBytes("test"),
>>
>> QueryConstants.SEPARATOR_BYTE_ARRAY,
>>
>> PVarchar.INSTANCE.toBytes("src"),
>>
>> QueryConstants.SEPARATOR_BYTE_ARRAY,
>>
>> PVarchar.INSTANCE.toBytes("label"),
>>
>> QueryConstants.SEPARATOR_BYTE_ARRAY,
>>
>> PVarchar.INSTANCE.toBytes("direction"),
>>
>> QueryConstants.SEPARATOR_BYTE_ARRAY,
>>
>> PUnsignedLong.INSTANCE.toBytes(1235464603853L),
>>
>> PVarchar.INSTANCE.toBytes("target"));
>>
>>
>>
>> i am trying to extract TARGET column. Thanks.
>>
>>
>>
>> Regards,
>>
>> Anil
>>
>>
>>
>> On 25 August 2016 at 19:29, Michael McAllister <mmcallis...@homeaway.com>
>> wrote:
>>
>> Can you provide an example of one of the rowkeys, the values you are
>> expecting out of it, and the full table definition? Of importance in the
>> table definition will be whether you have salt buckets defined.
>>
>>
>>
>> Michael McAllister
>>
>> Staff Data Warehouse Engineer | Decision Systems
>>
>> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
>> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>>
>> This electronic communication (including any attachment) is
>> confidential.  If you are not an intended recipient of this communication,
>> please be advised that any disclosure, dissemination, distribution, copying
>> or other use of this communication or any attachment is strictly
>> prohibited.  If you have received this communication in error, please
>> notify the sender immediately by reply e-mail and promptly destroy all
>> electronic and printed copies of this communication and any attachment.
>>
>>
>>
>> *From: *Anil <

Re: Extracting column values from Phoenix composite primary key

2016-08-25 Thread Anil
HI Michael,

Following the table create and upsert query -

CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
NOT NULL, TARGET VARCHAR,"cf".ID VARCHAR, CONSTRAINT pk PRIMARY
KEY(TYPE,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
'SNAPPY';

upsert into SAMPLE(TYPE, SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET, ID)
values('test', 'src', 'label', 'direction', 134424245, 'target', 'id');
.
Thanks


On 25 August 2016 at 20:50, Michael McAllister <mmcallis...@homeaway.com>
wrote:

> Can you please provide the sample rowkey? It is blank in your email below.
> Alternatively, an UPSERT VALUES statement I can use to insert a row that I
> can work with myself.
>
>
>
> Michael McAllister
>
> Staff Data Warehouse Engineer | Decision Systems
>
> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>
> This electronic communication (including any attachment) is confidential.
> If you are not an intended recipient of this communication, please be
> advised that any disclosure, dissemination, distribution, copying or other
> use of this communication or any attachment is strictly prohibited.  If you
> have received this communication in error, please notify the sender
> immediately by reply e-mail and promptly destroy all electronic and printed
> copies of this communication and any attachment.
>
>
>
> *From: *Anil <anilk...@gmail.com>
> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Date: *Thursday, August 25, 2016 at 10:08 AM
> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Subject: *Re: Extracting column values from Phoenix composite primary key
>
>
>
> HI Michael,
>
>
>
> Table create statement :
>
>
>
> CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
> VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
> NOT NULL, TARGET VARCHAR,"CF".ID VARCHAR,CONSTRAINT PK PRIMARY
> KEY(TYPE,,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
> 'SNAPPY'
>
>
>
> No salt buckets defined.
>
>
>
> Smaple table row key -
>
>
>
> byte[] startRow = ByteUtil.concat(PVarchar.INSTANCE.toBytes("test"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("src"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("label"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("direction"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PUnsignedLong.INSTANCE.toBytes(1235464603853L),
>
> PVarchar.INSTANCE.toBytes("target"));
>
>
>
> i am trying to extract TARGET column. Thanks.
>
>
>
> Regards,
>
> Anil
>
>
>
> On 25 August 2016 at 19:29, Michael McAllister <mmcallis...@homeaway.com>
> wrote:
>
> Can you provide an example of one of the rowkeys, the values you are
> expecting out of it, and the full table definition? Of importance in the
> table definition will be whether you have salt buckets defined.
>
>
>
> Michael McAllister
>
> Staff Data Warehouse Engineer | Decision Systems
>
> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>
> This electronic communication (including any attachment) is confidential.
> If you are not an intended recipient of this communication, please be
> advised that any disclosure, dissemination, distribution, copying or other
> use of this communication or any attachment is strictly prohibited.  If you
> have received this communication in error, please notify the sender
> immediately by reply e-mail and promptly destroy all electronic and printed
> copies of this communication and any attachment.
>
>
>
> *From: *Anil <anilk...@gmail.com>
> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Date: *Thursday, August 25, 2016 at 1:09 AM
> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Subject: *Re: Extracting column values from Phoenix composite primary key
>
>
>
> HI Michael,
>
>
>
> Thank you for the response.
>
>
>
> Unfortunately, that is not working.
>
>
>
> Following is the snippet. one of the column is unsigned long and trying to
> extract the last column (with value target in the below code).
>
> please correct me if i am doing wrong.
>
>
>
>byte SEPARATOR_BYTE = 0;

Re: Extracting column values from Phoenix composite primary key

2016-08-25 Thread Anil
HI Michael,


Table create statement :

CREATE TABLE SAMPLE(TYPE VARCHAR NOT NULL, SOURCE VARCHAR NOT NULL, LABEL
VARCHAR NOT NULL, DIRECTION VARCHAR(10) NOT NULL, REVERSETIME UNSIGNED_LONG
NOT NULL, TARGET VARCHAR,"CF".ID VARCHAR,CONSTRAINT PK PRIMARY
KEY(TYPE,,SOURCE, LABEL, DIRECTION, REVERSETIME, TARGET)) COMPRESSION =
'SNAPPY'

No salt buckets defined.

Smaple table row key -

byte[] startRow = ByteUtil.concat(PVarchar.INSTANCE.toBytes("test"),

QueryConstants.SEPARATOR_BYTE_ARRAY,

PVarchar.INSTANCE.toBytes("src"),

QueryConstants.SEPARATOR_BYTE_ARRAY,

PVarchar.INSTANCE.toBytes("label"),

QueryConstants.SEPARATOR_BYTE_ARRAY,

PVarchar.INSTANCE.toBytes("direction"),

QueryConstants.SEPARATOR_BYTE_ARRAY,

PUnsignedLong.INSTANCE.toBytes(1235464603853L),

PVarchar.INSTANCE.toBytes("target"));

i am trying to extract TARGET column. Thanks.

Regards,
Anil

On 25 August 2016 at 19:29, Michael McAllister <mmcallis...@homeaway.com>
wrote:

> Can you provide an example of one of the rowkeys, the values you are
> expecting out of it, and the full table definition? Of importance in the
> table definition will be whether you have salt buckets defined.
>
>
>
> Michael McAllister
>
> Staff Data Warehouse Engineer | Decision Systems
>
> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>
> This electronic communication (including any attachment) is confidential.
> If you are not an intended recipient of this communication, please be
> advised that any disclosure, dissemination, distribution, copying or other
> use of this communication or any attachment is strictly prohibited.  If you
> have received this communication in error, please notify the sender
> immediately by reply e-mail and promptly destroy all electronic and printed
> copies of this communication and any attachment.
>
>
>
> *From: *Anil <anilk...@gmail.com>
> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Date: *Thursday, August 25, 2016 at 1:09 AM
> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Subject: *Re: Extracting column values from Phoenix composite primary key
>
>
>
> HI Michael,
>
>
>
> Thank you for the response.
>
>
>
> Unfortunately, that is not working.
>
>
>
> Following is the snippet. one of the column is unsigned long and trying to
> extract the last column (with value target in the below code).
>
> please correct me if i am doing wrong.
>
>
>
>byte SEPARATOR_BYTE = 0;
>
> byte[] SEPARATOR_BYTE_ARRAY = { 0 };
>
> byte[] startRow = ByteUtil.concat(
>
> PVarchar.INSTANCE.toBytes("test"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("src"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("label"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PVarchar.INSTANCE.toBytes("direction"),
>
> QueryConstants.SEPARATOR_BYTE_ARRAY,
>
> PUnsignedLong.INSTANCE.toBytes(1235464603853L),
>
> PVarchar.INSTANCE.toBytes("target"));
>
>
>
>
>
> List cols = new ArrayList();
>
> int j = 0;
>
> for (int i= 0 ; i < startRow.length ; i++){
>
> if (startRow[i] == SEPARATOR_BYTE){
>
> cols.add(Bytes.toString(startRow, j, i-j));
>
> j = i+1;
>
> }
>
> }
>
>
>
> cols.add(Bytes.toString(startRow, j, startRow.length - j));
>
>
>
> System.out.println(cols.size());
>
>
>
> String rowKey = Bytes.toString(startRow);
>
> String[] columns = rowKey.split("\u");
>
>
>
> System.out.println(columns.length);
>
>
>
> last entry in the array has special character too along with actual value.
>
>
>
> Can you point out the bug in the above code if any. Thanks.
>
>
>
> Regards,
>
> Anil
>
>
>
>
>
> On 25 August 2016 at 02:32, Michael McAllister <mmcallis...@homeaway.com>
> wrote:
>
> Anil
>
>
>
> If you split the rowkey on the zero byte character, you should end up with
> the individual columns that made up your primary key. Details are here:-
>
>
>
> https://phoenix.apache.org/faq.html#How_I_map_Phoenix_
> table_to_an_existing_HBase_table
>
>
>
> Michael McAllister
>
> Staff Data Warehouse Engineer | Decision Systems
>
> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>
> This electronic communication (including any attachment) is confidential.
&

Re: Extracting column values from Phoenix composite primary key

2016-08-25 Thread Anil
HI Michael,

Thank you for the response.

Unfortunately, that is not working.

Following is the snippet. one of the column is unsigned long and trying to
extract the last column (with value target in the below code).
please correct me if i am doing wrong.

   byte SEPARATOR_BYTE = 0;
byte[] SEPARATOR_BYTE_ARRAY = { 0 };
byte[] startRow = ByteUtil.concat(
PVarchar.INSTANCE.toBytes("test"),
QueryConstants.SEPARATOR_BYTE_ARRAY,
PVarchar.INSTANCE.toBytes("src"),
QueryConstants.SEPARATOR_BYTE_ARRAY,
PVarchar.INSTANCE.toBytes("label"),
QueryConstants.SEPARATOR_BYTE_ARRAY,
PVarchar.INSTANCE.toBytes("direction"),
QueryConstants.SEPARATOR_BYTE_ARRAY,
PUnsignedLong.INSTANCE.toBytes(1235464603853L),
PVarchar.INSTANCE.toBytes("target"));


List cols = new ArrayList();
int j = 0;
for (int i= 0 ; i < startRow.length ; i++){
if (startRow[i] == SEPARATOR_BYTE){
cols.add(Bytes.toString(startRow, j, i-j));
j = i+1;
}
}

cols.add(Bytes.toString(startRow, j, startRow.length - j));

System.out.println(cols.size());

String rowKey = Bytes.toString(startRow);
String[] columns = rowKey.split("\u");

System.out.println(columns.length);

last entry in the array has special character too along with actual value.

Can you point out the bug in the above code if any. Thanks.

Regards,
Anil


On 25 August 2016 at 02:32, Michael McAllister <mmcallis...@homeaway.com>
wrote:

> Anil
>
>
>
> If you split the rowkey on the zero byte character, you should end up with
> the individual columns that made up your primary key. Details are here:-
>
>
>
> https://phoenix.apache.org/faq.html#How_I_map_Phoenix_
> table_to_an_existing_HBase_table
>
>
>
> Michael McAllister
>
> Staff Data Warehouse Engineer | Decision Systems
>
> mmcallis...@homeaway.com | C: 512.423.7447 | skype: michael.mcallister.ha
> <zimmk...@hotmail.com> | webex: https://h.a/mikewebex
>
> This electronic communication (including any attachment) is confidential.
> If you are not an intended recipient of this communication, please be
> advised that any disclosure, dissemination, distribution, copying or other
> use of this communication or any attachment is strictly prohibited.  If you
> have received this communication in error, please notify the sender
> immediately by reply e-mail and promptly destroy all electronic and printed
> copies of this communication and any attachment.
>
>
>
> *From: *Anil <anilk...@gmail.com>
> *Reply-To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Date: *Wednesday, August 24, 2016 at 4:10 AM
> *To: *"user@phoenix.apache.org" <user@phoenix.apache.org>
> *Subject: *Re: Extracting column values from Phoenix composite primary key
>
>
>
> Any inputs ? Thanks.
>
>
>
> On 24 August 2016 at 11:13, Anil <anilk...@gmail.com> wrote:
>
> Hi,
>
>
>
> I have created primary key with columns in phoenix.
>
> is there any way to extract the column values from hbase row key ? Please
> help.
>
>
>
> Thanks,
>
> Anil
>
>
>


Extracting column values from Phoenix composite primary key

2016-08-23 Thread Anil
Hi,

I have created primary key with columns in phoenix.
is there any way to extract the column values from hbase row key ? Please
help.

Thanks,
Anil


Re: Phoenix upsert query time

2016-08-02 Thread anil gupta
How many nodes you have in cluster? How many regions in that phoenix table?
Can you do batch upserts?
If Phoenix is querying for MetaData for every upsert in a preparedStatement
then it definitely sounds like a bug/performance problem.
IMO, 30 ms is not really that horrible of a performance given that you also
have a secondary index. Have you tried increasing number of write clients?

On Tue, Aug 2, 2016 at 10:54 AM, anupama agarwal <anu1...@gmail.com> wrote:

> I don't have option to update my CDH5.7. My upsert query is taking 30ms
> with one fully covered index on table.
>
> I am using Spring JDBC template which uses prepared statement internally.
>
>
> <https://github.com/Flipkart/aesop/blob/master/data-layers/data-layer-hbase/src/main/java/com/flipkart/aesop/hbasedatalayer/upsert/HBaseUpsertDataLayer.java>
>
> NamedParameterJdbcTemplate jdbcTemplate = jdbcTemplateMap.get(event.
> getNamespaceName());
> jdbcTemplate.update(upsertQuery, event.getFieldMapPair()); Do I need to
> use explicit prepared statement? Link to code
> <https://github.com/Flipkart/aesop/blob/master/data-layers/data-layer-hbase/src/main/java/com/flipkart/aesop/hbasedatalayer/upsert/HBaseUpsertDataLayer.java>
>
> On Tue, Aug 2, 2016 at 10:31 PM, Anil Gupta <anilgupt...@gmail.com> wrote:
>
>> Are you using a prepared statement for upserts? IMO, query should be
>> compiled only once when prepared statement is used.
>>
>> Sent from my iPhone
>>
>> On Aug 2, 2016, at 7:56 AM, Samarth Jain <sama...@apache.org> wrote:
>>
>> Best bet is to updgrade your cloudera version to cdh5.7. It supports
>> phoenix 4.7. See -
>>
>> http://community.cloudera.com/t5/Cloudera-Labs/ANNOUNCE-Third-installment-of-Cloudera-Labs-packaging-of-Apache/m-p/42351#U42351
>>
>>
>> On Tuesday, August 2, 2016, anupama agarwal <anu1...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> We need to insert to do 10K upserts per second in our phoenix table. We
>>> are using phoenix 4.5 with CDH5.4.4.  Problem is each upsert query is
>>> making rpc call to read metadata about the table.
>>>
>>> "o.a.phoenix.compile.FromCompiler.createTableRef 446 - Re-resolved stale
>>> table"
>>>
>>> Phoenix have added feature to specify "UPDATE_CACHE_FREQUENCY" in 4.7
>>> version. Any way to apply this in Phoenix 4.5 by caching metadata at client
>>> side? My table schema will change only once in 6 months. This would be
>>> really helpful for me.
>>>
>>> Regards
>>> Anupama
>>>
>>>
>>>
>>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Table replication

2016-06-09 Thread anil gupta
Hi Jean,

Phoenix does not supports replication at present.(It will be super awesome
if it can) So, if you want to do replication of Phoenix tables you will
need to setup replication of all the underlying HBase tables for
corresponding Phoenix tables.

I think you will need to replicate all the Phoenix system hbase tables,
Global/Local secondary index table and then Primary Phoenix table.

I haven't done it yet. But, above is the way i would approach it.

Thanks,
Anil Gupta.


On Thu, Jun 9, 2016 at 6:49 AM, Jean-Marc Spaggiari <jean-m...@spaggiari.org
> wrote:

> Hi,
>
> When Phoenix is used, what is the recommended way to do replication?
>
> Replication acts as a client on the 2nd cluster, so should we simply
> configure Phoenix on both cluster and on the destination it will take care
> of updating the index tables, etc. Or should all the tables on the
> destination side, including Phoenix tables, be replicated on the
> destination side too? I seached a bit about that on the Phoenix site and
> google and did not find anything.
>
> Thanks,
>
> JMS
>



-- 
Thanks & Regards,
Anil Gupta


Re: MapReduce code runs only in local. How to execute my code in distributed mode?

2016-05-26 Thread anil gupta
Hi,

It seems like your classpath is not setup correctly. /etc/hadoop/conf and
/etc/hbase/conf needs to be in MapReduce classpath.  Are you able to run
row counter job of hbase in distributed cluster? What version of Hadoop you
are using? Did you use Ambari or Clodura Manager to install the cluster?

Thanks,
Anil Gupta

On Thu, May 26, 2016 at 7:19 AM, Lucie Michaud <
lucie.mich...@businessdecision.com> wrote:

> Hello everybody,
>
>
>
> For a few days I developed a MapReduce code to insert values in HBase with
> Phoenix. But the code runs only in local and overcharge the machine.
>
> Whatever changes I make I observe that the mapred.LocalJobRunner class is
> systematically used.
>
>
>
> Do you have an idea of the problem?
>
>
>
> I attached to this post the execution logs of my program.
>
>
>
> Thank you in advance for your help. :)
>
>  Feel free to ask me for more details if it can help.
>



-- 
Thanks & Regards,
Anil Gupta


Re: Extending bulk csv loader

2016-05-19 Thread Anil Gupta
You can simply write a mapreduce job to accomplish your business logic. Output 
format of job will be PhoenixOutputFormat. 
Have a look at PhoenixOutputFormat for more details.

Sent from my iPhone

> On May 18, 2016, at 10:53 PM, anupama agarwal  wrote:
> 
> Hi All,
> 
> I have a use case in which I want to import data into Hbase table using 
> phoenix, but with some conditions. I want to import a row only if it doesn't 
> exist already, or the row's updated_at value is more than existing record's 
> value. Basically I want to keep the latest data in the table.
> 
>  Can you please give me some pointers on how to achieve this?


Re: csvbulkload CDH-5.7.0

2016-05-02 Thread anil gupta
Please find my reply inline.

On Mon, May 2, 2016 at 10:09 PM, Sanooj Padmakumar <p.san...@gmail.com>
wrote:

> Hi,
>
> After upgrading to CDH - 5.7.0 we are getting the below exception for
> csvbulkload with Phoenix.
>
> Phoenix version is : 4.5.2
>
> 16/05/02 11:07:17 WARN ipc.CoprocessorRpcChannel: Call failed on
> IOException
> org.apache.hadoop.hbase.DoNotRetryIOException:
> org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG:
> org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/HRegion;
> at
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
> at
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1266)
> at
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:11619)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:7789)
> at
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1988)
> at
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1970)
> at
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33652)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodError:
> org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/HRegion;
>
Anil: Above error seems to hint that Phoenix4.5.2 is not compatible with
cdh5.7.0. You will need to either recompile(or modify code) phoenix to work
with cdh5.7.0 or ask cdh to support Phoenix.

> at
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1156)
> ... 10 more
>
> Any input on this will be extremely helpful.
>
> --
> Thanks,
> Sanooj Padmakumar
>



-- 
Thanks & Regards,
Anil Gupta


Re: ORM for Apache Phoenix

2016-04-29 Thread anil gupta
Have a look at https://github.com/eHarmony/pho
It is specifically built for Phoenix/HBase.

HTH,
Anil

On Fri, Apr 29, 2016 at 8:02 AM, Gustavo Oliveira <ptgustav...@gmail.com>
wrote:

> I have investigated about ORM tools that lets  "write / access" java
> objects in Hbase.
> I know Kundera and DataNucleus but the ideia was to use the power of
> Phoenix.
>
> What is your opinion? Has anyone ever tested, use or design phase?
> Thank you for your help.
>



-- 
Thanks & Regards,
Anil Gupta


Re: Secondary index memory footprint

2016-03-22 Thread Anil Gupta
I dont know the meaning in_memory=false in context of phoenix. In context of 
hbase, that entire data will be kept in memory( not just block cache). I m 
guessing, Phoenix is also doing same thing.
By data size on disk, you can roughly estimate memory footprint. For example, 
You can load one index into memory by setting in_memory flag and see how much 
memory it took. Then u can estimate memory usage for other index on basis of 
your experiment.

Sent from my iPhone

> On Mar 22, 2016, at 9:05 AM, Sumit Nigam <sumit_o...@yahoo.com> wrote:
> 
> Thank you Anil.
> 
> Any inputs on what does IN_MEMORY = false do at index creation time?
> 
> I get the separate table part. But not sure I understood why would memory 
> footprint be equal to data size. Would this secondary index reside entirely 
> in memory? I guess only parts of it would reside on block cache, right?
> 
> Thanks for such a prompt reply.
> Sumit
> 
> 
> 
> From: anil gupta <anilgupt...@gmail.com>
> To: "user@phoenix.apache.org" <user@phoenix.apache.org>; Sumit Nigam 
> <sumit_o...@yahoo.com> 
> Sent: Tuesday, March 22, 2016 9:11 PM
> Subject: Re: Secondary index memory footprint
> 
> Global indexes are stored in a separate hbase table. So, you can estimate 
> memory footprint by looking at the data size of that index currently.
> 
> HTH,
> Anil Gupta
> 
> On Tue, Mar 22, 2016 at 7:19 AM, Sumit Nigam <sumit_o...@yahoo.com> wrote:
> Hi,
> 
> I am trying to estimate what (if any) are the implications of accumulating 
> data in phoenix secondary index. I have a secondary index on 3 columns and 
> would like to know if anyone has an idea of how to estimate memory footprint 
> of secondary index (if any) based on number of entries in data table. The 
> index is global and not local.
> 
> Plus, what is the impact of setting IN_MEMORY=true when index is created? 
> 
> Thanks,
> Sumit
> 
> 
> 
> -- 
> Thanks & Regards,
> Anil Gupta
> 
> 


Re: Secondary index memory footprint

2016-03-22 Thread anil gupta
Global indexes are stored in a separate hbase table. So, you can estimate
memory footprint by looking at the data size of that index currently.

HTH,
Anil Gupta

On Tue, Mar 22, 2016 at 7:19 AM, Sumit Nigam <sumit_o...@yahoo.com> wrote:

> Hi,
>
> I am trying to estimate what (if any) are the implications of accumulating
> data in phoenix secondary index. I have a secondary index on 3 columns and
> would like to know if anyone has an idea of how to estimate memory
> footprint of secondary index (if any) based on number of entries in data
> table. The index is global and not local.
>
> Plus, what is the impact of setting IN_MEMORY=true when index is created?
>
> Thanks,
> Sumit
>



-- 
Thanks & Regards,
Anil Gupta


Extend CSVBulkLoadTool

2016-03-21 Thread Anil
Hi ,

I see CSVBulkLoadTool accepts delimiter as single character only. So i have
to customize it. do we have documentation of steps that bulk load tool
perform ?  Please share.

Thanks,
Anil


Re: how to decode phoenix data under hbase

2016-03-19 Thread anil gupta
Hi Kevin,

You should use Phoenix commandline(squirrel) or Phoenix api to read data
written via Phoenix. One of the biggest advantage of Phoenix is that it
converts long, int, date, etc into a human readable format at the time of
displaying data(unlike binary in HBase). Have a look at Phoenix website to
find out how to use Phoenix to query data.

Thanks,
Anil

On Wed, Mar 16, 2016 at 8:13 AM, Sanooj Padmakumar <p.san...@gmail.com>
wrote:

> Hi Kevin,
>
> You can access the data created using phoenix with java hbase api .. Use
> the sample code below..
>
> Keep in mind for varchar (i.e. for columns whose size is unknown phoenix
> uses separator) based columns we need to use
> QueryConstants.SEPARATOR_BYTE_ARRAY as the separator and for number based
> columns we dont need any separator (since phoenix keeps fixed size for such
> columns)
>
> byte[] startRow = ByteUtil.concat(PVarchar.INSTANCE
> .toBytes("primaryKeyCol1Value"),
> QueryConstants.SEPARATOR_BYTE_ARRAY,
> PVarchar.INSTANCE.toBytes("primaryKeyCol2Value");
>
> Get get = new Get(startRow);
> Result result = table.get(get);
>
> String colValue =
> Bytes.toString(result.getValue(Bytes.toBytes("colFamily"),
> Bytes.toBytes("colName")));
>
> Also read about PrefixFilter and range filters
>
> Hope this helps
>
> Sanooj
>
>
> On Tue, Mar 15, 2016 at 2:33 PM, kevin <kiss.kevin...@gmail.com> wrote:
>
>> HI,all
>> I create a table under phoenix and upsert somedata. I turn to hbase
>> client and scan the new table.
>> I got data like :
>> column=0:NAME, timestamp=1458028540810, value=\xE5\xB0\x8F\xE6\x98\x8E
>>
>> I don't know how to decode the value to normal string.what's the
>> codeset?
>>
>
>
>
> --
> Thanks,
> Sanooj Padmakumar
>



-- 
Thanks & Regards,
Anil Gupta


Re: Why Phoenix creates an extra CF named as "0"

2016-03-15 Thread anil gupta
Hi James,

Due to a typo we forgot to put CF name as prefix to CQ name in 1/1100
column of that table. That led to creation of CF with name "0". After
fixing the typo, we only have 2 CF.

Thanks,
Anil Gupta

On Thu, Feb 18, 2016 at 11:20 AM, James Taylor <jamestay...@apache.org>
wrote:

> Hi Anil,
> Please post your CREATE TABLE and CREATE INDEX statement.
> Thanks,
> James
>
> On Thu, Feb 18, 2016 at 11:06 AM, anil gupta <anilgupt...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I have a phoenix table, in that table we defined 2CF. I have one global
>> secondary index in this table.
>> We also see a 3rd named as "0". Why does phoenix creates this extra CF?
>> Is there a way to avoid having this extra cf?
>> If we remove it, what features we are gonna loose?
>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Kerberos ticket renewal

2016-03-14 Thread anil gupta
Hi,

At my previous job, we had web-services fetching data from a secure hbase
cluster. We never needed to renew the lease by restarting webserver. Our
app used to renew the ticket. I think, Phoenix/HBase already handles
renewing ticket. Maybe you need to look into your kerberos environment
settings.  How are you authenticating with Phoenix/HBase?
Sorry, I dont remember the exact kerberos setting that we had.

HTH,
Anil Gupta

On Mon, Mar 14, 2016 at 11:00 AM, Sanooj Padmakumar <p.san...@gmail.com>
wrote:

> Hi
>
> We have a rest style micro service application fetching data from hbase
> using Phoenix. The cluster is kerberos secured and we run a cron to renew
> the kerberos ticket on the machine where the micro service is deployed.
>
> But it always needs a restart of micro service java process to get the
> kerberos ticket working once after its expired.
>
> Is there a way I can avoid this restart?
>
> Any pointers will be very helpful. Thanks
>
> PS : We have a Solr based micro service which works without a restart.
>
> Regards
> Sanooj
>



-- 
Thanks & Regards,
Anil Gupta


Re: Excessive region splitting of Global Index table(8 Megabyte regions)

2016-03-12 Thread anil gupta
Thanks for the reply, James. We have 2 global secondary index in this table
and both of them exhibit same behavior.  Going to give your suggestion a
try. I also think that regionsize for secondary index should not be 8GB.
Will try to set the regionsize=1GB for secondary index and see how it goes.

On Sat, Mar 12, 2016 at 12:00 PM, James Taylor <jamestay...@apache.org>
wrote:

> Hi Anil,
> Phoenix estimates the ratio between the data table and index table as
> shown below to attempt to get the same number of splits in your index table
> as your data table.
>
> /*
>  * Approximate ratio between index table size and data table size:
>  * More or less equal to the ratio between the number of key value
>  * columns in each. We add one to the key value column count to
>  * take into account our empty key value. We add 1/4 for any key
>  * value data table column that was moved into the index table row key.
>  */
>
> Phoenix then multiples the MAX_FILESIZE of the data table to come up with
> a reasonable default value for the index table. Can you check in the HBase
> shell what the MAX_FILESIZE is for the data table versus the index table?
> Maybe there's a bug in Phoenix in how it calculates this ration.
>
> You can override the MAX_FILESIZE for your index through an ALTER TABLE
> statement:
>
> ALTER TABLE my_table_schema.my_index_name SET MAX_FILESIZE=8589934592
>
> You can ignore the warnings you get in sqlline and you can verify the
> setting took affect through the HBase shell by running the following
> command:
>
> describe 'MY_TABLE_SCHEMA.MY_INDEX_NAME'
>
> HTH,
>
> James
>
>
> On Sat, Mar 12, 2016 at 10:18 AM, anil gupta <anilgupt...@gmail.com>
> wrote:
>
>> Hi,
>>
>> We are using HDP2.3.4 and Phoenix4.4.
>> Our global index table is doing excessive splitting. Our cluster region
>> size setting is 8 Gigabytes but global index table has 18 regions and max
>> size of region is 10.9 MB.
>> This is definitely not a good behavior. I looked into tuning (
>> https://phoenix.apache.org/tuning.html) and i could not find anything
>> relevant. Is this region splitting intentionally done by Phoenix for
>> secondary index tables?
>>
>> Here is the output of du command:
>> [ag@hdpclient1 ~]$ hadoop fs -du -h
>> /apps/hbase/data/data/default/SEC_INDEX
>> 761 /apps/hbase/data/data/default/SEC_INDEX/.tabledesc
>> 0   /apps/hbase/data/data/default/SEC_INDEX/.tmp
>> 9.3 M
>> /apps/hbase/data/data/default/SEC_INDEX/079db2c953c30a8270ecbd52582e81ff
>> 2.9 M
>> /apps/hbase/data/data/default/SEC_INDEX/0952c070234c05888bfc2a01645e9e88
>> 10.9 M
>> /apps/hbase/data/data/default/SEC_INDEX/0d69bbb8991b868f0437b624410e9bed
>> 8.2 M
>> /apps/hbase/data/data/default/SEC_INDEX/206562491fd1de9db48cf422dd8c2059
>> 7.9 M
>> /apps/hbase/data/data/default/SEC_INDEX/25318837ab8e1db6922f5081c840d2e7
>> 9.5 M
>> /apps/hbase/data/data/default/SEC_INDEX/5369e0d6526b3d2cdab9937cb320ccb3
>> 9.6 M
>> /apps/hbase/data/data/default/SEC_INDEX/62704ee3c9418f0cd48210a747e1f8ac
>> 7.8 M
>> /apps/hbase/data/data/default/SEC_INDEX/631376fc5515d7785b2bcfc8a1f64223
>> 2.8 M
>> /apps/hbase/data/data/default/SEC_INDEX/6648d5396ba7a3c3bf884e5e1300eb0e
>> 9.4 M
>> /apps/hbase/data/data/default/SEC_INDEX/6e6e133580aea9a19a6b3ea643735072
>> 8.1 M
>> /apps/hbase/data/data/default/SEC_INDEX/8535a5c8a0989dcdfad2b1e9e9f3e18c
>> 7.8 M
>> /apps/hbase/data/data/default/SEC_INDEX/8ffa32e0c6357c2a0b413f3896208439
>> 9.3 M
>> /apps/hbase/data/data/default/SEC_INDEX/c27e2809cd352e3b06c0f11d3e7278c6
>> 8.0 M
>> /apps/hbase/data/data/default/SEC_INDEX/c4f5a98ce6452a6b5d052964cc70595a
>> 8.1 M
>> /apps/hbase/data/data/default/SEC_INDEX/c578d3190363c32032b4d92c8d307215
>> 7.9 M
>> /apps/hbase/data/data/default/SEC_INDEX/d750860bac8aa372eb28aaf055ea63e7
>> 9.6 M
>> /apps/hbase/data/data/default/SEC_INDEX/e9756aa4c7c8b9bfcd0857b43ad5bfbe
>> 8.0 M
>> /apps/hbase/data/data/default/SEC_INDEX/ebaae6c152e82c9b74c473babaf644dd
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>
>


-- 
Thanks & Regards,
Anil Gupta


Excessive region splitting of Global Index table(8 Megabyte regions)

2016-03-12 Thread anil gupta
Hi,

We are using HDP2.3.4 and Phoenix4.4.
Our global index table is doing excessive splitting. Our cluster region
size setting is 8 Gigabytes but global index table has 18 regions and max
size of region is 10.9 MB.
This is definitely not a good behavior. I looked into tuning (
https://phoenix.apache.org/tuning.html) and i could not find anything
relevant. Is this region splitting intentionally done by Phoenix for
secondary index tables?

Here is the output of du command:
[ag@hdpclient1 ~]$ hadoop fs -du -h  /apps/hbase/data/data/default/SEC_INDEX
761 /apps/hbase/data/data/default/SEC_INDEX/.tabledesc
0   /apps/hbase/data/data/default/SEC_INDEX/.tmp
9.3 M
/apps/hbase/data/data/default/SEC_INDEX/079db2c953c30a8270ecbd52582e81ff
2.9 M
/apps/hbase/data/data/default/SEC_INDEX/0952c070234c05888bfc2a01645e9e88
10.9 M
/apps/hbase/data/data/default/SEC_INDEX/0d69bbb8991b868f0437b624410e9bed
8.2 M
/apps/hbase/data/data/default/SEC_INDEX/206562491fd1de9db48cf422dd8c2059
7.9 M
/apps/hbase/data/data/default/SEC_INDEX/25318837ab8e1db6922f5081c840d2e7
9.5 M
/apps/hbase/data/data/default/SEC_INDEX/5369e0d6526b3d2cdab9937cb320ccb3
9.6 M
/apps/hbase/data/data/default/SEC_INDEX/62704ee3c9418f0cd48210a747e1f8ac
7.8 M
/apps/hbase/data/data/default/SEC_INDEX/631376fc5515d7785b2bcfc8a1f64223
2.8 M
/apps/hbase/data/data/default/SEC_INDEX/6648d5396ba7a3c3bf884e5e1300eb0e
9.4 M
/apps/hbase/data/data/default/SEC_INDEX/6e6e133580aea9a19a6b3ea643735072
8.1 M
/apps/hbase/data/data/default/SEC_INDEX/8535a5c8a0989dcdfad2b1e9e9f3e18c
7.8 M
/apps/hbase/data/data/default/SEC_INDEX/8ffa32e0c6357c2a0b413f3896208439
9.3 M
/apps/hbase/data/data/default/SEC_INDEX/c27e2809cd352e3b06c0f11d3e7278c6
8.0 M
/apps/hbase/data/data/default/SEC_INDEX/c4f5a98ce6452a6b5d052964cc70595a
8.1 M
/apps/hbase/data/data/default/SEC_INDEX/c578d3190363c32032b4d92c8d307215
7.9 M
/apps/hbase/data/data/default/SEC_INDEX/d750860bac8aa372eb28aaf055ea63e7
9.6 M
/apps/hbase/data/data/default/SEC_INDEX/e9756aa4c7c8b9bfcd0857b43ad5bfbe
8.0 M
/apps/hbase/data/data/default/SEC_INDEX/ebaae6c152e82c9b74c473babaf644dd

-- 
Thanks & Regards,
Anil Gupta


Re: Phoenix table is inaccessible...

2016-03-12 Thread Anil Gupta
Yes, Global indexes are stored in separate hbase table and their region 
location is not related to main table regions. 

Sent from my iPhone

> On Mar 12, 2016, at 4:34 AM, Saurabh Agarwal (BLOOMBERG/ 731 LEX) 
>  wrote:
> 
> Thanks. I will try that. 
> 
> Having regions of the secondary indexes on different region servers than 
> regions of main table are common. These are global indexes. Correct me if I 
> am wrong. I am wondering why this will cause issue. 
> 
> Sent from Bloomberg Professional for iPhone 
> 
> 
> - Original Message -
> From: Jonathan Leech 
> To: user@phoenix.apache.org
> CC: SAURABH AGARWAL
> At: 12-Mar-2016 00:28:17
> 
> Seen these kinds of errors when the regions for the 2ndary index end up on a 
> different region server than the main table. Make sure the configuration is 
> all correct and also look for regions stuck in transition, etc. try bouncing 
> hbase, then drop all secondary indexes on the table as well as as its hbase 
> table if necessary.
> 
> 
> > On Mar 11, 2016, at 6:29 PM, Sergey Soldatov  
> > wrote:
> >
> > The system information about all Phoenix tables is located in HBase
> > SYSTEM.CATALOG table. So, if you recreate the catalog you will need to
> > recreate all tables as well. I'm not sure is there any other way to
> > fix it.
> >
> > On Fri, Mar 11, 2016 at 4:25 PM, Saurabh Agarwal (BLOOMBERG/ 731 LEX)
> >  wrote:
> >> Thanks. I will try that. Questions? I am able to access other tables fine.
> >> If SYSTEM.CATALOG got corrupted, wouldn't it impact all tables?
> >>
> >> Also how to restore SYSTEM.CATALOG table without restarting sqlline?
> >>
> >>
> >> Sent from Bloomberg Professional for iPhone
> >>
> >>
> >> - Original Message -
> >> From: Sergey Soldatov 
> >> To: SAURABH AGARWAL, user@phoenix.apache.org
> >> CC: ANIRUDHA JADHAV
> >> At: 11-Mar-2016 19:07:31
> >>
> >> Hi Saurabh,
> >> It seems that your SYSTEM.CATALOG got corrupted somehow. Usually you
> >> need to disable and drop 'SYSTEM.CATALOG' in hbase shell. After that
> >> restart sqlline (it will automatically recreate system catalog) and
> >> recreate all user tables. The table data usually is not affected, but
> >> just in case make a backup of your hbase before.
> >>
> >> Possible someone has a better advice.
> >>
> >> Thanks,
> >> Sergey
> >>
> >> On Fri, Mar 11, 2016 at 3:05 PM, Saurabh Agarwal (BLOOMBERG/ 731 LEX)
> >>  wrote:
> >>> Hi,
> >>>
> >>> I had been experimenting with different indexes on Phoenix table to get
> >>> the
> >>> desired performance.
> >>>
> >>> After creating secondary index that create index on one column and include
> >>> rest of the fields, it start throwing the following exceptions whenever I
> >>> access the table.
> >>>
> >>> Can you point me what might be went wrong here?
> >>>
> >>> We are using HDP 2.3 - HBase 1.1.2.2.3.2.0-2950,
> >>> phoenix-4.4.0.2.3.2.0-2950
> >>>
> >>> 0: jdbc:phoenix:> select count(*) from "Weather";
> >>> 16/03/11 17:37:32 WARN ipc.CoprocessorRpcChannel: Call failed on
> >>> IOException
> >>> org.apache.hadoop.hbase.DoNotRetryIOException:
> >>> org.apache.hadoop.hbase.DoNotRetryIOException: com.bloomb
> >>> erg.ds.WeatherSmallSalt: 35
> >>> at
> >>> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
> >>> at
> >>>
> >>> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:447)
> >>> at
> >>>
> >>> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataPr
> >>> otos.java:10505)
> >>> at
> >>>
> >>> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:7435)
> >>> at
> >>>
> >>> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:187
> >>> 5)
> >>> at
> >>>
> >>> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1857)
> >>> at
> >>>
> >>> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(Cl
> >>> ientProtos.java:32209)
> >>> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2114)
> >>> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:101)
> >>> at
> >>> org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
> >>> at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
> >>> at java.lang.Thread.run(Thread.java:745)
> >>> Caused by: java.lang.ArrayIndexOutOfBoundsException: 35
> >>> at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:354)
> >>> at org.apache.phoenix.schema.PTableImpl.(PTableImpl.java:276)
> >>> at org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:265)
> >>> at
> >>>
> >>> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:826)
> >>> at
> >>>
> >>> 

Feedback on using Phoenix QueryServer in production

2016-03-08 Thread anil gupta
Hi,

We would like to query Phoenix from a Ruby app. We found 2 Ruby connectors
for Apache Phoenix but one of them required Java1.5 and other was using
Phoenix4.1.
Java1.5 is probably really hard to use in our stack and jdk version upgrade
of "ruby java bridge" seems like a very big task.

So, i am leaning towards using Phoenix Query Server now. Since QueryServer
is fairly new component, I would like to take feedback from users who are
running it in production?

We are using HDP2.3.4(Phoenix4.4). Our workload is not very heavy. We are
going to use Query Server strictly for reads, essentially, doing some
aggregate queries.

-- 
Thanks & Regards,
Anil Gupta


Fwd: Ruby gem of Apache Phoenix: https://rubygems.org/gems/ruby-phoenix/versions/0.0.8

2016-03-08 Thread anil gupta
Hi,

One of our ruby apps might be using this ruby gem(
https://rubygems.org/gems/ruby-phoenix/versions/0.0.8) to query Phoenix. I
dont know programming in Ruby.
This gem is listing Phoenix4.2 as dependency. We are running Phoenix4.4.
So, i am curious to know whether we would be able to connect to Phoenix4.4
with a ruby gem of Phoenix4.2? If not, then what we would need to
do?(upgrade ruby gem to Phoenix4.4?)

Here is the git: https://github.com/wxianfeng/ruby-phoenix
-- 
Thanks & Regards,
Anil Gupta


Re: Dynamic Fields And Views

2016-02-25 Thread anil gupta
+1 for a view that has dynamic columns. This would make life easier with
dynamic columns.

On Tue, Feb 23, 2016 at 4:00 PM, Steve Terrell <sterr...@oculus360.us>
wrote:

> I have a table with many dynamic fields.  Works great.  However, it's a
> bit of a nuisance to have to supply each dynamic field's type in every
> query.
>
> Example:
> select "dynamic_field" from MY_TABLE("dynamic_field" varchar)
>
> This example is not too bad, but image it with 5+ dynamic fields being
> used.  The select statement becomes very verbose.
>
> I understand the reason behind requiring the field type of each dynamic
> field.  But I was wondering if there is a way to define a view that manages
> the dynamic field types so that I could do something like this:
>
> create MY_VIEW as select * from MY_TABLE("dynamic_field" varchar)
> -- invalid syntax; pseudo code of what I wish I could do.
>
> select "dynamic_field" from MY_VIEW
>
> Should I create a JIRA for a new feature?  Or is this fundamentally not
> possible?
>
> Thanks,
> Steve
>



-- 
Thanks & Regards,
Anil Gupta


Why Phoenix creates an extra CF named as "0"

2016-02-18 Thread anil gupta
Hi,

I have a phoenix table, in that table we defined 2CF. I have one global
secondary index in this table.
We also see a 3rd named as "0". Why does phoenix creates this extra CF? Is
there a way to avoid having this extra cf?
If we remove it, what features we are gonna loose?



-- 
Thanks & Regards,
Anil Gupta


Re: ERROR 2008 (INT10): Unable to find cached index metadata.

2016-02-17 Thread anil gupta
phoenix.upsert.batch.size is a client side property.  We lowered it down to
20-50. Its YMMV as per your use case.

phoenix.coprocessor.maxServerCacheTimeToLiveMs is a server side property.
You will need to restart your hbase cluster for this.

On Wed, Feb 17, 2016 at 3:01 PM, Neelesh <neele...@gmail.com> wrote:

> Also, was your change to phoenix.upsert.batch.size on the client or on
> the region server or both?
>
> On Wed, Feb 17, 2016 at 2:57 PM, Neelesh <neele...@gmail.com> wrote:
>
>> Thanks Anil. We've upped phoenix.coprocessor.maxServerCacheTimeToLiveMs,
>> but haven't tried playing with phoenix.upsert.batch.size. Its at the
>> default 1000.
>>
>> On Wed, Feb 17, 2016 at 12:48 PM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> I think, this has been answered before:
>>> http://search-hadoop.com/m/9UY0h2FKuo8RfAPN
>>>
>>> Please let us know if the problem still persists.
>>>
>>> On Wed, Feb 17, 2016 at 12:02 PM, Neelesh <neele...@gmail.com> wrote:
>>>
>>>> We've been running phoenix 4.4 client for a while now with HBase
>>>> 1.1.2.  Once in a while while UPSERTing records (on a table with 2 global
>>>> indexes), we see the following error.  I found
>>>> https://issues.apache.org/jira/browse/PHOENIX-1718 and upped both
>>>> values in that JIRA to 360. This still does not help and we keep
>>>> seeing this once in a while. What's not clear is also if this setting is
>>>> relevant for client or just the server.
>>>>
>>>> Any help is appreciated
>>>>
>>>> org.apache.phoenix.execute.CommitException: java.sql.SQLException: ERROR 
>>>> 2008 (INT10): Unable to find cached index metadata.  ERROR 2008 (INT10): 
>>>> ERROR 2008 (INT10): Unable to find cached index metadata.  
>>>> key=5115312427460709976 region=TEST_TABLE,111-222-950835849
>>>>   ,1455513914764.48b2157bcdac165898983437c1801ea7. Index 
>>>> update failed
>>>> at 
>>>> org.apache.phoenix.execute.MutationState.commit(MutationState.java:444) 
>>>> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:459)
>>>>  ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:456)
>>>>  ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>>>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) 
>>>> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>>>> at 
>>>> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:456)
>>>>  ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Anil Gupta
>>>
>>
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: ERROR 2008 (INT10): Unable to find cached index metadata.

2016-02-17 Thread anil gupta
I think, this has been answered before:
http://search-hadoop.com/m/9UY0h2FKuo8RfAPN

Please let us know if the problem still persists.

On Wed, Feb 17, 2016 at 12:02 PM, Neelesh <neele...@gmail.com> wrote:

> We've been running phoenix 4.4 client for a while now with HBase 1.1.2.
> Once in a while while UPSERTing records (on a table with 2 global indexes),
> we see the following error.  I found
> https://issues.apache.org/jira/browse/PHOENIX-1718 and upped both values
> in that JIRA to 360. This still does not help and we keep seeing this
> once in a while. What's not clear is also if this setting is relevant for
> client or just the server.
>
> Any help is appreciated
>
> org.apache.phoenix.execute.CommitException: java.sql.SQLException: ERROR 2008 
> (INT10): Unable to find cached index metadata.  ERROR 2008 (INT10): ERROR 
> 2008 (INT10): Unable to find cached index metadata.  key=5115312427460709976 
> region=TEST_TABLE,111-222-950835849  
> ,1455513914764.48b2157bcdac165898983437c1801ea7. Index update failed
> at 
> org.apache.phoenix.execute.MutationState.commit(MutationState.java:444) 
> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
> at 
> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:459) 
> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
> at 
> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:456) 
> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) 
> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
> at 
> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:456) 
> ~[phoenix-client-4.4.0-HBase-1.1.jar:4.4.0-HBase-1.1]
>
>


-- 
Thanks & Regards,
Anil Gupta


Re: org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000 actions to finish

2016-02-14 Thread anil gupta
I figured out the problem. We have phoenix.upsert.batch.size set to 10 in
hbase-site.xml but somehow that property is **not getting picked up in our
oozie workflow**
When i am explicitly setting phoenix.upsert.batch.size property in my oozie
workflow then my job ran successfully.

By default, phoenix.upsert.batch.size is 1000. Hence, the commits were
failing with a huge batch size of 1000.

Thanks,
Anil Gupta


On Sun, Feb 14, 2016 at 8:03 PM, Heng Chen <heng.chen.1...@gmail.com> wrote:

> I am not sure whether "upsert batch size in phoenix" equals HBase Client
> batch puts size or not.
>
> But as log shows, it seems there are 2000 actions send to hbase one time.
>
> 2016-02-15 11:38 GMT+08:00 anil gupta <anilgupt...@gmail.com>:
>
>> My phoenix upsert batch size is 50. You mean to say that 50 is also a lot?
>>
>> However, AsyncProcess is complaining about 2000 actions.
>>
>> I tried with upsert batch size of 5 also. But it didnt help.
>>
>> On Sun, Feb 14, 2016 at 7:37 PM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>> > My phoenix upsert batch size is 50. You mean to say that 50 is also a
>> lot?
>> >
>> > However, AsyncProcess is complaining about 2000 actions.
>> >
>> > I tried with upsert batch size of 5 also. But it didnt help.
>> >
>> >
>> > On Sun, Feb 14, 2016 at 6:43 PM, Heng Chen <heng.chen.1...@gmail.com>
>> > wrote:
>> >
>> >> 2016-02-14 12:34:23,593 INFO [main]
>> >> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions to finish
>> >>
>> >> It means your writes are too many,  please decrease the batch size of
>> your
>> >> puts,  and balance your requests on each RS.
>> >>
>> >> 2016-02-15 4:53 GMT+08:00 anil gupta <anilgupt...@gmail.com>:
>> >>
>> >> > After a while we also get this error:
>> >> > 2016-02-14 12:45:10,515 WARN [main]
>> >> > org.apache.phoenix.execute.MutationState: Swallowing exception and
>> >> > retrying after clearing meta cache on connection.
>> >> > java.sql.SQLException: ERROR 2008 (INT10): Unable to find cached
>> index
>> >> > metadata.  ERROR 2008 (INT10): ERROR 2008 (INT10): Unable to find
>> >> > cached index metadata.  key=-594230549321118802
>> >> > region=BI.SALES,,1455470578449.44e39179789041b5a8c03316730260e7.
>> Index
>> >> > update failed
>> >> >
>> >> > We have already set:
>> >> >
>> >> >
>> >>
>> phoenix.coprocessor.maxServerCacheTimeToLiveMs18
>> >> >
>> >> > Upset batch size is 50. Write are quite frequent so the cache would
>> >> > not timeout in 18ms
>> >> >
>> >> >
>> >> > On Sun, Feb 14, 2016 at 12:44 PM, anil gupta <anilgupt...@gmail.com>
>> >> > wrote:
>> >> >
>> >> > > Hi,
>> >> > >
>> >> > > We are using phoenix4.4, hbase 1.1(hdp2.3.4).
>> >> > > I have a MR job that is using PhoenixOutputFormat. My job keeps on
>> >> > failing
>> >> > > due to following error:
>> >> > >
>> >> > > 2016-02-14 12:29:43,182 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:29:53,197 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:30:03,212 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:30:13,225 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:30:23,239 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:30:33,253 INFO [main]
>> >> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> >> actions
>> >> > to finish
>> >> > > 2016-02-14 12:30:43,266 INFO [main]
>> >> > org.apache.had

Re: org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000 actions to finish

2016-02-14 Thread anil gupta
My phoenix upsert batch size is 50. You mean to say that 50 is also a lot?

However, AsyncProcess is complaining about 2000 actions.

I tried with upsert batch size of 5 also. But it didnt help.

On Sun, Feb 14, 2016 at 7:37 PM, anil gupta <anilgupt...@gmail.com> wrote:

> My phoenix upsert batch size is 50. You mean to say that 50 is also a lot?
>
> However, AsyncProcess is complaining about 2000 actions.
>
> I tried with upsert batch size of 5 also. But it didnt help.
>
>
> On Sun, Feb 14, 2016 at 6:43 PM, Heng Chen <heng.chen.1...@gmail.com>
> wrote:
>
>> 2016-02-14 12:34:23,593 INFO [main]
>> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions to finish
>>
>> It means your writes are too many,  please decrease the batch size of your
>> puts,  and balance your requests on each RS.
>>
>> 2016-02-15 4:53 GMT+08:00 anil gupta <anilgupt...@gmail.com>:
>>
>> > After a while we also get this error:
>> > 2016-02-14 12:45:10,515 WARN [main]
>> > org.apache.phoenix.execute.MutationState: Swallowing exception and
>> > retrying after clearing meta cache on connection.
>> > java.sql.SQLException: ERROR 2008 (INT10): Unable to find cached index
>> > metadata.  ERROR 2008 (INT10): ERROR 2008 (INT10): Unable to find
>> > cached index metadata.  key=-594230549321118802
>> > region=BI.SALES,,1455470578449.44e39179789041b5a8c03316730260e7. Index
>> > update failed
>> >
>> > We have already set:
>> >
>> >
>> phoenix.coprocessor.maxServerCacheTimeToLiveMs18
>> >
>> > Upset batch size is 50. Write are quite frequent so the cache would
>> > not timeout in 18ms
>> >
>> >
>> > On Sun, Feb 14, 2016 at 12:44 PM, anil gupta <anilgupt...@gmail.com>
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > We are using phoenix4.4, hbase 1.1(hdp2.3.4).
>> > > I have a MR job that is using PhoenixOutputFormat. My job keeps on
>> > failing
>> > > due to following error:
>> > >
>> > > 2016-02-14 12:29:43,182 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:29:53,197 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:03,212 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:13,225 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:23,239 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:33,253 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:43,266 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:30:53,279 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:03,293 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:13,305 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:23,318 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:33,331 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:43,345 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:31:53,358 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:32:03,371 INFO [main]
>> > org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
>> actions
>> > to finish
>> > > 2016-02-14 12:32:13,385 INFO [main]
>> > org.apa

org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000 actions to finish

2016-02-14 Thread anil gupta
Hi,

We are using phoenix4.4, hbase 1.1(hdp2.3.4).
I have a MR job that is using PhoenixOutputFormat. My job keeps on failing
due to following error:

2016-02-14 12:29:43,182 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:29:53,197 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:03,212 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:13,225 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:23,239 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:33,253 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:43,266 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:30:53,279 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:03,293 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:13,305 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:23,318 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:33,331 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:43,345 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:31:53,358 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:03,371 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:13,385 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:23,399 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:33,412 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:43,428 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:32:53,443 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:03,457 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:13,472 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:23,486 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:33,524 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:43,538 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:33:53,551 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:34:03,565 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:34:03,953 INFO [hconnection-0xe82ca6e-shared--pool2-t16]
org.apache.hadoop.hbase.client.AsyncProcess: #1, table=BI.SALES,
attempt=10/35 failed=2000ops, last exception: null on
hdp3.truecar.com,16020,1455326291512, tracking started null, retrying
after=10086ms, replay=2000ops
2016-02-14 12:34:13,578 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish
2016-02-14 12:34:23,593 INFO [main]
org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000
actions to finish

I have never seen anything like this. Can anyone give me pointers about
this problem?

-- 
Thanks & Regards,
Anil Gupta


Re: org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000 actions to finish

2016-02-14 Thread anil gupta
After a while we also get this error:
2016-02-14 12:45:10,515 WARN [main]
org.apache.phoenix.execute.MutationState: Swallowing exception and
retrying after clearing meta cache on connection.
java.sql.SQLException: ERROR 2008 (INT10): Unable to find cached index
metadata.  ERROR 2008 (INT10): ERROR 2008 (INT10): Unable to find
cached index metadata.  key=-594230549321118802
region=BI.SALES,,1455470578449.44e39179789041b5a8c03316730260e7. Index
update failed

We have already set:
phoenix.coprocessor.maxServerCacheTimeToLiveMs18

Upset batch size is 50. Write are quite frequent so the cache would
not timeout in 18ms


On Sun, Feb 14, 2016 at 12:44 PM, anil gupta <anilgupt...@gmail.com> wrote:

> Hi,
>
> We are using phoenix4.4, hbase 1.1(hdp2.3.4).
> I have a MR job that is using PhoenixOutputFormat. My job keeps on failing
> due to following error:
>
> 2016-02-14 12:29:43,182 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:29:53,197 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:03,212 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:13,225 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:23,239 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:33,253 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:43,266 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:30:53,279 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:03,293 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:13,305 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:23,318 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:33,331 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:43,345 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:31:53,358 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:03,371 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:13,385 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:23,399 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:33,412 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:43,428 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:32:53,443 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:03,457 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:13,472 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:23,486 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:33,524 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:43,538 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:33:53,551 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:34:03,565 INFO [main] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, waiting for 2000  actions to 
> finish
> 2016-02-14 12:34:03,953 INFO [hconnection-0xe82ca6e-shared--pool2-t16] 
> org.apache.hadoop.hbase.client.AsyncProcess: #1, table=BI.SALES, 
> attempt=10/35 failed=2000ops, last exception: null on 
> hdp3.truecar.com,16020,1455326291512, tracking started null, retrying 
> after=10086ms, replay=2000ops
> 2016-02-14 12:34:13,578 INFO [main] 
> org.

TinyInt, SmallInt not supported in Pig Phoenix loader

2016-02-13 Thread anil gupta
Hi,

We are using Pig-Phoenix loader to load data into a table. Initially, we
created some columns as TinyInt and SmallInt in our Phoenix table. But, Pig
does not have TinyInt and SmallInt datatypes, so we were forced to convert
all TinyInt and SmallInt columns into INTEGER.
Is there a way/trick we can still use TinyInt and SmallInt in Phoenix table
while using Pig-Phoenix loader?

If currently there is no way to do it, can we enhance Pig-Phoenix loader to
support TinyInt and SmallInt?

-- 
Thanks & Regards,
Anil Gupta


Re: TinyInt, SmallInt not supported in Pig Phoenix loader

2016-02-13 Thread anil gupta
I think, Ravi answered my question. One of my team mate was working on
Pig-Phoenix loader so i'll share this with him. We will update once we try
this out.
Thanks Guys.

On Sat, Feb 13, 2016 at 10:01 AM, James Taylor <jamestay...@apache.org>
wrote:

> I think the question Anil is asking is "Does Pig have support for TinyInt
> (byte) and SmallInt (short)?" I don't know the answer.
>
> On Sat, Feb 13, 2016 at 9:46 AM, Ravi Kiran <maghamraviki...@gmail.com>
> wrote:
>
>> Hi Anil,
>>
>>We do a mapping of PTintInt and PSmallInt to Pig DataType.INTEGER .
>> https://github.com/apache/phoenix/blob/master/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java#L94
>> .  Can you please share the error you are seeing.
>>
>> HTH
>>
>> Ravi.
>>
>> On Sat, Feb 13, 2016 at 3:16 AM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> We are using Pig-Phoenix loader to load data into a table. Initially, we
>>> created some columns as TinyInt and SmallInt in our Phoenix table. But, Pig
>>> does not have TinyInt and SmallInt datatypes, so we were forced to convert
>>> all TinyInt and SmallInt columns into INTEGER.
>>> Is there a way/trick we can still use TinyInt and SmallInt in Phoenix
>>> table while using Pig-Phoenix loader?
>>>
>>> If currently there is no way to do it, can we enhance Pig-Phoenix loader
>>> to support TinyInt and SmallInt?
>>>
>>> --
>>> Thanks & Regards,
>>> Anil Gupta
>>>
>>
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Global Secondary Index: ERROR 2008 (INT10): Unable to find cached index metadata. (PHOENIX-1718)

2016-01-15 Thread anil gupta
Hi James,

Thanks for your reply. My problem was resolved by setting
phoenix.coprocessor.maxServerCacheTimeToLiveMs to 3 minutes and
phoenix.upsert.batch.size to 10. I think, i can increase
phoenix.upsert.batch.size to a higher value but haven't got opportunity to
try that out yet.

Thanks,
Anil Gupta


On Thu, Jan 14, 2016 at 6:28 PM, James Taylor <jamestay...@apache.org>
wrote:

> Hi Anil,
> This error occurs if you're performing an update that takes a long time on
> a mutable table that has a secondary index. In this case, we make an RPC
> before the update which sends index metadata to the region server which
> it'll use for the duration of the update to generate the secondary index
> rows based on the data rows. In this case, the cache entry is expiring
> before the update (i.e. your MR job) completes. Try
> increasing phoenix.coprocessor.maxServerCacheTimeToLiveMs in the region
> server hbase-site.xml. See our Tuning page[1] for more info.
>
> FWIW, 500K rows would be much faster to insert via our standard UPSERT
> statement.
>
> Thanks,
> James
> [1] https://phoenix.apache.org/tuning.html
>
> On Sun, Jan 10, 2016 at 10:18 PM, Anil Gupta <anilgupt...@gmail.com>
> wrote:
>
>> Bump..
>> Can secondary index commiters/experts provide any insight into this? This
>> is one of the feature that encouraged us to use phoenix.
>> Imo, global secondary index should be handled as a inverted index table.
>> So, i m unable to understand why its failing on region splits.
>>
>> Sent from my iPhone
>>
>> On Jan 6, 2016, at 11:14 PM, anil gupta <anilgupt...@gmail.com> wrote:
>>
>> Hi All,
>>
>> I am using Phoenix4.4, i have created a global secondary in one table. I
>> am running MapReduce job with 20 reducers to load data into this
>> table(maybe i m doing 50 writes/second/reducer). Dataset  is around 500K
>> rows only. My mapreduce job is failing due to this exception:
>> Caused by: org.apache.phoenix.execute.CommitException:
>> java.sql.SQLException: ERROR 2008 (INT10): Unable to find cached index
>> metadata.  ERROR 2008 (INT10): ERROR 2008 (INT10): Unable to find cached
>> index metadata.  key=-413539871950113484
>> region=BI.TABLE,\x80M*\xBFr\xFF\x05\x1DW\x9A`\x00\x19\x0C\xC0\x00X8,1452147216490.83086e8ff78b30f6e6c49e2deba71d6d.
>> Index update failed
>> at
>> org.apache.phoenix.execute.MutationState.commit(MutationState.java:444)
>> at
>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:459)
>> at
>> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:456)
>> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>> at
>> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:456)
>> at
>> org.apache.phoenix.mapreduce.PhoenixRecordWriter.write(PhoenixRecordWriter.java:84)
>> ... 14 more
>>
>> It seems like i am hitting
>> https://issues.apache.org/jira/browse/PHOENIX-1718, but i dont have
>> heavy write or read load like wuchengzhi. I haven't dont any tweaking in
>> Phoenix/HBase conf yet.
>>
>> What is the root cause of this error? What are the recommended changes in
>> conf for this?
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Global Secondary Index: ERROR 2008 (INT10): Unable to find cached index metadata. (PHOENIX-1718)

2016-01-10 Thread Anil Gupta
Bump.. 
Can secondary index commiters/experts provide any insight into this? This is 
one of the feature that encouraged us to use phoenix.
Imo, global secondary index should be handled as a inverted index table. So, i 
m unable to understand why its failing on region splits.

Sent from my iPhone

> On Jan 6, 2016, at 11:14 PM, anil gupta <anilgupt...@gmail.com> wrote:
> 
> Hi All,
> 
> I am using Phoenix4.4, i have created a global secondary in one table. I am 
> running MapReduce job with 20 reducers to load data into this table(maybe i m 
> doing 50 writes/second/reducer). Dataset  is around 500K rows only. My 
> mapreduce job is failing due to this exception:
> Caused by: org.apache.phoenix.execute.CommitException: java.sql.SQLException: 
> ERROR 2008 (INT10): Unable to find cached index metadata.  ERROR 2008 
> (INT10): ERROR 2008 (INT10): Unable to find cached index metadata.  
> key=-413539871950113484 
> region=BI.TABLE,\x80M*\xBFr\xFF\x05\x1DW\x9A`\x00\x19\x0C\xC0\x00X8,1452147216490.83086e8ff78b30f6e6c49e2deba71d6d.
>  Index update failed
> at org.apache.phoenix.execute.MutationState.commit(MutationState.java:444)
> at 
> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:459)
> at 
> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:456)
> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> at 
> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:456)
> at 
> org.apache.phoenix.mapreduce.PhoenixRecordWriter.write(PhoenixRecordWriter.java:84)
> ... 14 more
> 
> It seems like i am hitting 
> https://issues.apache.org/jira/browse/PHOENIX-1718, but i dont have heavy 
> write or read load like wuchengzhi. I haven't dont any tweaking in 
> Phoenix/HBase conf yet.
> 
> What is the root cause of this error? What are the recommended changes in 
> conf for this? 
> -- 
> Thanks & Regards,
> Anil Gupta


Re: Issue with connecting to Phoenix in kerberised cluster.

2016-01-05 Thread anil gupta
Hi Durga,

Can you kinit using the same keytab/principal from the node you are trying
to run this program? Is your program able to read keytab file?
Can you try to run this program from the same node that is running sqlline.
Also, dont pass the jdbcjaas.conf this time.
This line seems to provide most info about the problem:
Caused by: java.io.IOException: Login failure for testuser@ENT.LOCAL from
keytab /home/testuser/testuser.keytab:
*javax.security.auth.login.**LoginException:
Unable to obtain password from user*

This seems to point that most probably there is a problem with your keytab,
principal or kerberos setup. I am not an expert at kerberos security. So,
maybe you can also consult with security experts at your workplace.

You can also refer to following links where solution to similar problem is
provided:
1.
http://stackoverflow.com/questions/29844339/kerberos-spring-javax-security-auth-login-loginexception-unable-to-obtain-passw
2.
https://support.pivotal.io/hc/en-us/articles/201914097-Hadoop-daemons-in-a-secured-cluster-fails-to-start-with-Unable-to-obtain-password-from-user-
3.
http://www.moundalexis.com/tm/2013/11/15/two-tiny-problems-while-enabling-kerberos-on-hadoop/
4.
https://community.cloudera.com/t5/CDH-Manual-Installation/Kerberos-integration-issue-s-with-hadoop-HA/td-p/24794

Thanks,
Anil Gupta

On Tue, Jan 5, 2016 at 8:18 PM, Ns G <nsgns...@gmail.com> wrote:

> Hi Team,
>
> Any idea with this issue? We are struck up with this issue and we need to
> provide a solution before Jan 8th.
> Any sugesstions, guidance please.
>
> Thanks,
> Durga Prasad
>
> On Thu, Dec 31, 2015 at 12:14 PM, Ns G <nsgns...@gmail.com> wrote:
>
>> Hi There,
>>
>> Here is my JDBC connection string.
>>
>> My Hbase Cluster is health and Master is running. I am able to run
>> Sqlline successfully.
>>
>> jdbc:phoenix::2181:/hbase:testuser@ENT.LOCAL
>> :/home/testuser/testuser.keytab
>>
>> I am executing the prog through following command
>>
>> *java '-Djava.security.auth.login.config='/home/testuser/jdbcjaas.conf
>> -cp
>> ".:/etc/hadoop/conf:/etc/hbase/conf:/home/testuser/nre/TestJDBC-0.0.1.jar"
>> com.test.FirstExample*
>>
>> I am getting the below error message
>>
>>
>> 15/12/31 01:30:19 INFO query.ConnectionQueryServicesImpl: Trying to
>> connect to a secure cluster with keytab:/home/testuser/testuser.keytab
>> Exception occured:java.sql.SQLException: ERROR 103 (08004): Unable to
>> establish connection.
>> java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
>> at
>> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:388)
>> at
>> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:296)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:179)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1917)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1896)
>> at
>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1896)
>> at
>> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
>> at
>> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
>> at
>> org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
>> at java.sql.DriverManager.getConnection(DriverManager.java:571)
>> at java.sql.DriverManager.getConnection(DriverManager.java:233)
>> at com.test.FirstExample.main(FirstExample.java:24)
>> Caused by: java.io.IOException: Login failure for testuser@ENT.LOCAL
>> from keytab /home/testuser/testuser.keytab:
>> javax.security.auth.login.LoginException: Unable to obtain password from
>> user
>>
>> at
>> org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(UserGroupInformation.java:976)
>> at
>> org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:243)
>> at
>> org.apache.hadoop.hbase.security.User$SecureHadoopUser.login(User.java:383)
>> at org.apache.hadoop.hbase.security.User.login(User.java:250)
>> at
>>

Phoenix MR integration api only accepts Index of column for setting column value

2016-01-05 Thread anil gupta
Hi,

I am using Phoenix4.4. I am trying to integrate my MapReduce job with
Phoenix following this doc: https://phoenix.apache.org/phoenix_mr.html


My phoenix table has around 1000 columns. I have some hesitation regarding
using *COLUMN_INDEX* for setting its value rather than *NAME* as per
following example:

@Override
public void write(PreparedStatement pstmt) throws SQLException {
   pstmt.setString(1, stockName);
   pstmt.setDouble(2, maxPrice);
}

There are couple of problems with above:
1. What if someone deletes a column from table? My guess, It will change
index of some of the columns. Right?(Lets say, a table has 5 columns. 3rd
column of table is deleted.)
2. Readability of code is also less since column names are denoted by
numbers.(in reality it's a name/value pair)

Instead, if we have following API then it will be much easier and above
problems will be fixed:

@Override
public void write(PreparedStatement pstmt) throws SQLException {
   pstmt.setString("STOCK_NAME", stockName);
   pstmt.setDouble("MAX_RECORDING", maxPrice);
}

Also, my coding habits are giving me hard time to code on basis of
index when in reality its a key/value pair. :)

Is there anyway i can achieve the above? Would the community like to
have the key/value api?


-- 
Thanks & Regards,
Anil Gupta


Re: Unable to Use bulkloader to load Control-A delimited file

2015-12-30 Thread anil gupta
Hi James,

We use HDP2.2.
This commit for that JIRA was done in 4.5-HBase-1.1
<https://github.com/apache/phoenix/compare/4.5-HBase-1.1> branch :
https://github.com/apache/phoenix/commit/2ab807d1ef8cb9c1cc06bfd53e8a89ce7379c57f

We also decompiled the downloaded client jar and verified that related code
changes are present in it. Still, the feature is not working. Are we
running right command?

On Wed, Dec 30, 2015 at 5:27 PM, James Taylor <jamestay...@apache.org>
wrote:

> Gabriel may have meant the Cloudera labs release of 4.5.2, but I'm not
> sure if that fix is there or not. We have no plans to do a 4.5.3 release.
> FYI, Andrew put together a 4.6 version that works with CDH here too:
> https://github.com/chiastic-security/phoenix-for-cloudera. We also plan
> to do a 4.7 release soon.
>
> Thanks,
> James
>
>
> On Wed, Dec 30, 2015 at 4:30 PM, anil gupta <anilgupt...@gmail.com> wrote:
>
>> Hi,
>>
>> I figured out that Phoenix4.5.3 is not released yet. So, we downloaded
>> Phoenix client jar from nighly builds of Phoenix:
>> https://builds.apache.org/view/All/job/Phoenix-4.5-HBase-1.1/lastSuccessfulBuild/artifact/phoenix-assembly/target/phoenix-4.5.3-HBase-1.1-SNAPSHOT-client.jar
>>
>> We ran following command:
>> HADOOP_CLASSPATH=`hbase classpath`  hadoop jar
>> /tmp/phoenix-4.5.3-HBase-1.1-SNAPSHOT-client.jar
>> org.apache.phoenix.mapreduce.CsvBulkLoadTool --table ABC_DATA --input
>> /user/abcdref/part-m-0  -d $'\001'
>>
>> We are still getting same error:
>>
>> 2015-12-30 15:12:05,622 FATAL [main] org.apache.hadoop.conf.Configuration: 
>> error parsing conf job.xml
>> org.xml.sax.SAXParseException; systemId: 
>> file:///grid/5/hadoop/yarn/local/usercache/hbase/appcache/application_1448997579389_28875/container_e11_1448997579389_28875_02_01/job.xml;
>>  lineNumber: 78; columnNumber: 74; Character reference "" is an invalid 
>> XML character.
>>  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>>  at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
>>  at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)
>>  at 
>> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2549)
>>  at 
>> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2502)
>>  at 
>> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)
>>  at org.apache.hadoop.conf.Configuration.get(Configuration.java:1232)
>>  at 
>> org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil.initialize(MRWebAppUtil.java:51)
>>  at 
>> org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1444)
>>
>> Is my bulkloader command incorrect?
>>
>>
>> Thanks,
>> Anil Gupta
>>
>> On Wed, Dec 30, 2015 at 11:23 AM, anil gupta <anilgupt...@gmail.com>
>> wrote:
>>
>>> I dont see 4.5.3 release over here:
>>> http://download.nextag.com/apache/phoenix/
>>> Is 4.5.3 not released yet?
>>>
>>> On Wed, Dec 30, 2015 at 11:14 AM, anil gupta <anilgupt...@gmail.com>
>>> wrote:
>>>
>>>> Hi Gabriel,
>>>>
>>>> Thanks for the info. What is the backward compatibility policy of
>>>> Phoenix releases? Would 4.5.3 client jar work with Phoenix4.4 server jar?
>>>> 4.4 and 4.5 are considered two major release or minor releases?
>>>>
>>>> Thanks,
>>>> Anil Gupta
>>>>
>>>> On Tue, Dec 29, 2015 at 11:11 PM, Gabriel Reid <gabriel.r...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Anil,
>>>>>
>>>>> This issue was resolved a while back, via this ticket:
>>>>> https://issues.apache.org/jira/browse/PHOENIX-2238
>>>>>
>>>>> Unfortunately, that fix is only available starting from Phoenix 4.6
>>>>> and 4.5.3 (i.e. it wasn't back-ported to 4.4.x).
>>>>>
>>>>> - Gabriel
>>>>>
>>>>> On Wed, Dec 30, 2015 at 1:21 AM, anil gupta <anilgupt...@gmail.com>
>>>>> wrote:
>>>>> > Hi,
>>>>> > We want to use bulkload tool to load files that are delimited by
>>>>> Control-A.
>>>>> > We are running this command on Phoenix 4.4(HDP2.2):
>>>>> > hadoop jar
>>>>> > /usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.2.0-2950-client.jar
>>>>

Re: Unable to Use bulkloader to load Control-A delimited file

2015-12-30 Thread anil gupta
Hi Gabriel,

Thanks for the info. What is the backward compatibility policy of Phoenix
releases? Would 4.5.3 client jar work with Phoenix4.4 server jar?
4.4 and 4.5 are considered two major release or minor releases?

Thanks,
Anil Gupta

On Tue, Dec 29, 2015 at 11:11 PM, Gabriel Reid <gabriel.r...@gmail.com>
wrote:

> Hi Anil,
>
> This issue was resolved a while back, via this ticket:
> https://issues.apache.org/jira/browse/PHOENIX-2238
>
> Unfortunately, that fix is only available starting from Phoenix 4.6
> and 4.5.3 (i.e. it wasn't back-ported to 4.4.x).
>
> - Gabriel
>
> On Wed, Dec 30, 2015 at 1:21 AM, anil gupta <anilgupt...@gmail.com> wrote:
> > Hi,
> > We want to use bulkload tool to load files that are delimited by
> Control-A.
> > We are running this command on Phoenix 4.4(HDP2.2):
> > hadoop jar
> > /usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.2.0-2950-client.jar
> > org.apache.phoenix.mapreduce.CsvBulkLoadTool --table LEAD_SALES_DATA
> --input
> > /user/psawant/part-m-0 -o /tmp/phx_bulk -d $'\001'
> >
> > Above command is as per this phoenix doc:
> > https://phoenix.apache.org/bulk_dataload.html
> >
> > I have tried to look here:
> https://issues.apache.org/jira/browse/HADOOP-7542
> >
> > Similar to https://issues.apache.org/jira/browse/HBASE-3623, we dont
> encode
> > special characters with Base64 encoding?
> >
> > We get this error:
> >
> > 2015-12-29 15:26:43,801 INFO [main]
> > org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Created MRAppMaster for
> > application appattempt_1448997579389_27927_01
> > 2015-12-29 15:26:44,105 FATAL [main]
> org.apache.hadoop.conf.Configuration:
> > error parsing conf job.xml
> > org.xml.sax.SAXParseException; systemId:
> >
> file:///grid/4/hadoop/yarn/local/usercache/hbase/appcache/application_1448997579389_27927/container_e11_1448997579389_27927_01_01/job.xml;
> > lineNumber: 78; columnNumber: 74; Character reference "" is an invalid
> > XML character.
> >   at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> >   at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> >   at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
> >   at
> org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)
> >   at
> >
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2549)
> >   at
> >
> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2502)
> >   at
> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)
> >   at
> org.apache.hadoop.conf.Configuration.get(Configuration.java:1232)
> >   at
> >
> org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil.initialize(MRWebAppUtil.java:51)
> >   at
> >
> org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1444)
> >
> >
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta


Re: Unable to Use bulkloader to load Control-A delimited file

2015-12-30 Thread anil gupta
Hi,

I figured out that Phoenix4.5.3 is not released yet. So, we downloaded
Phoenix client jar from nighly builds of Phoenix:
https://builds.apache.org/view/All/job/Phoenix-4.5-HBase-1.1/lastSuccessfulBuild/artifact/phoenix-assembly/target/phoenix-4.5.3-HBase-1.1-SNAPSHOT-client.jar

We ran following command:
HADOOP_CLASSPATH=`hbase classpath`  hadoop jar
/tmp/phoenix-4.5.3-HBase-1.1-SNAPSHOT-client.jar
org.apache.phoenix.mapreduce.CsvBulkLoadTool --table ABC_DATA --input
/user/abcdref/part-m-0  -d $'\001'

We are still getting same error:

2015-12-30 15:12:05,622 FATAL [main]
org.apache.hadoop.conf.Configuration: error parsing conf job.xml
org.xml.sax.SAXParseException; systemId:
file:///grid/5/hadoop/yarn/local/usercache/hbase/appcache/application_1448997579389_28875/container_e11_1448997579389_28875_02_01/job.xml;
lineNumber: 78; columnNumber: 74; Character reference "" is an
invalid XML character.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2549)
at 
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2502)
at 
org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1232)
at 
org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil.initialize(MRWebAppUtil.java:51)
at 
org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1444)

Is my bulkloader command incorrect?


Thanks,
Anil Gupta

On Wed, Dec 30, 2015 at 11:23 AM, anil gupta <anilgupt...@gmail.com> wrote:

> I dont see 4.5.3 release over here:
> http://download.nextag.com/apache/phoenix/
> Is 4.5.3 not released yet?
>
> On Wed, Dec 30, 2015 at 11:14 AM, anil gupta <anilgupt...@gmail.com>
> wrote:
>
>> Hi Gabriel,
>>
>> Thanks for the info. What is the backward compatibility policy of Phoenix
>> releases? Would 4.5.3 client jar work with Phoenix4.4 server jar?
>> 4.4 and 4.5 are considered two major release or minor releases?
>>
>> Thanks,
>> Anil Gupta
>>
>> On Tue, Dec 29, 2015 at 11:11 PM, Gabriel Reid <gabriel.r...@gmail.com>
>> wrote:
>>
>>> Hi Anil,
>>>
>>> This issue was resolved a while back, via this ticket:
>>> https://issues.apache.org/jira/browse/PHOENIX-2238
>>>
>>> Unfortunately, that fix is only available starting from Phoenix 4.6
>>> and 4.5.3 (i.e. it wasn't back-ported to 4.4.x).
>>>
>>> - Gabriel
>>>
>>> On Wed, Dec 30, 2015 at 1:21 AM, anil gupta <anilgupt...@gmail.com>
>>> wrote:
>>> > Hi,
>>> > We want to use bulkload tool to load files that are delimited by
>>> Control-A.
>>> > We are running this command on Phoenix 4.4(HDP2.2):
>>> > hadoop jar
>>> > /usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.2.0-2950-client.jar
>>> > org.apache.phoenix.mapreduce.CsvBulkLoadTool --table LEAD_SALES_DATA
>>> --input
>>> > /user/psawant/part-m-0 -o /tmp/phx_bulk -d $'\001'
>>> >
>>> > Above command is as per this phoenix doc:
>>> > https://phoenix.apache.org/bulk_dataload.html
>>> >
>>> > I have tried to look here:
>>> https://issues.apache.org/jira/browse/HADOOP-7542
>>> >
>>> > Similar to https://issues.apache.org/jira/browse/HBASE-3623, we dont
>>> encode
>>> > special characters with Base64 encoding?
>>> >
>>> > We get this error:
>>> >
>>> > 2015-12-29 15:26:43,801 INFO [main]
>>> > org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Created MRAppMaster for
>>> > application appattempt_1448997579389_27927_01
>>> > 2015-12-29 15:26:44,105 FATAL [main]
>>> org.apache.hadoop.conf.Configuration:
>>> > error parsing conf job.xml
>>> > org.xml.sax.SAXParseException; systemId:
>>> >
>>> file:///grid/4/hadoop/yarn/local/usercache/hbase/appcache/application_1448997579389_27927/container_e11_1448997579389_27927_01_01/job.xml;
>>> > lineNumber: 78; columnNumber: 74; Character reference "" is an
>>> invalid
>>> > XML character.
>>> >   at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>> >   at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>&

Unable to Use bulkloader to load Control-A delimited file

2015-12-29 Thread anil gupta
Hi,
We want to use bulkload tool to load files that are delimited by Control-A.
We are running this command on Phoenix 4.4(HDP2.2):
hadoop jar
/usr/hdp/current/phoenix-client/phoenix-4.4.0.2.3.2.0-2950-client.jar
org.apache.phoenix.mapreduce.CsvBulkLoadTool --table LEAD_SALES_DATA
--input /user/psawant/part-m-0 -o /tmp/phx_bulk -d $'\001'

Above command is as per this phoenix doc:
https://phoenix.apache.org/bulk_dataload.html

I have tried to look here: https://issues.apache.org/jira/browse/HADOOP-7542

Similar to https://issues.apache.org/jira/browse/HBASE-3623, we dont encode
special characters with Base64 encoding?

We get this error:

2015-12-29 15:26:43,801 INFO [main]
org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Created MRAppMaster
for application appattempt_1448997579389_27927_01
2015-12-29 15:26:44,105 FATAL [main]
org.apache.hadoop.conf.Configuration: error parsing conf job.xml
org.xml.sax.SAXParseException; systemId:
file:///grid/4/hadoop/yarn/local/usercache/hbase/appcache/application_1448997579389_27927/container_e11_1448997579389_27927_01_01/job.xml;
lineNumber: 78; columnNumber: 74; Character reference "" is an
invalid XML character.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2549)
at 
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2502)
at 
org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1232)
at 
org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil.initialize(MRWebAppUtil.java:51)
at 
org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1444)



-- 
Thanks & Regards,
Anil Gupta


Re: REG: Accessing Phoenix in a kerberised Cluster

2015-12-22 Thread anil gupta
Hi James,
That blogpost(
http://bigdatanoob.blogspot.com/2013/09/connect-phoenix-to-secure-hbase-cluster.html)
did not cover how to natively connect to a secure cluster for Phoenix3.0+
releases. I have updated that post today. Please let me know if you would
like me to add anything else.

@Ns G, Please follow the post and let us know how it goes. It should be
pretty easy.

Thanks,
Anil Gupta

On Tue, Dec 22, 2015 at 10:24 PM, James Taylor <jamestay...@apache.org>
wrote:

> See
> https://phoenix.apache.org/faq.html#How_do_I_connect_to_secure_HBase_cluster
>
> On Tue, Dec 22, 2015 at 8:42 PM, Ns G <nsgns...@gmail.com> wrote:
>
>> Hi There,
>>
>> Can any one provide me guidelines on how to install and access phoenix on
>> a kerberised cluster? How to use keytab in jdbc to connect to phoenix?
>>
>> Thanks,
>>
>>
>


-- 
Thanks & Regards,
Anil Gupta


Re: Phoenix JDBC connection to secure HBase fails

2015-12-09 Thread anil gupta
Hi Akhilesh,

You can add hbase/hadoop config directories in application classpath. You
dont need to copy conf files in your app lib folder.

Thanks,
Anil Gupta

On Wed, Dec 9, 2015 at 2:54 PM, Biju N <bijuatapa...@gmail.com> wrote:

> Thanks Akhilesh/Mujtaba for your suggestions. Adding core-site.xml from
> the target cluster to the class path resolved the issue. We initially only
> had hbase and hdfs site xmls in the class path.  Is there a way to set the
> hbase/core site properties in the code instead of copying the config xmls
> to the class path.
>
> On Tue, Dec 8, 2015 at 1:39 PM, Mujtaba Chohan <mujt...@apache.org> wrote:
>
>> Add the following java parameter to connect to secure cluster:
>> -Djava.security.auth.login.config=$yourpath/conf/zk-jaas.conf
>> -Djava.security.krb5.conf=$yourpath/krb5.conf. More detailed instruction
>> are at
>>
>> http://bigdatanoob.blogspot.com/2013/09/connect-phoenix-to-secure-hbase-cluster.html
>> .
>>
>>
>> //mujtaba
>>
>> On Tue, Dec 8, 2015 at 7:20 AM, Biju N <bijuatapa...@gmail.com> wrote:
>>
>> > Hi There,
>> >We are trying to connect to a secure HBase/Phoenix cluster through
>> > Phoenix JDBC using a kerberos Keytab and Principal. Using the same
>> Keytab
>> > and principal we are able to connect successfully to HBase through HBase
>> > APIs but the connection request fails when making the Phoenix JDBC
>> > connection.
>> >
>> > The JDBC connection string used is of the format
>> >
>> > "jdbc:phoenix:zkquorum:/hbase:princi...@realm.com:keytab-file-path"
>> >
>> > and the following is the exception. If any pointers to what could be the
>> > cause for this exception that would be helpful. We are using Phoenix 4.2
>> > against hbase 98.x.
>> >
>> > 34039 [main] FATAL org.apache.hadoop.hbase.ipc.RpcClient  - SASL
>> > authentication failed. The most likely cause is missing or invalid
>> > credentials. Consider 'kinit'.
>> > javax.security.sasl.SaslException: GSS initiate failed [Caused by
>> > GSSException: No valid credentials provided (Mechanism level: Failed to
>> > find any Kerberos tgt)]
>> > at
>> >
>> >
>> com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.security.HBaseSaslRpcClient.saslConnect(HBaseSaslRpcClient.java:177)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection.setupSaslConnection(RpcClient.java:815)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection.access$800(RpcClient.java:349)
>> > at
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection$2.run(RpcClient.java:943)
>> > at
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection$2.run(RpcClient.java:940)
>> > at java.security.AccessController.doPrivileged(Native Method)
>> > at javax.security.auth.Subject.doAs(Subject.java:422)
>> > at
>> >
>> >
>> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection.setupIOstreams(RpcClient.java:940)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection.writeRequest(RpcClient.java:1094)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$Connection.tracedWriteRequest(RpcClient.java:1061)
>> > at
>> org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1516)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1724)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1777)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(ConnectionManager.java:1664)
>> > at
>> >
>> >
>> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(ConnectionManag

  1   2   >