hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Purtell <apurt...@apache.org>
Subject Re: Difference between coprocessors and filters
Date Thu, 26 Jan 2012 18:58:57 GMT
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 <praveensripati@gmail.com>
>To: user@hbase.apache.org 
>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
>
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message