1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.hadoop.hbase;
17
18 import org.apache.hadoop.classification.InterfaceAudience;
19 import org.apache.hadoop.classification.InterfaceStability;
20
21 import java.io.IOException;
22
23
24
25
26 @InterfaceAudience.Public
27 @InterfaceStability.Evolving
28 public interface Coprocessor {
29 static final int VERSION = 1;
30
31
32 static final int PRIORITY_HIGHEST = 0;
33
34 static final int PRIORITY_SYSTEM = Integer.MAX_VALUE / 4;
35
36 static final int PRIORITY_USER = Integer.MAX_VALUE / 2;
37
38 static final int PRIORITY_LOWEST = Integer.MAX_VALUE;
39
40
41
42
43 public enum State {
44 UNINSTALLED,
45 INSTALLED,
46 STARTING,
47 ACTIVE,
48 STOPPING,
49 STOPPED
50 }
51
52
53 void start(CoprocessorEnvironment env) throws IOException;
54
55 void stop(CoprocessorEnvironment env) throws IOException;
56 }