Created 08-25-2016 01:48 PM
I'm running Phoenix in a cluster with 3 region servers and salting the row key specifying the property "SALT_BUCKETS" = 3 when creating the table.
When querying the table I expect the resulting scan to be return ordered by row key but when merging the results across the different RSs but I'm getting a mixed merge rather a sort merge.
I could add an "order by" clause by row key and it solves the issue but it implies to know the row key in advance and adding every time I run a query.
I have also tried setting the property 'phoenix.query.rowKeyOrderSaltedTable' to true in hbase-site.xml as Phoenix documentation suggests but it does not make any difference.
Is there any better way to resolve that rather than appending an "order by" clause to the query??
Using Phoenix 4.4 and HDP 2.4.2
Created 08-25-2016 01:56 PM
"phoenix.query.rowKeyOrderSaltedTable" is the client property, can you make sure hbase-site.xml is in the classpath of your application/sqlline.
Created 08-25-2016 01:56 PM
"phoenix.query.rowKeyOrderSaltedTable" is the client property, can you make sure hbase-site.xml is in the classpath of your application/sqlline.
Created 08-25-2016 02:32 PM
I'm using sqlline.py as phoenix client and it includes "/etc/hbase/conf" in phoenix_class_path, hbase-site.xml file is there with "phoenix.query.rowKeyOrderSaltedTable" to true
Created 08-25-2016 02:45 PM
would you mind try again by setting this phoenix.query.force.rowkeyorder to true too. as phoenix.query.rowKeyOrderSaltedTable got deprecated with phoenix.query.force.rowkeyorder in some release.
Created 08-25-2016 03:03 PM
That one did the job! Now I'm getting the results in the right order and I can see the "CLIENT MERGE SORT" in the query plan explanation.
Thanks!