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 <[email protected]> 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 <[email protected]>: > > > 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 <[email protected]> > > 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? > > > > > >
