hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [01/51] [partial] hbase-site git commit: Published site at .
Date Fri, 29 Sep 2017 15:13:34 GMT
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site d33b6ba3f -> aea328beb


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/aea328be/devapidocs/src-html/org/apache/hadoop/hbase/Coprocessor.State.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/Coprocessor.State.html b/devapidocs/src-html/org/apache/hadoop/hbase/Coprocessor.State.html
index de2285d..ba440ca 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/Coprocessor.State.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/Coprocessor.State.html
@@ -28,60 +28,88 @@
 <span class="sourceLineNo">020</span>package org.apache.hadoop.hbase;<a name="line.20"></a>
 <span class="sourceLineNo">021</span><a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.io.IOException;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import java.util.Optional;<a name="line.23"></a>
+<span class="sourceLineNo">023</span>import java.util.Collections;<a name="line.23"></a>
 <span class="sourceLineNo">024</span><a name="line.24"></a>
 <span class="sourceLineNo">025</span>import com.google.protobuf.Service;<a
name="line.25"></a>
 <span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a
name="line.26"></a>
 <span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceStability;<a
name="line.27"></a>
 <span class="sourceLineNo">028</span><a name="line.28"></a>
 <span class="sourceLineNo">029</span>/**<a name="line.29"></a>
-<span class="sourceLineNo">030</span> * Coprocessor interface.<a name="line.30"></a>
-<span class="sourceLineNo">031</span> */<a name="line.31"></a>
-<span class="sourceLineNo">032</span>@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)<a
name="line.32"></a>
-<span class="sourceLineNo">033</span>@InterfaceStability.Evolving<a name="line.33"></a>
-<span class="sourceLineNo">034</span>public interface Coprocessor {<a name="line.34"></a>
-<span class="sourceLineNo">035</span>  int VERSION = 1;<a name="line.35"></a>
-<span class="sourceLineNo">036</span><a name="line.36"></a>
-<span class="sourceLineNo">037</span>  /** Highest installation priority */<a
name="line.37"></a>
-<span class="sourceLineNo">038</span>  int PRIORITY_HIGHEST = 0;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>  /** High (system) installation priority
*/<a name="line.39"></a>
-<span class="sourceLineNo">040</span>  int PRIORITY_SYSTEM = Integer.MAX_VALUE
/ 4;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>  /** Default installation priority for
user coprocessors */<a name="line.41"></a>
-<span class="sourceLineNo">042</span>  int PRIORITY_USER = Integer.MAX_VALUE
/ 2;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>  /** Lowest installation priority */<a
name="line.43"></a>
-<span class="sourceLineNo">044</span>  int PRIORITY_LOWEST = Integer.MAX_VALUE;<a
name="line.44"></a>
-<span class="sourceLineNo">045</span><a name="line.45"></a>
-<span class="sourceLineNo">046</span>  /**<a name="line.46"></a>
-<span class="sourceLineNo">047</span>   * Lifecycle state of a given coprocessor
instance.<a name="line.47"></a>
-<span class="sourceLineNo">048</span>   */<a name="line.48"></a>
-<span class="sourceLineNo">049</span>  enum State {<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    UNINSTALLED,<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    INSTALLED,<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    STARTING,<a name="line.52"></a>
-<span class="sourceLineNo">053</span>    ACTIVE,<a name="line.53"></a>
-<span class="sourceLineNo">054</span>    STOPPING,<a name="line.54"></a>
-<span class="sourceLineNo">055</span>    STOPPED<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  }<a name="line.56"></a>
-<span class="sourceLineNo">057</span><a name="line.57"></a>
-<span class="sourceLineNo">058</span>  /**<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   * Called by the {@link CoprocessorEnvironment}
during it's own startup to initialize the<a name="line.59"></a>
-<span class="sourceLineNo">060</span>   * coprocessor.<a name="line.60"></a>
-<span class="sourceLineNo">061</span>   */<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  default void start(CoprocessorEnvironment
env) throws IOException {}<a name="line.62"></a>
-<span class="sourceLineNo">063</span><a name="line.63"></a>
-<span class="sourceLineNo">064</span>  /**<a name="line.64"></a>
-<span class="sourceLineNo">065</span>   * Called by the {@link CoprocessorEnvironment}
during it's own shutdown to stop the<a name="line.65"></a>
-<span class="sourceLineNo">066</span>   * coprocessor.<a name="line.66"></a>
-<span class="sourceLineNo">067</span>   */<a name="line.67"></a>
-<span class="sourceLineNo">068</span>  default void stop(CoprocessorEnvironment
env) throws IOException {}<a name="line.68"></a>
-<span class="sourceLineNo">069</span><a name="line.69"></a>
-<span class="sourceLineNo">070</span>  /**<a name="line.70"></a>
-<span class="sourceLineNo">071</span>   * Coprocessor endpoints providing protobuf
services should implement this interface.<a name="line.71"></a>
-<span class="sourceLineNo">072</span>   */<a name="line.72"></a>
-<span class="sourceLineNo">073</span>  default Optional&lt;Service&gt;
getService() {<a name="line.73"></a>
-<span class="sourceLineNo">074</span>    return Optional.empty();<a name="line.74"></a>
-<span class="sourceLineNo">075</span>  }<a name="line.75"></a>
-<span class="sourceLineNo">076</span>}<a name="line.76"></a>
+<span class="sourceLineNo">030</span> * Base interface for the 4 coprocessors
- MasterCoprocessor, RegionCoprocessor,<a name="line.30"></a>
+<span class="sourceLineNo">031</span> * RegionServerCoprocessor, and WALCoprocessor.<a
name="line.31"></a>
+<span class="sourceLineNo">032</span> * Do NOT implement this interface directly.
Unless an implementation implements one (or more) of<a name="line.32"></a>
+<span class="sourceLineNo">033</span> * the above mentioned 4 coprocessors, it'll
fail to be loaded by any coprocessor host.<a name="line.33"></a>
+<span class="sourceLineNo">034</span> *<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * Example:<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * Building a coprocessor to observe Master
operations.<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * &lt;pre&gt;<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * class MyMasterCoprocessor implements
MasterCoprocessor {<a name="line.38"></a>
+<span class="sourceLineNo">039</span> *   &amp;#64;Override<a name="line.39"></a>
+<span class="sourceLineNo">040</span> *   public Optional&amp;lt;MasterObserver&gt;
getMasterObserver() {<a name="line.40"></a>
+<span class="sourceLineNo">041</span> *     return new MyMasterObserver();<a
name="line.41"></a>
+<span class="sourceLineNo">042</span> *   }<a name="line.42"></a>
+<span class="sourceLineNo">043</span> * }<a name="line.43"></a>
+<span class="sourceLineNo">044</span> *<a name="line.44"></a>
+<span class="sourceLineNo">045</span> * class MyMasterObserver implements MasterObserver
{<a name="line.45"></a>
+<span class="sourceLineNo">046</span> *   ....<a name="line.46"></a>
+<span class="sourceLineNo">047</span> * }<a name="line.47"></a>
+<span class="sourceLineNo">048</span> * &lt;/pre&gt;<a name="line.48"></a>
+<span class="sourceLineNo">049</span> *<a name="line.49"></a>
+<span class="sourceLineNo">050</span> * Building a Service which can be loaded
by both Master and RegionServer<a name="line.50"></a>
+<span class="sourceLineNo">051</span> * &lt;pre&gt;<a name="line.51"></a>
+<span class="sourceLineNo">052</span> * class MyCoprocessorService implements
MasterCoprocessor, RegionServerCoprocessor {<a name="line.52"></a>
+<span class="sourceLineNo">053</span> *   &amp;#64;Override<a name="line.53"></a>
+<span class="sourceLineNo">054</span> *   public Optional&amp;lt;Service&gt;
getServices() {<a name="line.54"></a>
+<span class="sourceLineNo">055</span> *     return new ...;<a name="line.55"></a>
+<span class="sourceLineNo">056</span> *   }<a name="line.56"></a>
+<span class="sourceLineNo">057</span> * }<a name="line.57"></a>
+<span class="sourceLineNo">058</span> * &lt;/pre&gt;<a name="line.58"></a>
+<span class="sourceLineNo">059</span> */<a name="line.59"></a>
+<span class="sourceLineNo">060</span>@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)<a
name="line.60"></a>
+<span class="sourceLineNo">061</span>@InterfaceStability.Evolving<a name="line.61"></a>
+<span class="sourceLineNo">062</span>public interface Coprocessor {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>  int VERSION = 1;<a name="line.63"></a>
+<span class="sourceLineNo">064</span><a name="line.64"></a>
+<span class="sourceLineNo">065</span>  /** Highest installation priority */<a
name="line.65"></a>
+<span class="sourceLineNo">066</span>  int PRIORITY_HIGHEST = 0;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>  /** High (system) installation priority
*/<a name="line.67"></a>
+<span class="sourceLineNo">068</span>  int PRIORITY_SYSTEM = Integer.MAX_VALUE
/ 4;<a name="line.68"></a>
+<span class="sourceLineNo">069</span>  /** Default installation priority for
user coprocessors */<a name="line.69"></a>
+<span class="sourceLineNo">070</span>  int PRIORITY_USER = Integer.MAX_VALUE
/ 2;<a name="line.70"></a>
+<span class="sourceLineNo">071</span>  /** Lowest installation priority */<a
name="line.71"></a>
+<span class="sourceLineNo">072</span>  int PRIORITY_LOWEST = Integer.MAX_VALUE;<a
name="line.72"></a>
+<span class="sourceLineNo">073</span><a name="line.73"></a>
+<span class="sourceLineNo">074</span>  /**<a name="line.74"></a>
+<span class="sourceLineNo">075</span>   * Lifecycle state of a given coprocessor
instance.<a name="line.75"></a>
+<span class="sourceLineNo">076</span>   */<a name="line.76"></a>
+<span class="sourceLineNo">077</span>  enum State {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    UNINSTALLED,<a name="line.78"></a>
+<span class="sourceLineNo">079</span>    INSTALLED,<a name="line.79"></a>
+<span class="sourceLineNo">080</span>    STARTING,<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    ACTIVE,<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    STOPPING,<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    STOPPED<a name="line.83"></a>
+<span class="sourceLineNo">084</span>  }<a name="line.84"></a>
+<span class="sourceLineNo">085</span><a name="line.85"></a>
+<span class="sourceLineNo">086</span>  /**<a name="line.86"></a>
+<span class="sourceLineNo">087</span>   * Called by the {@link CoprocessorEnvironment}
during it's own startup to initialize the<a name="line.87"></a>
+<span class="sourceLineNo">088</span>   * coprocessor.<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   */<a name="line.89"></a>
+<span class="sourceLineNo">090</span>  default void start(CoprocessorEnvironment
env) throws IOException {}<a name="line.90"></a>
+<span class="sourceLineNo">091</span><a name="line.91"></a>
+<span class="sourceLineNo">092</span>  /**<a name="line.92"></a>
+<span class="sourceLineNo">093</span>   * Called by the {@link CoprocessorEnvironment}
during it's own shutdown to stop the<a name="line.93"></a>
+<span class="sourceLineNo">094</span>   * coprocessor.<a name="line.94"></a>
+<span class="sourceLineNo">095</span>   */<a name="line.95"></a>
+<span class="sourceLineNo">096</span>  default void stop(CoprocessorEnvironment
env) throws IOException {}<a name="line.96"></a>
+<span class="sourceLineNo">097</span><a name="line.97"></a>
+<span class="sourceLineNo">098</span>  /**<a name="line.98"></a>
+<span class="sourceLineNo">099</span>   * Coprocessor endpoints providing protobuf
services should implement this interface.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>   */<a name="line.100"></a>
+<span class="sourceLineNo">101</span>  default Iterable&lt;Service&gt;
getServices() {<a name="line.101"></a>
+<span class="sourceLineNo">102</span>    return Collections.EMPTY_SET;<a name="line.102"></a>
+<span class="sourceLineNo">103</span>  }<a name="line.103"></a>
+<span class="sourceLineNo">104</span>}<a name="line.104"></a>
 
 
 


Mime
View raw message