[ 
https://issues.apache.org/jira/browse/PHOENIX-6973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17764211#comment-17764211
 ] 

Tamas Payer commented on PHOENIX-6973:
--------------------------------------

*Manual testing steps of the NOVERIFY option:*

Create phoenix table, add data and select.
{noformat}
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> create table TEST6 (mykey 
integer not null primary key, mycolumn varchar) COLUMN_ENCODED_BYTES=1;
No rows affected (2.805 seconds)
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> upsert into test6 values 
(1,'Hello');
1 row affected (0.114 seconds)
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> upsert into test6 values 
(2,'World!');
1 row affected (0.013 seconds)
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> select * from test6;
+-------+----------+
| MYKEY | MYCOLUMN |
+-------+----------+
| 1     | Hello    |
| 2     | World!   |
+-------+----------+
2 rows selected (0.053 seconds){noformat}
Scan the table and see the columns with empty qualifier: "0:\x00\x00\x00\x00"
{noformat}
hbase:116:0> scan 'TEST6';
ROW                                                                          
COLUMN+CELL
 \x80\x00\x00\x01                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:28:15.338, value=x
 \x80\x00\x00\x01                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:15.338, value=Hello
 \x80\x00\x00\x02                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:28:23.897, value=x
 \x80\x00\x00\x02                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:23.897, value=World!
2 row(s)
Took 0.1369 seconds{noformat}
Delete the table from the catalog and restart the RegionServers.
{noformat}
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> delete from SYSTEM.CATALOG where 
TABLE_NAME='TEST6';
4 rows affected (0.038 seconds){noformat}
Update the values of the cells with with empty columns qualifier.
{noformat}
hbase:119:0> put 'TEST6', "\x80\x00\x00\x01", "0:\x00\x00\x00\x00", 'testvalue1'
Took 0.0526 seconds
hbase:120:0> put 'TEST6', "\x80\x00\x00\x02", "0:\x00\x00\x00\x00", 'testvalue2'
Took 0.0064 seconds
hbase:121:0> scan 'TEST6';
ROW                                                                          
COLUMN+CELL
 \x80\x00\x00\x01                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:35:08.183, value=testvalue1
 \x80\x00\x00\x01                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:15.338, value=Hello
 \x80\x00\x00\x02                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:35:14.048, value=testvalue2
 \x80\x00\x00\x02                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:23.897, value=World!
2 row(s)
Took 0.0109 seconds{noformat}
Recreate the table first *without NOVERIFY* argument. See that the value is 
changed back to 'x' as expected.
{noformat}
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> create table TEST6 (mykey 
integer not null primary key, mycolumn varchar) COLUMN_ENCODED_BYTES=1;
2 rows affected (0.446 seconds)
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> select * from test6;
+-------+----------+
| MYKEY | MYCOLUMN |
+-------+----------+
| 1     | Hello    |
| 2     | World!   |
+-------+----------+
2 rows selected (0.193 seconds)

hbase:122:0> scan 'TEST6';
ROW                                                                          
COLUMN+CELL
 \x80\x00\x00\x01                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:35:08.183, value=x
 \x80\x00\x00\x01                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:15.338, value=Hello
 \x80\x00\x00\x02                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:35:14.048, value=x
 \x80\x00\x00\x02                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:23.897, value=World!
2 row(s)
Took 0.0073 seconds{noformat}
Delete the table again from the catalog and restart RSs.
{noformat}
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> delete from SYSTEM.CATALOG where 
TABLE_NAME='TEST6';
4 rows affected (0.043 seconds){noformat}
Update the values again on the cells with with empty columns qualifier.
{noformat}
hbase:124:0> put 'TEST6', "\x80\x00\x00\x01", "0:\x00\x00\x00\x00", 'testvalue1'
Took 0.0554 seconds
hbase:125:0> put 'TEST6', "\x80\x00\x00\x02", "0:\x00\x00\x00\x00", 'testvalue2'
Took 0.0086 seconds
hbase:126:0> scan 'TEST6';
ROW                                                                          
COLUMN+CELL
 \x80\x00\x00\x01                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:39:04.884, value=testvalue1
 \x80\x00\x00\x01                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:15.338, value=Hello
 \x80\x00\x00\x02                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:39:09.924, value=testvalue2
 \x80\x00\x00\x02                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:23.897, value=World!
2 row(s)
Took 0.0111 seconds{noformat}
Recreate the table again *with NOVERIFY* argument. See that the value is intact 
as expected.
{noformat}
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> create table TEST6 (mykey 
integer not null primary key, mycolumn varchar) NOVERIFY COLUMN_ENCODED_BYTES=1;
No rows affected (0.099 seconds)
0: jdbc:phoenix:payer-p-1.payer-p.root.hwx.si> select * from test6;
+-------+----------+
| MYKEY | MYCOLUMN |
+-------+----------+
| 1     | Hello    |
| 2     | World!   |
+-------+----------+
2 rows selected (0.662 seconds)

hbase:127:0> scan 'TEST6';
ROW                                                                          
COLUMN+CELL
 \x80\x00\x00\x01                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:39:04.884, value=testvalue1
 \x80\x00\x00\x01                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:15.338, value=Hello
 \x80\x00\x00\x02                                                            
column=0:\x00\x00\x00\x00, timestamp=2023-09-12T13:39:09.924, value=testvalue2
 \x80\x00\x00\x02                                                            
column=0:\x8B, timestamp=2023-09-12T13:28:23.897, value=World!
2 row(s)
Took 0.0082 seconds{noformat}

> Add option to CREATE TABLE to skip verification of HBase table
> --------------------------------------------------------------
>
>                 Key: PHOENIX-6973
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6973
>             Project: Phoenix
>          Issue Type: New Feature
>          Components: core
>            Reporter: Tamas Payer
>            Assignee: Tamas Payer
>            Priority: Major
>             Fix For: 5.2.0
>
>
> When a Phoenix table is restored from snapshot we should have the option to 
> skip the lengthy validation process. CREATE TABLE should have an option to 
> skip the verification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to