Andy explained the problem clearly.
In addition, there is a hbase coprocessor article under review at:
https://docs.google.com/document/d/1PgfgBcqk2iPZOZId9LonUMx_Dz49ICEAQQzktVt5hpY/edit
It can help you to understand more about coprocessor. After a public
review, It will be posted to apache blog site.
Thanks,
Mingjie
On 01/26/2012 10:58 AM, Andrew Purtell wrote:
Praveen,
What are the differences between filters and coprocessors leaving
aside the code/API?
I don't think one can leave aside the API ...
Filters came first. They were a query performance optimization, pushing
predicates to execute server side, eliminating unnecessary data transfer over
the network and unnecessary processing at the client. The API for writing
filters and the opportunities for executing filter code were constrained to
this use case.
Coprocessors extend opportunities for server side execution. They could be used
to implement filtering alternatives. They also make it possible now to do
things much like triggers and stored procedures. The API for writing
coprocessors and opportunities for executing coprocessor code cover many more
extension use cases now.
One thing I can think is, filters are defined at the client, while
the coprocessors are defined on the server. So, coprocessors are
reusable across clients.
I'm not sure that is a valid distinction.
It might help you to think of both filters and coprocessors as extensions
loaded into the server runtime. In both cases, code, from the developer or from
the distribution, is loaded on demand into the regionserver (though with
coprocessors it can be more dynamic than with filters). In both cases, the
client builds a request which is acted upon server side by newly resident code
there.
Best regards,
- Andy
Problems worthy of attack prove their worth by hitting back. - Piet Hein (via
Tom White)
________________________________
From: Praveen Sripati<[email protected]>
To: [email protected]
Sent: Wednesday, January 25, 2012 10:24 PM
Subject: Difference between coprocessors and filters
Hi,
Coprocessors introduced in 0.92 can also be used to filter out the data
similar to the filters. What are the differences between filters and
coprocessors leaving aside the code/API? One thing I can think is, filters
are defined at the client, while the coprocessors are defined on the
server. So, coprocessors are reusable across clients.
Regards,
Praveen