Skip navigation links
A C D E G H I L M O R S T 

A

apply(Statement, Description) - Method in class org.finra.hqlunit.rules.SetUpHql
Wraps a given Statement with a RunSetUpHqlStatement instance When the nested Statement chain is evaluated, set up script is run, and then the wrapped Statement is evaluated
apply(Statement, Description) - Method in class org.finra.hqlunit.rules.TearDownHql
Wraps a given Statement with a RunTearDownHqlStatement instance When the nested Statement chain is evaluated, the tear down script will run after the wrapped statement is evaluated
apply(Statement, Description) - Method in class org.finra.hqlunit.rules.TestDataLoader
Uses a TemporaryFolder rule to process a given statement The TemporaryFolder will be used to construct staging files for loading data into Hive
apply(Statement, Description) - Method in class org.finra.hqlunit.rules.TestHiveServer
Wraps a given statement with a ConstructHiveContextStatement

C

ConstructHiveContextStatement(Statement) - Constructor for class org.finra.hqlunit.rules.TestHiveServer.ConstructHiveContextStatement
Wraps a given Statement This Statement constructs the all important HiveContext, then evaluates the wrapped Statement
createTable(TextResource) - Static method in class org.finra.hqlunit.HqlUnitTest
 

D

diffActualAndExpected(TextResource) - Static method in class org.finra.hqlunit.HqlUnitTest
 
diffActualAndExpected(TextResource, TextResource) - Static method in class org.finra.hqlunit.HqlUnitTest
 
Dos2UnixResource - Class in org.finra.hqlunit.resources.manipulation
A decorative TextResource which can wrap any TextResource Replaces \r\n line endings in the wrapped TextResource with \n line endings The wrapped resource is not actually altered, it only looks different to calling code
Dos2UnixResource(TextResource) - Constructor for class org.finra.hqlunit.resources.manipulation.Dos2UnixResource
Constructs a TextResource that disguises Windows line endings in a wrapped resource with Unix line endings

E

evaluate() - Method in class org.finra.hqlunit.rules.SetUpHql.RunSetUpHqlStatement
Executes the set up hql script, and then evaluates the wrapped Statement
evaluate() - Method in class org.finra.hqlunit.rules.TearDownHql.RunTearDownHqlStatement
Evaluates the wrapped statement, followed by executing the tear down script The script will always be executed even if a test fails or an error has been thrown
evaluate() - Method in class org.finra.hqlunit.rules.TestHiveServer.ConstructHiveContextStatement
Constructs the all important HiveContext, then evaluates the wrapped Statement Currently, the HiveContext is made as a singleton

G

getHiveContext() - Method in class org.finra.hqlunit.rules.TestHiveServer.ConstructHiveContextStatement
Provides access to the HiveContext produced by this Statement
getHiveContext() - Method in class org.finra.hqlunit.rules.TestHiveServer
Provides access to the HiveContext produced by this TestRule

H

hiveServer - Static variable in class org.finra.hqlunit.HqlUnitTest
 
HqlScript - Interface in org.finra.hqlunit.script
Abstracts the execution of hql scripts or expressions How to handle comments in scripts, or split scripts into runnable expressions is handled here This is separate from acquiring the text representing the hql script or expression, TextResources better handle that
HqlUnitTest - Class in org.finra.hqlunit
 
HqlUnitTest() - Constructor for class org.finra.hqlunit.HqlUnitTest
 

I

InputStreamResource - Class in org.finra.hqlunit.resources
Provides an abstract TextResource for building TextResource classes that access InputStream accessible resources InputStreamResource handles the utility of reading out the content of an InputStream into a String Child classes provide the InputStream to read from
InputStreamResource() - Constructor for class org.finra.hqlunit.resources.InputStreamResource
 

L

loadDataIntoTable(String, TextResource) - Method in class org.finra.hqlunit.rules.TestDataLoader
Loads data from a TextResource into a hive table A temporary file on the local file system is used as a staging ground for the data
loadDataIntoTable(String, TextResource, String) - Method in class org.finra.hqlunit.rules.TestDataLoader
Loads data from a TextResource into a hive table A temporary file on the local file system is used as a staging ground for the data
loader - Static variable in class org.finra.hqlunit.HqlUnitTest
 
loadTableData(String, TextResource) - Static method in class org.finra.hqlunit.HqlUnitTest
 
