hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: How to Updates coprocessor
Date Sun, 09 Jul 2017 02:46:37 GMT
See related thread:

http://search-hadoop.com/m/HBase/YGbbsaMWm5vZa1?subj=Re+Dynamic+load+of+Coprocessors

FYI

On Sat, Jul 8, 2017 at 7:32 PM, Yang Zhang <zhang.yang.dm@gmail.com> wrote:

> Thanks´╝îI have  already read that.I Just confuse whether the JVM will unload
> my coprocessor class and load the new one?
>
> According to the article , they also said like This:
>
> *Updating a Coprocessor*
>
> *Deploying a new version of a given coprocessor is not as simple as
> disabling it, replacing the JAR, and re-enabling the coprocessor. This is
> because you cannot reload a class in a JVM unless you delete all the
> current references to it. Since the current JVM has reference to the
> existing coprocessor, you must restart the JVM, by restarting the
> RegionServer, in order to replace it. This behavior is not expected to
> change.*
>
> So if I want to unload the old coprocessor, I need to restart JVM by
> restart HBase?
>
>
> 2017-07-09 9:40 GMT+08:00 Ted Yu <yuzhihong@gmail.com>:
>
> > Have you read http://hbase.apache.org/book.
> html#load_coprocessor_in_shell
> > ?
> >
> > table_att_unset should be used in the alter command.
> >
> > The last command should be:
> >
> > enable 'mytable'
> >
> > When the regions of mytable reopen, they should load updated coprocessor.
> >
> > On Sat, Jul 8, 2017 at 6:35 PM, Yang Zhang <zhang.yang.dm@gmail.com>
> > wrote:
> >
> > > When I develop my program with  coprocessor. I upload and dynamic
> install
> > > my coprocessor.
> > > But when I want to do update my coprocessor, I do these thing below:
> > >
> > > > disable 'mytable'
> > > > METHOD => 'table_att_unset',NAME => 'coprocessor$1'
> > > > alter 'mytable',METHOD=>'table_att','coprocessor'=>'hdfs:///
> > > GISdoop.jar|site.luoyu.MyFirstCop|1001'
> > > > enable 'Coprocessor'
> > >
> > > Will this unload The class from Classloader and load my new class right
> > > way?
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message