You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mi...@apache.org on 2016/03/23 16:18:26 UTC

[44/51] [partial] hbase-site git commit: Published site at cadfb21f4bb465d1e305db2a159b8574282c8150.

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/123539c5/book.html
----------------------------------------------------------------------
diff --git a/book.html b/book.html
index f1d71c7..bcc451c 100644
--- a/book.html
+++ b/book.html
@@ -27442,6 +27442,77 @@ When they don’t, they should document it.
 This will allow to share the cluster later.</p>
 </div>
 </div>
+<div class="sect3">
+<h4 id="hbase.tests.example.code"><a class="anchor" href="#hbase.tests.example.code"></a>147.4.5. Tests Skeleton Code</h4>
+<div class="paragraph">
+<p>Here is a test skeleton code with Categorization and a Category-based timeout Rule to copy and paste and use as basis for test contribution.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="comment">/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * &quot;License&quot;); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */</span>
+<span class="keyword">package</span> <span class="namespace">org.apache.hadoop.hbase</span>;
+
+<span class="keyword">import</span> <span class="include">static</span> <span class="include">org.junit.Assert</span>.*;
+
+<span class="keyword">import</span> <span class="include">org.apache.hadoop.hbase.testclassification.SmallTests</span>;
+<span class="keyword">import</span> <span class="include">org.junit.After</span>;
+<span class="keyword">import</span> <span class="include">org.junit.Before</span>;
+<span class="keyword">import</span> <span class="include">org.junit.Rule</span>;
+<span class="keyword">import</span> <span class="include">org.junit.Test</span>;
+<span class="keyword">import</span> <span class="include">org.junit.experimental.categories.Category</span>;
+<span class="keyword">import</span> <span class="include">org.junit.rules.TestName</span>;
+<span class="keyword">import</span> <span class="include">org.junit.rules.TestRule</span>;
+
+<span class="comment">/**
+ * Skeleton HBase test
+ */</span>
+<span class="comment">// NOTICE: See how we've 'categorized' this test. All hbase unit tests need to be categorized as</span>
+<span class="comment">// either 'small', 'medium', or 'large'. See http://hbase.apache.org/book.html#hbase.tests</span>
+<span class="comment">// for more on these categories.</span>
+<span class="annotation">@Category</span>(SmallTests.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">TestExample</span> {
+  <span class="comment">// Handy test rule that allows you subsequently get at the name of the current method. See</span>
+  <span class="comment">// down in 'test()' where we use it in the 'fail' message.</span>
+  <span class="annotation">@Rule</span> <span class="directive">public</span> TestName testName = <span class="keyword">new</span> TestName();
+
+  <span class="comment">// Rather than put a @Test (timeout=.... on each test so for sure the test times out, instead</span>
+  <span class="comment">// just the CategoryBasedTimeout... It will apply to each test in this test set, the timeout</span>
+  <span class="comment">// that goes w/ the particular test categorization.</span>
+  <span class="annotation">@Rule</span> <span class="directive">public</span> <span class="directive">final</span> TestRule timeout = CategoryBasedTimeout.builder().withTimeout(<span class="local-variable">this</span>.getClass()).
+        withLookingForStuckThread(<span class="predefined-constant">true</span>).build();
+
+  <span class="annotation">@Before</span>
+  <span class="directive">public</span> <span class="type">void</span> setUp() <span class="directive">throws</span> <span class="exception">Exception</span> {
+  }
+
+  <span class="annotation">@After</span>
+  <span class="directive">public</span> <span class="type">void</span> tearDown() <span class="directive">throws</span> <span class="exception">Exception</span> {
+  }
+
+  <span class="annotation">@Test</span>
+  <span class="directive">public</span> <span class="type">void</span> test() {
+    fail(testName.getMethodName() + <span class="string"><span class="delimiter">&quot;</span><span class="content"> is not yet implemented</span><span class="delimiter">&quot;</span></span>);
+  }
+}</code></pre>
+</div>
+</div>
+</div>
 </div>
 <div class="sect2">
 <h3 id="integration.tests"><a class="anchor" href="#integration.tests"></a>147.5. Integration Tests</h3>
@@ -33211,7 +33282,7 @@ The server will return cellblocks compressed using this same compressor as long
 <div id="footer">
 <div id="footer-text">
 Version 2.0.0-SNAPSHOT<br>
-Last updated 2016-03-21 14:38:41 UTC
+Last updated 2016-03-23 14:32:09 UTC
 </div>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/123539c5/bulk-loads.html
----------------------------------------------------------------------
diff --git a/bulk-loads.html b/bulk-loads.html
index f485cb9..08f910a 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20160321" />
+    <meta name="Date-Revision-yyyymmdd" content="20160323" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Bulk Loads in Apache HBase (TM)
@@ -305,7 +305,7 @@ under the License. -->
                         <a href="http://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2016-03-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2016-03-23</li>
             </p>
                 </div>