v2 field - index type is decimal but table has bigint type.

2018-03-27 Thread Adi Kadimetla
Hi group,

CREATE TABLE my_table (k VARCHAR PRIMARY KEY, v1 VARCHAR, v2 BIGINT);

v2 - BIGINT

CREATE INDEX my_index ON my_table (v2) INCLUDE (v1);

MY_INDEX| 0:V2 | 3  | DECIMAL

In my_index v2 type is decimal. I wanted to know data type change from
bigint in the  table to decimal in  the index this is expected.


phoenix-4.7.0

HDP - 2.6.3

Thanks


Re: phoenix table with 50 salt buckets ( regions ) - now shows as 68 regions and18 of them stale

2018-03-22 Thread Adi Kadimetla
I did not set any split policy. I was under assumption
'hbase.hregion.max.filesize' => '107374182400' ( 100 GB ) this property
would take care and size was also with in 33 GB.

I want to understand even if split happens it's of no use, as the first
salt byte 1 - 49 are used for putting the keys into the region. Do we need
CostantSizeRegionSplitPolicy for pre split regions in this case using salt.


On Thu, Mar 22, 2018 at 5:21 PM, Jonathan Leech <jonat...@gmail.com> wrote:

> Did you set the split policy to CostantSizeRegionSplitPolicy?
>
> > On Mar 22, 2018, at 2:56 PM, Adi Kadimetla <kadime...@gmail.com> wrote:
> >
> > Group,
> > TABLE - with 50 salt buckets and configured as time series table.
> >
> > Having pre split into 50 SALT buckets we disabled the region splits
> using max file size as 100 GB for the split.
> >
> > I see some of the keys got split and created stale regions.
> >
> > no writes are happening into the region f3f0a711370c8acb88f5294ec9dfa648
> >
> > region - f3f0a711370c8acb88f5294ec9dfa648
> > start key - .\x00x\00 ... ( all x\00 )
> > end key - .\x80\x00\x01`\x02<8\x07\x00\x00\x00\x00\x81\x80\x00\x01`\
> x02<\x14`\x00\x00\x00\x005VPK06CewQV2nI_1qS6baA\x00oAPASXODoBkIBIYJT3BPrQ
> >
> >
> > All the writes are going to this region 7feabc1eea26727c03366efba27f20
> 16.
> >
> > region - 7feabc1eea26727c03366efba27f2016
> > start key - .\x80\x00\x01`\x02<8\x07\x00\x00\x00\x00\x81\x80\x00\x01`\
> x02<\x14`\x00\x00\x00\x005VPK06CewQV2nI_1qS6baA\x00oAPASXODoBkIBIYJT3BPrQ
> >
> > end key - /\x00\x00 ... ( all x\00 )
> >
> >
> > salt bucket byte - hash(row key) % N salt buckets
> >
> >
> > I was expecting only salt bucket bytes for the start and end keys.
> Instead I see row keys have been appended to the salt bucket byte and those
> regions are not used.
> >
> > Any pointer what caused the split and how to prevent.
> >
> > Command to remove stale region and restore as contiguous start and end
> keys.
> >
> > region - 7feabc1eea26727c03366efba27f2016
> >
> > start key - .\x00\x00 .. ( all x\00 )
> >
> > end key - /\x00\x00 ... ( all x\00 )
> >
> >
> > HDP  - 2.6.3
> > HBase 1.1.2
> > Phoenix 4.7.0
> >
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>


phoenix table with 50 salt buckets ( regions ) - now shows as 68 regions and18 of them stale

2018-03-22 Thread Adi Kadimetla
Group,
TABLE - with 50 salt buckets and configured as time series table.

Having pre split into 50 SALT buckets we disabled the region splits using
max file size as 100 GB for the split.

I see some of the keys got split and created stale regions.

no writes are happening into the region f3f0a711370c8acb88f5294ec9dfa648

region - f3f0a711370c8acb88f5294ec9dfa648
start key - .\x00x\00 ... ( all x\00 )
end key -
.\x80\x00\x01`\x02<8\x07\x00\x00\x00\x00\x81\x80\x00\x01`\x02<\x14`\x00\x00\x00\x005VPK06CewQV2nI_1qS6baA\x00oAPASXODoBkIBIYJT3BPrQ


All the writes are going to this region 7feabc1eea26727c03366efba27f2016.

region - 7feabc1eea26727c03366efba27f2016
start key -
.\x80\x00\x01`\x02<8\x07\x00\x00\x00\x00\x81\x80\x00\x01`\x02<\x14`\x00\x00\x00\x005VPK06CewQV2nI_1qS6baA\x00oAPASXODoBkIBIYJT3BPrQ

end key - /\x00\x00 ... ( all x\00 )


salt bucket byte - hash(row key) % N salt buckets


I was expecting only salt bucket bytes for the start and end keys. Instead
I see row keys have been appended to the salt bucket byte and those regions
are not used.

Any pointer what caused the split and how to prevent.

Command to remove stale region and restore as contiguous start and end
keys.

region - 7feabc1eea26727c03366efba27f2016

start key - .\x00\x00 .. ( all x\00 )

end key - /\x00\x00 ... ( all x\00 )


HDP  - 2.6.3
HBase 1.1.2
Phoenix 4.7.0


Thanks


how to update cache_size in SYSTEM."SEQUENCE"

2017-11-06 Thread Adi Kadimetla
Hi Team,

I need help  to update cache_size in SYSTEM."SEQUENCE" for a
SEQUENCE_NAME.  I tried below upsert command but there is no upsert syntax
with where clause.


upsert into SYSTEM."SEQUENCE"(CACHE_SIZE) VALUES(0) where
SEQUENCE_NAME='SUBSCRIPTION_SEQUENCE'

Thanks


store ROW_TIMESTAMP as TIMESTAMP in nanoseconds

2017-08-30 Thread Adi Kadimetla
Hi Team,
I would like to store ROW_TIMESTAMP  as TIMESTAMP in nanoseconds, what is
the best way to generate Timestamp with nanoseconds and when I query using
ROW_TIMESTAMP stored in nanoseconds do I loose the precision to
milliseconds.

Thanks