org.apache.hadoop.hive.ql.io
Class TestSymlinkTextInputFormat

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.hadoop.hive.ql.io.TestSymlinkTextInputFormat
All Implemented Interfaces:
junit.framework.Test

public class TestSymlinkTextInputFormat
extends junit.framework.TestCase

Unittest for SymlinkTextInputFormat.


Constructor Summary
TestSymlinkTextInputFormat()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testAccuracy1()
          Test scenario: Two data directories, one symlink file that contains two paths each point to a file in one of data directories.
 void testAccuracy2()
          Scenario: Empty input directory, i.e.
 void testCombine()
          Test combine symlink text input file.
 void testFailure()
          Scenario: No job input paths.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestSymlinkTextInputFormat

public TestSymlinkTextInputFormat()
Method Detail

setUp

protected void setUp()
              throws IOException
Overrides:
setUp in class junit.framework.TestCase
Throws:
IOException

tearDown

protected void tearDown()
                 throws IOException
Overrides:
tearDown in class junit.framework.TestCase
Throws:
IOException

testCombine

public void testCombine()
                 throws Exception
Test combine symlink text input file. Two input dir, and each contails one file, and then create one symlink file containing these 2 files. Normally without combine, it will return at least 2 splits

Throws:
Exception

testAccuracy1

public void testAccuracy1()
                   throws IOException
Test scenario: Two data directories, one symlink file that contains two paths each point to a file in one of data directories.

Throws:
IOException

testAccuracy2

public void testAccuracy2()
                   throws IOException
Scenario: Empty input directory, i.e. no symlink file. Expected: Should return empty result set without any exception.

Throws:
IOException

testFailure

public void testFailure()
Scenario: No job input paths. Expected: IOException with proper message.



Copyright © 2011 The Apache Software Foundation