You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrql.apache.org by "Leonidas Fegaras (JIRA)" <ji...@apache.org> on 2013/04/24 19:59:16 UTC

[jira] [Commented] (MRQL-4) Create a testbed for MRQL queries using JUnit

    [ https://issues.apache.org/jira/browse/MRQL-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640729#comment-13640729 ] 

Leonidas Fegaras commented on MRQL-4:
-------------------------------------

I created a testbed for MRQL queries and I would like to have your vote to approve it (+1) or not (-1).
I didn't use JUnit because JUnit is for testing Java programs, not queries. Instead, I followed Hive's approach for testing queries and comparing their results with the expected results.

* I created the directories tests/queries that contains queries to be tested. Currently, there are 21 queries. If you want to add a new query to the testbed, you just insert it in this directory (as an .mrql file). The directory tetsts/data contains various data used by the queries. The directory tests/results contains the expected results of the queries.

* all MRQL scripts now depend on the file mrql-env.sh which defines all parameters (Java home, Hadoop/Hama home and config directories, etc). It is used by Makefile, build.xml, bin/mrql, and bin/mrql.bin. MRQL users need to setup this file only in order to run or build MRQL.

* I changed the Makefile and the build.xml files to evaluate the test queries. Use 'ant validate' (or 'make validate') to evaluate and validate all test queries a) in memory using MapReduce, b) on Hadoop's local mode, c) in memory using BSP mode, and d) on Hama's local mode. If there no expected result for a query, it will store the query result as the expected result.

I am attaching the patch, but since the patch is very big (since it contains the test data) I am also attaching the script files for testing.

                
> Create a testbed for MRQL queries using JUnit
> ---------------------------------------------
>
>                 Key: MRQL-4
>                 URL: https://issues.apache.org/jira/browse/MRQL-4
>             Project: MRQL
>          Issue Type: New Feature
>    Affects Versions: 0.9.0
>         Environment: Apache Ant
>            Reporter: Leonidas Fegaras
>            Assignee: Leonidas Fegaras
>         Attachments: build.xml, Makefile, MRQL-4.patch, mrql-env.sh
>
>
> We need to create a framework for performing tests on various MRQL queries before the first release. Since we haven't used maven for building MRQL yet, I think we can do these tests using JUnit in the Ant build.xml. I do not have any experience with JUnit yet, but I was thinking to create a test framework similar to Hive's:
> * we can create the directories tests/queries to keep MRQL queries, tests/data for input data, and tests/results to keep the expected query results
> * allow a committer to add new queries/data/results incrementally
> * be able to execute all tests in all modes using Ant: memory, MapReduce, and BSP modes
> * we should require that every patch must pass all tests before commit
> Questions: Is JUnit reasonable for these tasks? Is it better to use maven? (we may have to wait longer for this)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira