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