loadTableData(String, TextResource, String) - Static method in class org.finra.hqlunit.HqlUnitTest
 
LocalFileResource - Class in org.finra.hqlunit.resources
Handles access to text resources contained in files on the local file system
LocalFileResource(String) - Constructor for class org.finra.hqlunit.resources.LocalFileResource
Constructs a TextResource that reads out the content of a file on the local file system

M

MultiExpressionScript - Class in org.finra.hqlunit.script
Runs an hql script containing multiple expressions, using the ScriptSplitter utility to derive individual expressions
MultiExpressionScript(TextResource) - Constructor for class org.finra.hqlunit.script.MultiExpressionScript
Constructs a MultiExpressionScript

O

org.finra.hqlunit - package org.finra.hqlunit
 
org.finra.hqlunit.resources - package org.finra.hqlunit.resources
 
org.finra.hqlunit.resources.manipulation - package org.finra.hqlunit.resources.manipulation
 
org.finra.hqlunit.rules - package org.finra.hqlunit.rules
 
org.finra.hqlunit.script - package org.finra.hqlunit.script
 

R

ResourceFolderResource - Class in org.finra.hqlunit.resources
Jars can have files packaged into the resources folder of the jar This TextResource handles access to said resource folder files
ResourceFolderResource(String) - Constructor for class org.finra.hqlunit.resources.ResourceFolderResource
Constructs a TextResource that reads out the content of a file in the resources folder of a jar
resourceStream() - Method in class org.finra.hqlunit.resources.InputStreamResource
Provides an InputStream with the text content of the TextResource
resourceStream() - Method in class org.finra.hqlunit.resources.LocalFileResource
Files ion the local file system are easily accessed as InputStreams
resourceStream() - Method in class org.finra.hqlunit.resources.ResourceFolderResource
Files in the resource folder are easily accessed as InputStreams
resourceText() - Method in class org.finra.hqlunit.resources.InputStreamResource
Provides the text content of the TextResource by reading out the content of the resource's InputStream
resourceText() - Method in class org.finra.hqlunit.resources.manipulation.Dos2UnixResource
Reads the text content of the wrapped TextResource, then changes the line endings of what was read
resourceText() - Method in class org.finra.hqlunit.resources.manipulation.SubstituteVariableResource
Reads the text content of the wrapped TextResource, then substitutes variable instances with the correct value
resourceText() - Method in class org.finra.hqlunit.resources.TextLiteralResource
This TextResource wraps a string value, which is the resources' text content
resourceText() - Method in interface org.finra.hqlunit.resources.TextResource
Provides the text content of the resource the TextResource object represents
runScript(TextResource) - Static method in class org.finra.hqlunit.HqlUnitTest
 
runScript(HiveContext) - Method in interface org.finra.hqlunit.script.HqlScript
Runs the hql script or expressions represented by this HqlScript using a HiveContext
runScript(HiveContext) - Method in class org.finra.hqlunit.script.MultiExpressionScript
Splits the bundled hql script into multiple expressions using ScriptSlitter utility class Each expression is run on the provided HiveContext
runScript(HiveContext) - Method in class org.finra.hqlunit.script.SingleExpressionScript
Runs the hql contained in the constructor given TextResource, treating it as a single expression with no comments
runScriptReturnResults(HiveContext) - Method in interface org.finra.hqlunit.script.HqlScript
Runs the hql script or expressions represented by this HqlScript using a HiveContext, returning a results set from the script
runScriptReturnResults(HiveContext) - Method in class org.finra.hqlunit.script.MultiExpressionScript
Splits the bundled hql script into multiple expressions using ScriptSlitter utility class Each expression is run on the provided HiveContext
runScriptReturnResults(HiveContext) - Method in class org.finra.hqlunit.script.SingleExpressionScript
Runs the hql contained in the constructor given TextResource, treating it as a single expression with no comments
RunSetUpHqlStatement(Statement, TestHiveServer, HqlScript) - Constructor for class org.finra.hqlunit.rules.SetUpHql.RunSetUpHqlStatement
Constructs a RunSetUpHqlStatement When evaluated this Statement runs a hive script as set up code and then evaluates a wrapped Statement
RunTearDownHqlStatement(Statement, TestHiveServer, HqlScript) - Constructor for class org.finra.hqlunit.rules.TearDownHql.RunTearDownHqlStatement
Constructs a RunTearDownHqlStatement When evaluated this Statement evaluates a wrapped statement and then runs an hql script as testing tear down

