Our coprocessors are all in com.salesforce.phoenix.coprocessor. The
particular one that handles TopN is ScanRegionObserver.
The expression evaluation classes are in
com.salesforce.phoenix.expression, with a base interface of Expression.
The type system is in com.salesforce.phoenix.schema. Take a look at
PDataType - that's where the SQL types are defined.
The ORDER BY evaluation is mostly handled by the expression classes, but
there's a little bit more in OrderByExpression.
Besides the expression evaluation, a lot of the runtime is handled
through nested iterators. Take a look at com.salesforce.phoenix.iterate
and in particular for TopN the OrderedResultIterator class. Also, if you
want to see how we nest the iterators, take a look at the implementors
of com.salesforce.phoenix.execute.QueryPlan - ScanPlan and AggregatePlan.
Might be useful to build the javadocs too - that'll give you a bit more
detail.
Regards,
James
On 05/20/2013 04:07 AM, Azuryy Yu wrote:
why off-list? it would be better share here.
--Send from my Sony mobile.
On May 18, 2013 12:14 AM, "James Taylor" <[email protected]> wrote:
Anil,
Yes, everything is in the Phoenix GitHub repo. Will give you more detail
of specific packages and classes off-list.
Thanks,
James
On 05/16/2013 05:33 PM, anil gupta wrote:
Hi James,
Is this implementation present in the GitHub repo of Phoenix? If yes, can
you provide me the package name/classes?
I haven't got the opportunity to try out Phoenix yet but i would like to
have a look at the implementation.
Thanks,
Anil Gupta
On Thu, May 16, 2013 at 4:15 PM, James Taylor <[email protected]
wrote:
Hi Anil,
No HBase changes were required. We're already leveraging coprocessors in
HBase which is a key enabler. The other pieces needed are:
- a type system
- a means to evaluate an ORDER BY expression on the server
- memory tracking/throttling (the topN for each region are held in memory
until the client does a merge sort)
Phoenix has all these, so it was just a matter of packaging them up to
support this.
Thanks,
James
On 05/16/2013 02:02 PM, anil gupta wrote:
Hi James,
You have mentioned support for TopN query. Can you provide me HBase Jira
ticket for that. I am also doing similar stuff in
https://issues.apache.org/****jira/browse/HBASE-7474<https://issues.apache.org/**jira/browse/HBASE-7474>
<https:/**/issues.apache.org/jira/**browse/HBASE-7474<https://issues.apache.org/jira/browse/HBASE-7474>
.
I am interested in
knowing the details about that implementation.
Thanks,
Anil Gupta
On Thu, May 16, 2013 at 12:29 PM, James Taylor <[email protected]
wrote:
We are pleased to announce the immediate availability of Phoenix 1.2 (
https://github.com/******forcedotcom/phoenix/wiki/******Download<https://github.com/****forcedotcom/phoenix/wiki/****Download>
<https://github.com/****forcedotcom/phoenix/wiki/****Download<https://github.com/**forcedotcom/phoenix/wiki/**Download>
<https://github.com/****forcedotcom/phoenix/wiki/****Download<https://github.com/**forcedotcom/phoenix/wiki/**Download>
<https://github.com/**forcedotcom/phoenix/wiki/**Download<https://github.com/forcedotcom/phoenix/wiki/Download>
).
Here are some of the release highlights:
* Improve performance of multi-point and multi-range queries (20x plus)
using new skip scan
* Support TopN queries (3-70x faster than Hive)
* Control row key order when defining primary key columns
* Salt tables declaratively to prevent hot spotting
* Specify columns dynamically at query time
* Write Phoenix-compliant HFiles from Pig scripts and Map/Reduce jobs
* Support SELECT DISTINCT
* Leverage essential column family feature
* Bundle command line terminal interface
* Specify scale and precision on decimal type
* Support fixed length binary type
* Add TO_CHAR, TO_NUMBER, COALESCE, UPPER, LOWER, and REVERSE built-in
functions
HBase 0.94.4 or above is required with HBase 0.94.7 being recommended.
For
more detail, please see our announcement:
http://phoenix-hbase.blogspot.
****
com/2013/05/announcing-******phoenix-12.html<http://**
phoenix-hbase.blogspot.com/****2013/05/announcing-phoenix-12.****html<http://phoenix-hbase.blogspot.com/**2013/05/announcing-phoenix-12.**html>
<http://phoenix-hbase.**blogspot.com/2013/05/**
announcing-phoenix-12.html<http://phoenix-hbase.blogspot.com/2013/05/announcing-phoenix-12.html>
Regards,
James
@JamesPlusPlus
http://phoenix-hbase.blogspot.******com/ <http://phoenix-hbase.**
blogspot.com/
<http://phoenix-hbase.**blogspot.com/<http://phoenix-hbase.blogspot.com/>