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  package org.apache.hadoop.hbase.mapreduce;
20  
21  import java.io.IOException;
22  
23  import org.apache.hadoop.hbase.testclassification.LargeTests;
24  import org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests;
25  import org.junit.Test;
26  import org.junit.experimental.categories.Category;
27  
28  /**
29   * TestTableInputFormatScan part 2.
30   * @see TestTableInputFormatScanBase
31   */
32  @Category({VerySlowMapReduceTests.class, LargeTests.class})
33  public class TestTableInputFormatScan2 extends TestTableInputFormatScanBase {
34  
35    /**
36     * Tests a MR scan using specific start and stop rows.
37     *
38     * @throws IOException
39     * @throws ClassNotFoundException
40     * @throws InterruptedException
41     */
42    @Test
43    public void testScanOBBToOPP()
44    throws IOException, InterruptedException, ClassNotFoundException {
45      testScan("obb", "opp", "opo");
46    }
47  
48    /**
49     * Tests a MR scan using specific start and stop rows.
50     *
51     * @throws IOException
52     * @throws ClassNotFoundException
53     * @throws InterruptedException
54     */
55    @Test
56    public void testScanOBBToQPP()
57    throws IOException, InterruptedException, ClassNotFoundException {
58      testScan("obb", "qpp", "qpo");
59    }
60  
61    /**
62     * Tests a MR scan using specific start and stop rows.
63     *
64     * @throws IOException
65     * @throws ClassNotFoundException
66     * @throws InterruptedException
67     */
68    @Test
69    public void testScanOPPToEmpty()
70    throws IOException, InterruptedException, ClassNotFoundException {
71      testScan("opp", null, "zzz");
72    }
73  
74    /**
75     * Tests a MR scan using specific start and stop rows.
76     *
77     * @throws IOException
78     * @throws ClassNotFoundException
79     * @throws InterruptedException
80     */
81    @Test
82    public void testScanYYXToEmpty()
83    throws IOException, InterruptedException, ClassNotFoundException {
84      testScan("yyx", null, "zzz");
85    }
86  
87    /**
88     * Tests a MR scan using specific start and stop rows.
89     *
90     * @throws IOException
91     * @throws ClassNotFoundException
92     * @throws InterruptedException
93     */
94    @Test
95    public void testScanYYYToEmpty()
96    throws IOException, InterruptedException, ClassNotFoundException {
97      testScan("yyy", null, "zzz");
98    }
99  
100   /**
101    * Tests a MR scan using specific start and stop rows.
102    *
103    * @throws IOException
104    * @throws ClassNotFoundException
105    * @throws InterruptedException
106    */
107   @Test
108   public void testScanYZYToEmpty()
109   throws IOException, InterruptedException, ClassNotFoundException {
110     testScan("yzy", null, "zzz");
111   }
112 
113   @Test
114   public void testScanFromConfiguration()
115   throws IOException, InterruptedException, ClassNotFoundException {
116     testScanFromConfiguration("bba", "bbd", "bbc");
117   }
118 }