View Javadoc

1   /*
2    *
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   * http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.hadoop.hbase.coprocessor;
21  
22  import java.io.IOException;
23  import java.util.ArrayList;
24  import java.util.Collections;
25  import java.util.Comparator;
26  import java.util.HashSet;
27  import java.util.List;
28  import java.util.Set;
29  import java.util.TreeSet;
30  import java.util.UUID;
31  import java.util.concurrent.ConcurrentSkipListSet;
32  import java.util.concurrent.ExecutorService;
33  import java.util.concurrent.atomic.AtomicInteger;
34  
35  import org.apache.commons.logging.Log;
36  import org.apache.commons.logging.LogFactory;
37  import org.apache.hadoop.hbase.classification.InterfaceAudience;
38  import org.apache.hadoop.hbase.classification.InterfaceStability;
39  import org.apache.hadoop.conf.Configuration;
40  import org.apache.hadoop.fs.Path;
41  import org.apache.hadoop.hbase.Abortable;
42  import org.apache.hadoop.hbase.Coprocessor;
43  import org.apache.hadoop.hbase.CoprocessorEnvironment;
44  import org.apache.hadoop.hbase.DoNotRetryIOException;
45  import org.apache.hadoop.hbase.HBaseInterfaceAudience;
46  import org.apache.hadoop.hbase.HConstants;
47  import org.apache.hadoop.hbase.TableName;
48  import org.apache.hadoop.hbase.client.HTable;
49  import org.apache.hadoop.hbase.client.HTableWrapper;
50  import org.apache.hadoop.hbase.client.Table;
51  import org.apache.hadoop.hbase.util.CoprocessorClassLoader;
52  import org.apache.hadoop.hbase.util.SortedList;
53  import org.apache.hadoop.hbase.util.VersionInfo;
54
55  /**
56   * Provides the common setup framework and runtime services for coprocessor
57   * invocation from HBase services.
58   * @param <E> the specific environment extension that a concrete implementation
59   * provides
60   */
61  @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
62  @InterfaceStability.Evolving
63  public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
64    public static final String REGION_COPROCESSOR_CONF_KEY =
65        "hbase.coprocessor.region.classes";
66    public static final String REGIONSERVER_COPROCESSOR_CONF_KEY =
67        "hbase.coprocessor.regionserver.classes";
68    public static final String USER_REGION_COPROCESSOR_CONF_KEY =
69        "hbase.coprocessor.user.region.classes";
70    public static final String MASTER_COPROCESSOR_CONF_KEY =
71        "hbase.coprocessor.master.classes";
72    public static final String WAL_COPROCESSOR_CONF_KEY =
73      "hbase.coprocessor.wal.classes";
74    public static final String ABORT_ON_ERROR_KEY = "hbase.coprocessor.abortonerror";
75    public static final boolean DEFAULT_ABORT_ON_ERROR = true;
76    public static final String COPROCESSORS_ENABLED_CONF_KEY = "hbase.coprocessor.enabled";
77    public static final boolean DEFAULT_COPROCESSORS_ENABLED = true;
78    public static final String USER_COPROCESSORS_ENABLED_CONF_KEY =
79      "hbase.coprocessor.user.enabled";
80    public static final boolean DEFAULT_USER_COPROCESSORS_ENABLED = true;
81
82    private static final Log LOG = LogFactory.getLog(CoprocessorHost.class);
83    protected Abortable abortable;
84    /** Ordered set of loaded coprocessors with lock */
85    protected SortedList<E> coprocessors =
86        new SortedList<E>(new EnvironmentPriorityComparator());
87    protected Configuration conf;
88    // unique file prefix to use for local copies of jars when classloading
89    protected String pathPrefix;
90    protected AtomicInteger loadSequence = new AtomicInteger();
91
92    public CoprocessorHost(Abortable abortable) {
93      this.abortable = abortable;
94      this.pathPrefix = UUID.randomUUID().toString();
95    }
96
97    /**
98     * Not to be confused with the per-object _coprocessors_ (above),
99     * coprocessorNames is static and stores the set of all coprocessors ever
100    * loaded by any thread in this JVM. It is strictly additive: coprocessors are
101    * added to coprocessorNames, by loadInstance() but are never removed, since
102    * the intention is to preserve a history of all loaded coprocessors for
103    * diagnosis in case of server crash (HBASE-4014).
104    */
105   private static Set<String> coprocessorNames =
106       Collections.synchronizedSet(new HashSet<String>());
107
108   public static Set<String> getLoadedCoprocessors() {
109     synchronized (coprocessorNames) {
110       return new HashSet(coprocessorNames);
111     }
112   }
113
114   /**
115    * Used to create a parameter to the HServerLoad constructor so that
116    * HServerLoad can provide information about the coprocessors loaded by this
117    * regionserver.
118    * (HBASE-4070: Improve region server metrics to report loaded coprocessors
119    * to master).
120    */
121   public Set<String> getCoprocessors() {
122     Set<String> returnValue = new TreeSet<String>();
123     for (CoprocessorEnvironment e: coprocessors) {
124       returnValue.add(e.getInstance().getClass().getSimpleName());
125     }
126     return returnValue;
127   }
128
129   /**
130    * Load system coprocessors once only. Read the class names from configuration.
131    * Called by constructor.
132    */
133   protected void loadSystemCoprocessors(Configuration conf, String confKey) {
134     boolean coprocessorsEnabled = conf.getBoolean(COPROCESSORS_ENABLED_CONF_KEY,
135       DEFAULT_COPROCESSORS_ENABLED);
136     if (!coprocessorsEnabled) {
137       return;
138     }
139
140     Class<?> implClass = null;
141
142     // load default coprocessors from configure file
143     String[] defaultCPClasses = conf.getStrings(confKey);
144     if (defaultCPClasses == null || defaultCPClasses.length == 0)
145       return;
146
147     int priority = Coprocessor.PRIORITY_SYSTEM;
148     for (String className : defaultCPClasses) {
149       className = className.trim();
150       if (findCoprocessor(className) != null) {
151         // If already loaded will just continue
152         LOG.warn("Attempted duplicate loading of " + className + "; skipped");
153         continue;
154       }
155       ClassLoader cl = this.getClass().getClassLoader();
156       Thread.currentThread().setContextClassLoader(cl);
157       try {
158         implClass = cl.loadClass(className);
159         // Add coprocessors as we go to guard against case where a coprocessor is specified twice
160         // in the configuration
161         this.coprocessors.add(loadInstance(implClass, priority, conf));
162         LOG.info("System coprocessor " + className + " was loaded " +
163             "successfully with priority (" + priority + ").");
164         ++priority;
165       } catch (Throwable t) {
166         // We always abort if system coprocessors cannot be loaded
167         abortServer(className, t);
168       }
169     }
170   }
171
172   /**
173    * Load a coprocessor implementation into the host
174    * @param path path to implementation jar
175    * @param className the main class name
176    * @param priority chaining priority
177    * @param conf configuration for coprocessor
178    * @throws java.io.IOException Exception
179    */
180   public E load(Path path, String className, int priority,
181       Configuration conf) throws IOException {
182     String[] includedClassPrefixes = null;
183     if (conf.get(HConstants.CP_HTD_ATTR_INCLUSION_KEY) != null){
184       String prefixes = conf.get(HConstants.CP_HTD_ATTR_INCLUSION_KEY);
185       includedClassPrefixes = prefixes.split(";");
186     }
187     return load(path, className, priority, conf, includedClassPrefixes);
188   }
189
190   /**
191    * Load a coprocessor implementation into the host
192    * @param path path to implementation jar
193    * @param className the main class name
194    * @param priority chaining priority
195    * @param conf configuration for coprocessor
196    * @param includedClassPrefixes class name prefixes to include
197    * @throws java.io.IOException Exception
198    */
199   public E load(Path path, String className, int priority,
200       Configuration conf, String[] includedClassPrefixes) throws IOException {
201     Class<?> implClass = null;
202     LOG.debug("Loading coprocessor class " + className + " with path " +
203         path + " and priority " + priority);
204
205     ClassLoader cl = null;
206     if (path == null) {
207       try {
208         implClass = getClass().getClassLoader().loadClass(className);
209       } catch (ClassNotFoundException e) {
210         throw new IOException("No jar path specified for " + className);
211       }
212     } else {
213       cl = CoprocessorClassLoader.getClassLoader(
214         path, getClass().getClassLoader(), pathPrefix, conf);
215       try {
216         implClass = ((CoprocessorClassLoader)cl).loadClass(className, includedClassPrefixes);
217       } catch (ClassNotFoundException e) {
218         throw new IOException("Cannot load external coprocessor class " + className, e);
219       }
220     }
221
222     //load custom code for coprocessor
223     Thread currentThread = Thread.currentThread();
224     ClassLoader hostClassLoader = currentThread.getContextClassLoader();
225     try{
226       // switch temporarily to the thread classloader for custom CP
227       currentThread.setContextClassLoader(cl);
228       E cpInstance = loadInstance(implClass, priority, conf);
229       return cpInstance;
230     } finally {
231       // restore the fresh (host) classloader
232       currentThread.setContextClassLoader(hostClassLoader);
233     }
234   }
235
236   /**
237    * @param implClass Implementation class
238    * @param priority priority
239    * @param conf configuration
240    * @throws java.io.IOException Exception
241    */
242   public void load(Class<?> implClass, int priority, Configuration conf)
243       throws IOException {
244     E env = loadInstance(implClass, priority, conf);
245     coprocessors.add(env);
246   }
247
248   /**
249    * @param implClass Implementation class
250    * @param priority priority
251    * @param conf configuration
252    * @throws java.io.IOException Exception
253    */
254   public E loadInstance(Class<?> implClass, int priority, Configuration conf)
255       throws IOException {
256     if (!Coprocessor.class.isAssignableFrom(implClass)) {
257       throw new IOException("Configured class " + implClass.getName() + " must implement "
258           + Coprocessor.class.getName() + " interface ");
259     }
260
261     // create the instance
262     Coprocessor impl;
263     Object o = null;
264     try {
265       o = implClass.newInstance();
266       impl = (Coprocessor)o;
267     } catch (InstantiationException e) {
268       throw new IOException(e);
269     } catch (IllegalAccessException e) {
270       throw new IOException(e);
271     }
272     // create the environment
273     E env = createEnvironment(implClass, impl, priority, loadSequence.incrementAndGet(), conf);
274     if (env instanceof Environment) {
275       ((Environment)env).startup();
276     }
277     // HBASE-4014: maintain list of loaded coprocessors for later crash analysis
278     // if server (master or regionserver) aborts.
279     coprocessorNames.add(implClass.getName());
280     return env;
281   }
282
283   /**
284    * Called when a new Coprocessor class is loaded
285    */
286   public abstract E createEnvironment(Class<?> implClass, Coprocessor instance,
287       int priority, int sequence, Configuration conf);
288
289   public void shutdown(CoprocessorEnvironment e) {
290     if (e instanceof Environment) {
291       if (LOG.isDebugEnabled()) {
292         LOG.debug("Stop coprocessor " + e.getInstance().getClass().getName());
293       }
294       ((Environment)e).shutdown();
295     } else {
296       LOG.warn("Shutdown called on unknown environment: "+
297           e.getClass().getName());
298     }
299   }
300
301   /**
302    * Find a coprocessor implementation by class name
303    * @param className the class name
304    * @return the coprocessor, or null if not found
305    */
306   public Coprocessor findCoprocessor(String className) {
307     for (E env: coprocessors) {
308       if (env.getInstance().getClass().getName().equals(className) ||
309           env.getInstance().getClass().getSimpleName().equals(className)) {
310         return env.getInstance();
311       }
312     }
313     return null;
314   }
315
316   /**
317    * Find list of coprocessors that extend/implement the given class/interface
318    * @param cls the class/interface to look for
319    * @return the list of coprocessors, or null if not found
320    */
321   public <T extends Coprocessor> List<T> findCoprocessors(Class<T> cls) {
322     ArrayList<T> ret = new ArrayList<T>();
323
324     for (E env: coprocessors) {
325       Coprocessor cp = env.getInstance();
326
327       if(cp != null) {
328         if (cls.isAssignableFrom(cp.getClass())) {
329           ret.add((T)cp);
330         }
331       }
332     }
333     return ret;
334   }
335
336   /**
337    * Find a coprocessor environment by class name
338    * @param className the class name
339    * @return the coprocessor, or null if not found
340    */
341   public CoprocessorEnvironment findCoprocessorEnvironment(String className) {
342     for (E env: coprocessors) {
343       if (env.getInstance().getClass().getName().equals(className) ||
344           env.getInstance().getClass().getSimpleName().equals(className)) {
345         return env;
346       }
347     }
348     return null;
349   }
350
351   /**
352    * Retrieves the set of classloaders used to instantiate Coprocessor classes defined in external
353    * jar files.
354    * @return A set of ClassLoader instances
355    */
356   Set<ClassLoader> getExternalClassLoaders() {
357     Set<ClassLoader> externalClassLoaders = new HashSet<ClassLoader>();
358     final ClassLoader systemClassLoader = this.getClass().getClassLoader();
359     for (E env : coprocessors) {
360       ClassLoader cl = env.getInstance().getClass().getClassLoader();
361       if (cl != systemClassLoader){
362         //do not include system classloader
363         externalClassLoaders.add(cl);
364       }
365     }
366     return externalClassLoaders;
367   }
368
369   /**
370    * Environment priority comparator.
371    * Coprocessors are chained in sorted order.
372    */
373   static class EnvironmentPriorityComparator
374       implements Comparator<CoprocessorEnvironment> {
375     @Override
376     public int compare(final CoprocessorEnvironment env1,
377         final CoprocessorEnvironment env2) {
378       if (env1.getPriority() < env2.getPriority()) {
379         return -1;
380       } else if (env1.getPriority() > env2.getPriority()) {
381         return 1;
382       }
383       if (env1.getLoadSequence() < env2.getLoadSequence()) {
384         return -1;
385       } else if (env1.getLoadSequence() > env2.getLoadSequence()) {
386         return 1;
387       }
388       return 0;
389     }
390   }
391
392   /**
393    * Encapsulation of the environment of each coprocessor
394    */
395   public static class Environment implements CoprocessorEnvironment {
396
397     /** The coprocessor */
398     public Coprocessor impl;
399     /** Chaining priority */
400     protected int priority = Coprocessor.PRIORITY_USER;
401     /** Current coprocessor state */
402     Coprocessor.State state = Coprocessor.State.UNINSTALLED;
403     /** Accounting for tables opened by the coprocessor */
404     protected List<Table> openTables =
405       Collections.synchronizedList(new ArrayList<Table>());
406     private int seq;
407     private Configuration conf;
408     private ClassLoader classLoader;
409
410     /**
411      * Constructor
412      * @param impl the coprocessor instance
413      * @param priority chaining priority
414      */
415     public Environment(final Coprocessor impl, final int priority,
416         final int seq, final Configuration conf) {
417       this.impl = impl;
418       this.classLoader = impl.getClass().getClassLoader();
419       this.priority = priority;
420       this.state = Coprocessor.State.INSTALLED;
421       this.seq = seq;
422       this.conf = conf;
423     }
424
425     /** Initialize the environment */
426     public void startup() throws IOException {
427       if (state == Coprocessor.State.INSTALLED ||
428           state == Coprocessor.State.STOPPED) {
429         state = Coprocessor.State.STARTING;
430         Thread currentThread = Thread.currentThread();
431         ClassLoader hostClassLoader = currentThread.getContextClassLoader();
432         try {
433           currentThread.setContextClassLoader(this.getClassLoader());
434           impl.start(this);
435           state = Coprocessor.State.ACTIVE;
436         } finally {
437           currentThread.setContextClassLoader(hostClassLoader);
438         }
439       } else {
440         LOG.warn("Not starting coprocessor "+impl.getClass().getName()+
441             " because not inactive (state="+state.toString()+")");
442       }
443     }
444
445     /** Clean up the environment */
446     protected void shutdown() {
447       if (state == Coprocessor.State.ACTIVE) {
448         state = Coprocessor.State.STOPPING;
449         Thread currentThread = Thread.currentThread();
450         ClassLoader hostClassLoader = currentThread.getContextClassLoader();
451         try {
452           currentThread.setContextClassLoader(this.getClassLoader());
453           impl.stop(this);
454           state = Coprocessor.State.STOPPED;
455         } catch (IOException ioe) {
456           LOG.error("Error stopping coprocessor "+impl.getClass().getName(), ioe);
457         } finally {
458           currentThread.setContextClassLoader(hostClassLoader);
459         }
460       } else {
461         LOG.warn("Not stopping coprocessor "+impl.getClass().getName()+
462             " because not active (state="+state.toString()+")");
463       }
464       synchronized (openTables) {
465         // clean up any table references
466         for (Table table: openTables) {
467           try {
468             ((HTableWrapper)table).internalClose();
469           } catch (IOException e) {
470             // nothing can be done here
471             LOG.warn("Failed to close " +
472                 table.getName(), e);
473           }
474         }
475       }
476     }
477
478     @Override
479     public Coprocessor getInstance() {
480       return impl;
481     }
482
483     @Override
484     public ClassLoader getClassLoader() {
485       return classLoader;
486     }
487
488     @Override
489     public int getPriority() {
490       return priority;
491     }
492
493     @Override
494     public int getLoadSequence() {
495       return seq;
496     }
497
498     /** @return the coprocessor environment version */
499     @Override
500     public int getVersion() {
501       return Coprocessor.VERSION;
502     }
503
504     /** @return the HBase release */
505     @Override
506     public String getHBaseVersion() {
507       return VersionInfo.getVersion();
508     }
509
510     @Override
511     public Configuration getConfiguration() {
512       return conf;
513     }
514
515     /**
516      * Open a table from within the Coprocessor environment
517      * @param tableName the table name
518      * @return an interface for manipulating the table
519      * @exception java.io.IOException Exception
520      */
521     @Override
522     public Table getTable(TableName tableName) throws IOException {
523       return this.getTable(tableName, HTable.getDefaultExecutor(getConfiguration()));
524     }
525
526     /**
527      * Open a table from within the Coprocessor environment
528      * @param tableName the table name
529      * @return an interface for manipulating the table
530      * @exception java.io.IOException Exception
531      */
532     @Override
533     public Table getTable(TableName tableName, ExecutorService pool) throws IOException {
534       return HTableWrapper.createWrapper(openTables, tableName, this, pool);
535     }
536   }
537
538   protected void abortServer(final CoprocessorEnvironment environment, final Throwable e) {
539     abortServer(environment.getInstance().getClass().getName(), e);
540   }
541
542   protected void abortServer(final String coprocessorName, final Throwable e) {
543     String message = "The coprocessor " + coprocessorName + " threw " + e.toString();
544     LOG.error(message, e);
545     if (abortable != null) {
546       abortable.abort(message, e);
547     } else {
548       LOG.warn("No available Abortable, process was not aborted");
549     }
550   }
551
552   /**
553    * This is used by coprocessor hooks which are declared to throw IOException
554    * (or its subtypes). For such hooks, we should handle throwable objects
555    * depending on the Throwable's type. Those which are instances of
556    * IOException should be passed on to the client. This is in conformance with
557    * the HBase idiom regarding IOException: that it represents a circumstance
558    * that should be passed along to the client for its own handling. For
559    * example, a coprocessor that implements access controls would throw a
560    * subclass of IOException, such as AccessDeniedException, in its preGet()
561    * method to prevent an unauthorized client's performing a Get on a particular
562    * table.
563    * @param env Coprocessor Environment
564    * @param e Throwable object thrown by coprocessor.
565    * @exception IOException Exception
566    */
567   protected void handleCoprocessorThrowable(final CoprocessorEnvironment env, final Throwable e)
568       throws IOException {
569     if (e instanceof IOException) {
570       throw (IOException)e;
571     }
572     // If we got here, e is not an IOException. A loaded coprocessor has a
573     // fatal bug, and the server (master or regionserver) should remove the
574     // faulty coprocessor from its set of active coprocessors. Setting
575     // 'hbase.coprocessor.abortonerror' to true will cause abortServer(),
576     // which may be useful in development and testing environments where
577     // 'failing fast' for error analysis is desired.
578     if (env.getConfiguration().getBoolean(ABORT_ON_ERROR_KEY, DEFAULT_ABORT_ON_ERROR)) {
579       // server is configured to abort.
580       abortServer(env, e);
581     } else {
582       LOG.error("Removing coprocessor '" + env.toString() + "' from " +
583           "environment because it threw:  " + e,e);
584       coprocessors.remove(env);
585       try {
586         shutdown(env);
587       } catch (Exception x) {
588         LOG.error("Uncaught exception when shutting down coprocessor '"
589             + env.toString() + "'", x);
590       }
591       throw new DoNotRetryIOException("Coprocessor: '" + env.toString() +
592           "' threw: '" + e + "' and has been removed from the active " +
593           "coprocessor set.", e);
594     }
595   }
596
597   /**
598    * Used to gracefully handle fallback to deprecated methods when we
599    * evolve coprocessor APIs.
600    *
601    * When a particular Coprocessor API is updated to change methods, hosts can support fallback
602    * to the deprecated API by using this method to determine if an instance implements the new API.
603    * In the event that said support is partial, then in the face of a runtime issue that prevents
604    * proper operation {@link #legacyWarning(Class, String)} should be used to let operators know.
605    *
606    * For examples of this in action, see the implementation of
607    * <ul>
608    *   <li>{@link org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost}
609    *   <li>{@link org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost}
610    * </ul>
611    *
612    * @param clazz Coprocessor you wish to evaluate
613    * @param methodName the name of the non-deprecated method version
614    * @param parameterTypes the Class of the non-deprecated method's arguments in the order they are
615    *     declared.
616    */
617   @InterfaceAudience.Private
618   protected static boolean useLegacyMethod(final Class<? extends Coprocessor> clazz,
619       final String methodName, final Class<?>... parameterTypes) {
620     boolean useLegacy;
621     // Use reflection to see if they implement the non-deprecated version
622     try {
623       clazz.getDeclaredMethod(methodName, parameterTypes);
624       LOG.debug("Found an implementation of '" + methodName + "' that uses updated method " +
625           "signature. Skipping legacy support for invocations in '" + clazz +"'.");
626       useLegacy = false;
627     } catch (NoSuchMethodException exception) {
628       useLegacy = true;
629     } catch (SecurityException exception) {
630       LOG.warn("The Security Manager denied our attempt to detect if the coprocessor '" + clazz +
631           "' requires legacy support; assuming it does. If you get later errors about legacy " +
632           "coprocessor use, consider updating your security policy to allow access to the package" +
633           " and declared members of your implementation.");
634       LOG.debug("Details of Security Manager rejection.", exception);
635       useLegacy = true;
636     }
637     return useLegacy;
638   }
639
640   /**
641    * Used to limit legacy handling to once per Coprocessor class per classloader.
642    */
643   private static final Set<Class<? extends Coprocessor>> legacyWarning =
644       new ConcurrentSkipListSet<Class<? extends Coprocessor>>(
645           new Comparator<Class<? extends Coprocessor>>() {
646             @Override
647             public int compare(Class<? extends Coprocessor> c1, Class<? extends Coprocessor> c2) {
648               if (c1.equals(c2)) {
649                 return 0;
650               }
651               return c1.getName().compareTo(c2.getName());
652             }
653           });
654
655   /**
656    * limits the amount of logging to once per coprocessor class.
657    * Used in concert with {@link #useLegacyMethod(Class, String, Class[])} when a runtime issue
658    * prevents properly supporting the legacy version of a coprocessor API.
659    * Since coprocessors can be in tight loops this serves to limit the amount of log spam we create.
660    */
661   @InterfaceAudience.Private
662   protected void legacyWarning(final Class<? extends Coprocessor> clazz, final String message) {
663     if(legacyWarning.add(clazz)) {
664       LOG.error("You have a legacy coprocessor loaded and there are events we can't map to the " +
665           " deprecated API. Your coprocessor will not see these events.  Please update '" + clazz +
666           "'. Details of the problem: " + message);
667     }
668   }
669 }