- 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
- 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
- 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