Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Coprocessors on specific servers


+
Mohammad Tariq 2012-06-26, 15:44
+
Lars George 2012-06-26, 15:48
+
Mohammad Tariq 2012-06-26, 16:44
+
Amandeep Khurana 2012-06-27, 18:06
+
Lars George 2012-06-27, 18:27
+
Mohammad Tariq 2012-06-27, 21:43
+
Mohammad Tariq 2012-06-27, 21:45
+
fding hbase 2012-06-28, 04:36
Copy link to this message
-
Re: Coprocessors on specific servers
Yes exactly, this plus what Mohammad says, use the internal scanner to get just the data from the region once you are in the coprocessor code. There is an example of that in the book as well, here the online repo: https://github.com/larsgeorge/hbase-book/blob/master/ch04/src/main/java/coprocessor/RowCountEndpoint.java

Lars

On Jun 28, 2012, at 7:36 AM, fding hbase wrote:

> HTable api document shows:
>
>  <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
>      Class<T> protocol, byte[] startKey, byte[] endKey, Batch.Call<T,R>
> callable)
>      throws IOException, Throwable;
>
>
> startKey && endKey bounds the region of your interest.
>
> On Thu, Jun 28, 2012 at 5:43 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote:
>
>> Aman, Lars,
>>
>>             If I already know in advance that a particular region
>> holds the data of my interest, then how can I use Coprocessor to
>> operate on that region only and not on all the regions of a particular
>> table??Thank you.
>>
>> Regards,
>>    Mohammad Tariq
>>
>>
>> On Wed, Jun 27, 2012 at 11:57 PM, Lars George <[EMAIL PROTECTED]>
>> wrote:
>>> Hi Mohammad,
>>>
>>> Not sure I follow. :(
>>>
>>> Coprocessor is not MapReduce. MapReduce already takes care to run your
>> code local to the data.
>>>
>>> Coprocessors can be seen like lightweight Map-only MapReduce job.
>>>
>>> You need to share a few more details for us to be able to help.
>>>
>>> Thanks,
>>> Lars
>>>
>>> On Jun 26, 2012, at 7:44 PM, Mohammad Tariq wrote:
>>>
>>>> Hello Lars,
>>>>
>>>>       Thank you so much for the quick response.Actually, I want to
>>>> run my MapReduce jobs on a region that contains a specific set of
>>>> data.
>>>>
>>>> Regards,
>>>>    Mohammad Tariq
>>>>
>>>>
>>>> On Tue, Jun 26, 2012 at 9:18 PM, Lars George <[EMAIL PROTECTED]>
>> wrote:
>>>>> Hi Mohammad,
>>>>>
>>>>> The code runs on the server which is opening the region. It sounds to
>> me that this is not what you want and that you need to have access to some
>> sort of resources only available on one specific server? Because if that is
>> not the case, then you are simply using the coprocessors the wrong way IMHO.
>>>>>
>>>>> Lars
>>>>>
>>>>> On Jun 26, 2012, at 6:44 PM, Mohammad Tariq wrote:
>>>>>
>>>>>> Hello list,
>>>>>>
>>>>>>        Is it possible to use Coprocessors on some specific
>>>>>> regionservers instead of a per-region basis??As per my understanding a
>>>>>> coprocessor allows us to run the code directly on each region
>>>>>> server.Please correct me if I am wrong.Many thanks.
>>>>>>
>>>>>> Please correct me if I am wrong.
>>>>>> Regards,
>>>>>>    Mohammad Tariq
>>>>>
>>>
>>
>
>
>
> --
>
> Best Regards!
>
> Fei Ding
> [EMAIL PROTECTED]

+
Mohammad Tariq 2012-06-28, 11:30