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

Andrew Kyle Purtell edited comment on PHOENIX-7309 at 6/3/24 9:35 PM:
----------------------------------------------------------------------

bq. While Phoenix can do something similar to what HBase shell does, I believe 
rather than Phoenix having to read the whole split file (with potentially 10k 
or 50k worth of split keys) and create split keys array, it would be great if 
HBase can provide public Admin API with input as split file. 

HBase is unlikely to agree to have the master read some file from a user 
supplied (untrusted) location. My initial reaction is to veto it as 
unnecessary, because the functionality already exists in the API, and changes 
to public APIs involve some nontrivial work to avoid compatibility issues. 
Also, accepting user supplied input from the filesystem means attacker file 
level risks become possible.  

bq. While Phoenix can do something similar to what HBase shell does

Yes, you see what is implemented in jruby for the shell. Simply reimplement 
this in Java for your purposes, and modify for requirements.


was (Author: apurtell):
bq. While Phoenix can do something similar to what HBase shell does, I believe 
rather than Phoenix having to read the whole split file (with potentially 10k 
or 50k worth of split keys) and create split keys array, it would be great if 
HBase can provide public Admin API with input as split file. 

HBase is unlikely to agree to have the master read some file from a user 
supplied (untrusted) location. My initial reaction is to veto it as 
unnecessary, because the functionality already exists in the API, and changes 
to public APIs involve some nontrivial work to avoid compatibility issues. 
Also, accepting user supplied input from the filesystem means attacker file 
level risks become possible.  



> Support specifying splits.txt file while creating a table.
> ----------------------------------------------------------
>
>                 Key: PHOENIX-7309
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7309
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Rushabh Shah
>            Priority: Major
>
> Currently phoenix grammar support specifying splits points while creating a 
> table.
> See grammar [here|https://phoenix.apache.org/language/index.html#create_table]
> {noformat}
> CREATE TABLE IF NOT EXISTS "my_case_sensitive_table"
>     ( "id" char(10) not null primary key, "value" integer)
>     DATA_BLOCK_ENCODING='NONE',VERSIONS=5,MAX_FILESIZE=2000000 split on (?, 
> ?, ?)
> {noformat}
> This works fine if you have few split points (less than 10-20). 
> But if you want to specify 1000 (or in 10,000s) split points then this API 
> becomes very cumbersome to use.
> HBase provides API to create a table with split points text file.
> {noformat}
>   hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
> {noformat}
> We should also have support in Phoenix to provide split points in a text file.



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

Reply via email to