001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.hadoop.hbase.mapreduce; 019 020import java.io.IOException; 021import org.apache.hadoop.hbase.HBaseClassTestRule; 022import org.apache.hadoop.hbase.testclassification.LargeTests; 023import org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests; 024import org.junit.ClassRule; 025import org.junit.Test; 026import org.junit.experimental.categories.Category; 027 028/** 029 * TestTableInputFormatScan part 2. 030 * @see TestTableInputFormatScanBase 031 */ 032@Category({VerySlowMapReduceTests.class, LargeTests.class}) 033public class TestTableInputFormatScan2 extends TestTableInputFormatScanBase { 034 035 @ClassRule 036 public static final HBaseClassTestRule CLASS_RULE = 037 HBaseClassTestRule.forClass(TestTableInputFormatScan2.class); 038 039 /** 040 * Tests a MR scan using specific start and stop rows. 041 * 042 * @throws IOException 043 * @throws ClassNotFoundException 044 * @throws InterruptedException 045 */ 046 @Test 047 public void testScanOBBToOPP() 048 throws IOException, InterruptedException, ClassNotFoundException { 049 testScan("obb", "opp", "opo"); 050 } 051 052 /** 053 * Tests a MR scan using specific start and stop rows. 054 * 055 * @throws IOException 056 * @throws ClassNotFoundException 057 * @throws InterruptedException 058 */ 059 @Test 060 public void testScanOBBToQPP() 061 throws IOException, InterruptedException, ClassNotFoundException { 062 testScan("obb", "qpp", "qpo"); 063 } 064 065 /** 066 * Tests a MR scan using specific start and stop rows. 067 * 068 * @throws IOException 069 * @throws ClassNotFoundException 070 * @throws InterruptedException 071 */ 072 @Test 073 public void testScanOPPToEmpty() 074 throws IOException, InterruptedException, ClassNotFoundException { 075 testScan("opp", null, "zzz"); 076 } 077 078 /** 079 * Tests a MR scan using specific start and stop rows. 080 * 081 * @throws IOException 082 * @throws ClassNotFoundException 083 * @throws InterruptedException 084 */ 085 @Test 086 public void testScanYYXToEmpty() 087 throws IOException, InterruptedException, ClassNotFoundException { 088 testScan("yyx", null, "zzz"); 089 } 090 091 /** 092 * Tests a MR scan using specific start and stop rows. 093 * 094 * @throws IOException 095 * @throws ClassNotFoundException 096 * @throws InterruptedException 097 */ 098 @Test 099 public void testScanYYYToEmpty() 100 throws IOException, InterruptedException, ClassNotFoundException { 101 testScan("yyy", null, "zzz"); 102 } 103 104 /** 105 * Tests a MR scan using specific start and stop rows. 106 * 107 * @throws IOException 108 * @throws ClassNotFoundException 109 * @throws InterruptedException 110 */ 111 @Test 112 public void testScanYZYToEmpty() 113 throws IOException, InterruptedException, ClassNotFoundException { 114 testScan("yzy", null, "zzz"); 115 } 116 117 @Test 118 public void testScanFromConfiguration() 119 throws IOException, InterruptedException, ClassNotFoundException { 120 testScanFromConfiguration("bba", "bbd", "bbc"); 121 } 122}