S

ScriptSplitter - Class in org.finra.hqlunit.script
A static only utility class with functionality to split hql scripts into multiple expressions Needs some work, the quality of the split it not great; many legal scripts might be parsed wrong
ScriptSplitter() - Constructor for class org.finra.hqlunit.script.ScriptSplitter
 
SetUpHql - Class in org.finra.hqlunit.rules
A TestRule which executes hive scripts before the test is executed as part of a set up effort The order of evaluation amongst multiple SetUpHql rules is *NON DETERMINISTIC* If evaluation order matters, use the same rule to execute multiple set up commands as part of the same script
SetUpHql(TestHiveServer, HqlScript) - Constructor for class org.finra.hqlunit.rules.SetUpHql
Constructs a SetUpHql object
SetUpHql.RunSetUpHqlStatement - Class in org.finra.hqlunit.rules
A Statement that does the actual heavy lifting for SetUpHql
SingleExpressionScript - Class in org.finra.hqlunit.script
Runs a single hql expression, with no heed for comments or scripts with multiple expressions in them
SingleExpressionScript(TextResource) - Constructor for class org.finra.hqlunit.script.SingleExpressionScript
Constructs a SingleExpressionScript The provided hql script will be run as a single expression with no pre-processing
splitScriptIntoExpressions(String) - Static method in class org.finra.hqlunit.script.ScriptSplitter
Takes an hql script represented as a String and splits it into multiple hql expressions Expressions are assumed to end with a semi colon followed by a new line (unix style \n or windows style \r\n) Comments are removed, but only if they start at the beginning of a line
SubstituteVariableResource - Class in org.finra.hqlunit.resources.manipulation
A decorative TextResource which can wrap any TextResource Substitutes variables in a TextResources content represented by ${variableName} with a desired value Replaces all such instances of ${variableName} with the desired value The wrapped resource is not actually altered, it only looks different to calling code
SubstituteVariableResource(String, String, TextResource) - Constructor for class org.finra.hqlunit.resources.manipulation.SubstituteVariableResource
Constructs a TextResource that substitutes variables with values in a wrapped TextResource

T

TearDownHql - Class in org.finra.hqlunit.rules
A TestRule which executes hive scripts after the test is done as part of a clean up effort The order of evaluation amongst multiple TearDownHql rules is *NON DETERMINISTIC* If evaluation order matters, use the same rule to execute multiple tear down commands as part of the same script If the test method (annotated with @Test) fails, the tear down script will still be run
TearDownHql(TestHiveServer, HqlScript) - Constructor for class org.finra.hqlunit.rules.TearDownHql
Constructs a TearDownHql object
TearDownHql.RunTearDownHqlStatement - Class in org.finra.hqlunit.rules
A Statement that does the actual heavy lifting for TearDownHql
TestDataLoader - Class in org.finra.hqlunit.rules
This TestRule class provides utility functions for extracting testing data from resources and loading it into Hive tables
TestDataLoader(TestHiveServer) - Constructor for class org.finra.hqlunit.rules.TestDataLoader
Constructs a new TestDataLoader
TestHiveServer - Class in org.finra.hqlunit.rules
TestHiveServer is a TestRule responsible for constructing a HiveContext for use in testing hql scripts *MUST* be used with the @ClassRule annotation - other HqlUnit provided TestRules require this rule to run first Many classes take a TestHiveServer as an input even though they just need the HiveContext.
TestHiveServer() - Constructor for class org.finra.hqlunit.rules.TestHiveServer
 
TestHiveServer.ConstructHiveContextStatement - Class in org.finra.hqlunit.rules
A Statement that performs most of the work for TestHiveServer
TextLiteralResource - Class in org.finra.hqlunit.resources
The most basic TextResource - wraps text literals or Java strings as a TextResource
TextLiteralResource(String) - Constructor for class org.finra.hqlunit.resources.TextLiteralResource
Constructs a TextResource that wraps a string value, which is the resources' text content
TextResource - Interface in org.finra.hqlunit.resources
Abstracts access to textual resources needed during testing, such as test data or hql scripts By using this interface, code that uses testing resources can be written agnostic to the origin or nature of the resource
A C D E G H I L M O R S T 
Skip navigation links

Copyright © 2016. All rights reserved.