You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by Deepak Barr <de...@gmail.com> on 2015/10/08 15:45:06 UTC
Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/
-----------------------------------------------------------
Review request for lens.
Repository: lens
Description
-------
Added a Hive Error code for handling semantic exceptions
Earlier, if someone queries a native table that does not exist -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
<error>
<code>1001</code>
<message>Internal Server Error.</message>
<stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
.
.
.
-----------------------------------------------
After the fix-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>81753012-99e8-4695-ac60-33ee1e9db289</id>
<error>
<code>4001</code>
<message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
<stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
.
.
.
Diffs
-----
lens-api/src/main/resources/lens-errors.conf a582dc2
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
Diff: https://reviews.apache.org/r/39131/diff/
Testing
-------
Yes.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
[INFO] Lens ............................................... SUCCESS [ 4.437 s]
[INFO] Lens API ........................................... SUCCESS [ 29.879 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
[INFO] Lens Cube .......................................... SUCCESS [07:06 min]
[INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
[INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
[INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
[INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
[INFO] Lens Server ........................................ SUCCESS [11:19 min]
[INFO] Lens client ........................................ SUCCESS [ 46.726 s]
[INFO] Lens CLI ........................................... SUCCESS [03:45 min]
[INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
[INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
[INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
[INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
[INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33:51 min
[INFO] Finished at: 2015-10-06T23:01:26+05:30
[INFO] Final Memory: 216M/3028M
[INFO] ------------------------------------------------------------------------
Thanks,
Deepak Barr
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Amareshwari Sriramadasu <am...@apache.org>.
> On Dec. 16, 2015, 6:30 a.m., Amareshwari Sriramadasu wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 547
> > <https://reviews.apache.org/r/39131/diff/2/?file=1162526#file1162526line547>
> >
> > Can you put another error code this also, instead of 500 ?
>
> Deepak Barr wrote:
> I can introduce a new HIVE_ERROR[4002] error code but not sure what should be the http error code ? We can keep it 500 because the hivedriver may fail to execute query for multiple reasons.
Sure. Sounds fine. Main concern is error should be bubble and shown to user - even with 500.
- Amareshwari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review110626
-----------------------------------------------------------
On Dec. 14, 2015, 3:07 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2015, 3:07 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf c880543
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 253cfc4
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
> lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Deepak Barr <de...@gmail.com>.
> On Dec. 16, 2015, 6:30 a.m., Amareshwari Sriramadasu wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 547
> > <https://reviews.apache.org/r/39131/diff/2/?file=1162526#file1162526line547>
> >
> > Can you put another error code this also, instead of 500 ?
I can introduce a new HIVE_ERROR[4002] error code but not sure what should be the http error code ? We can keep it 500 because the hivedriver may fail to execute query for multiple reasons.
- Deepak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review110626
-----------------------------------------------------------
On Dec. 14, 2015, 3:07 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2015, 3:07 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf c880543
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 253cfc4
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
> lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review110626
-----------------------------------------------------------
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java (line 546)
<https://reviews.apache.org/r/39131/#comment170597>
Can you put another error code this also, instead of 500 ?
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java (line 25)
<https://reviews.apache.org/r/39131/#comment170600>
Please put the weight of this to a higher value - like 10000, sothat it bubbles up when comparing with multiple drivers.
- Amareshwari Sriramadasu
On Dec. 14, 2015, 3:07 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2015, 3:07 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf c880543
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 253cfc4
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
> lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review111114
-----------------------------------------------------------
Ship it!
Ship It!
- Amareshwari Sriramadasu
On Dec. 17, 2015, 4:04 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Dec. 17, 2015, 4:04 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf c880543
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 7391f47
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
> lens-server/src/test/java/org/apache/lens/server/query/QueryAPIErrorResponseTest.java 18a8c8d
> lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Deepak Barr <de...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/
-----------------------------------------------------------
(Updated Dec. 17, 2015, 4:04 p.m.)
Review request for lens.
Changes
-------
1. Added new error code - HIVE_ERROR[4002]
2. Increased weight of hive error codes
3. Handled hive exceptions for executeAsync() method.
4. Modified test cases accordingly.
Repository: lens
Description
-------
Added a Hive Error code for handling semantic exceptions
Earlier, if someone queries a native table that does not exist -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
<error>
<code>1001</code>
<message>Internal Server Error.</message>
<stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
.
.
.
-----------------------------------------------
After the fix-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>81753012-99e8-4695-ac60-33ee1e9db289</id>
<error>
<code>4001</code>
<message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
<stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
.
.
.
Diffs (updated)
-----
lens-api/src/main/resources/lens-errors.conf c880543
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 7391f47
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
lens-server/src/test/java/org/apache/lens/server/query/QueryAPIErrorResponseTest.java 18a8c8d
lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
Diff: https://reviews.apache.org/r/39131/diff/
Testing
-------
Yes.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
[INFO] Lens ............................................... SUCCESS [ 4.437 s]
[INFO] Lens API ........................................... SUCCESS [ 29.879 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
[INFO] Lens Cube .......................................... SUCCESS [07:06 min]
[INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
[INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
[INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
[INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
[INFO] Lens Server ........................................ SUCCESS [11:19 min]
[INFO] Lens client ........................................ SUCCESS [ 46.726 s]
[INFO] Lens CLI ........................................... SUCCESS [03:45 min]
[INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
[INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
[INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
[INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
[INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33:51 min
[INFO] Finished at: 2015-10-06T23:01:26+05:30
[INFO] Final Memory: 216M/3028M
[INFO] ------------------------------------------------------------------------
Thanks,
Deepak Barr
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Deepak Barr <de...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/
-----------------------------------------------------------
(Updated Dec. 14, 2015, 3:07 p.m.)
Review request for lens.
Changes
-------
Added test case + other refactoring
Repository: lens
Description
-------
Added a Hive Error code for handling semantic exceptions
Earlier, if someone queries a native table that does not exist -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
<error>
<code>1001</code>
<message>Internal Server Error.</message>
<stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
.
.
.
-----------------------------------------------
After the fix-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lensAPIResult>
<id>81753012-99e8-4695-ac60-33ee1e9db289</id>
<error>
<code>4001</code>
<message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
<stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
.
.
.
Diffs (updated)
-----
lens-api/src/main/resources/lens-errors.conf c880543
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 253cfc4
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
Diff: https://reviews.apache.org/r/39131/diff/
Testing
-------
Yes.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
[INFO] Lens ............................................... SUCCESS [ 4.437 s]
[INFO] Lens API ........................................... SUCCESS [ 29.879 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
[INFO] Lens Cube .......................................... SUCCESS [07:06 min]
[INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
[INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
[INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
[INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
[INFO] Lens Server ........................................ SUCCESS [11:19 min]
[INFO] Lens client ........................................ SUCCESS [ 46.726 s]
[INFO] Lens CLI ........................................... SUCCESS [03:45 min]
[INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
[INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
[INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
[INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
[INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33:51 min
[INFO] Finished at: 2015-10-06T23:01:26+05:30
[INFO] Final Memory: 216M/3028M
[INFO] ------------------------------------------------------------------------
Thanks,
Deepak Barr
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Deepak Barr <de...@gmail.com>.
> On Oct. 9, 2015, 2:49 a.m., Puneet Gupta wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 522
> > <https://reviews.apache.org/r/39131/diff/1/?file=1093125#file1093125line522>
> >
> > just a query .
> > Can there be a better way to find this? Relying on message contains is not very reliable.
> >
> > is it possible to add a test case?
Hey Puneet,
Let me look at the test case part. Also, I agree this is not the cleanest way to identify SemanticException but this is the only way I could identify a SemanticException from HiveSQLException object. This is how the exception looks like -
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'
at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.checkStatus(ThriftCLIServiceClient.java:52) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatementInternal(ThriftCLIServiceClient.java:151) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatement(ThriftCLIServiceClient.java:129) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invokeInternal(RetryingThriftCLIServiceClient.java:301) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invoke(RetryingThriftCLIServiceClient.java:329) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at com.sun.proxy.$Proxy58.executeStatement(Unknown Source) ~[na:na]
at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient$CLIServiceClientWrapper.executeStatement(RetryingThriftCLIServiceClient.java:111) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
at org.apache.lens.driver.hive.HiveDriver.execute(HiveDriver.java:494) ~[lens-driver-hive-2.4.0-beta-SNAPSHOT.jar:2.4.0-beta-SNAPSHOT]
- Deepak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102001
-----------------------------------------------------------
On Oct. 8, 2015, 1:45 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 1:45 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf a582dc2
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Varsha Abhinandan <va...@gmail.com>.
> On Oct. 9, 2015, 2:49 a.m., Puneet Gupta wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 522
> > <https://reviews.apache.org/r/39131/diff/1/?file=1093125#file1093125line522>
> >
> > just a query .
> > Can there be a better way to find this? Relying on message contains is not very reliable.
> >
> > is it possible to add a test case?
>
> Deepak Barr wrote:
> Hey Puneet,
>
> Let me look at the test case part. Also, I agree this is not the cleanest way to identify SemanticException but this is the only way I could identify a SemanticException from HiveSQLException object. This is how the exception looks like -
>
> org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'
> at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.checkStatus(ThriftCLIServiceClient.java:52) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatementInternal(ThriftCLIServiceClient.java:151) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatement(ThriftCLIServiceClient.java:129) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
> at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
> at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invokeInternal(RetryingThriftCLIServiceClient.java:301) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invoke(RetryingThriftCLIServiceClient.java:329) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at com.sun.proxy.$Proxy58.executeStatement(Unknown Source) ~[na:na]
> at org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient$CLIServiceClientWrapper.executeStatement(RetryingThriftCLIServiceClient.java:111) ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.driver.hive.HiveDriver.execute(HiveDriver.java:494) ~[lens-driver-hive-2.4.0-beta-SNAPSHOT.jar:2.4.0-beta-SNAPSHOT]
Would it be cleaner if we make use of the error codes instead? I guess SemanticExceptions fall in the range 10000 to 19999
- Varsha
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102001
-----------------------------------------------------------
On Oct. 8, 2015, 1:45 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 1:45 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf a582dc2
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Puneet Gupta <pu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102001
-----------------------------------------------------------
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java (line 522)
<https://reviews.apache.org/r/39131/#comment159522>
just a query .
Can there be a better way to find this? Relying on message contains is not very reliable.
is it possible to add a test case?
- Puneet Gupta
On Oct. 8, 2015, 1:45 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 1:45 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf a582dc2
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Amareshwari Sriramadasu <am...@apache.org>.
> On Oct. 9, 2015, 12:27 p.m., Amareshwari Sriramadasu wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 517
> > <https://reviews.apache.org/r/39131/diff/1/?file=1093125#file1093125line517>
> >
> > Can you do the same changes for explain, estimate, executeAsync?
> >
> > Shall we have handleHiveSQLException method throws proper LensException?
>
> Deepak Barr wrote:
> Hey amareshwari,
>
> Not sure if that would be necessary. explain and estimate methods call execute() method. Also, when running an async query, explain() is called first before executeAsync(). So the error will be captured when submitting the query itself. So, it should suffice to handle for execute() method. What do you think ?
You are right wrt explain and estimate. Seems no changes required. But we need changes for executeAsync, because not all execute async calls will call explain. For ex: cube queries skip the explain path. so, let us call handleHiveSQLException(hiveErr); in executeAsync as well.
- Amareshwari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102050
-----------------------------------------------------------
On Dec. 14, 2015, 3:07 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2015, 3:07 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf c880543
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 253cfc4
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
> lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java efef358
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Deepak Barr <de...@gmail.com>.
> On Oct. 9, 2015, 12:27 p.m., Amareshwari Sriramadasu wrote:
> > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, line 517
> > <https://reviews.apache.org/r/39131/diff/1/?file=1093125#file1093125line517>
> >
> > Can you do the same changes for explain, estimate, executeAsync?
> >
> > Shall we have handleHiveSQLException method throws proper LensException?
Hey amareshwari,
Not sure if that would be necessary. explain and estimate methods call execute() method. Also, when running an async query, explain() is called first before executeAsync(). So the error will be captured when submitting the query itself. So, it should suffice to handle for execute() method. What do you think ?
- Deepak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102050
-----------------------------------------------------------
On Oct. 8, 2015, 1:45 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 1:45 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf a582dc2
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>
Re: Review Request 39131: LENS -750 : Handle SemanticException from
HiveDriver instead of throwing 500 Internal Server Error
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39131/#review102050
-----------------------------------------------------------
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java (line 517)
<https://reviews.apache.org/r/39131/#comment159579>
Can you do the same changes for explain, estimate, executeAsync?
Shall we have handleHiveSQLException method throws proper LensException?
- Amareshwari Sriramadasu
On Oct. 8, 2015, 1:45 p.m., Deepak Barr wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39131/
> -----------------------------------------------------------
>
> (Updated Oct. 8, 2015, 1:45 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> Added a Hive Error code for handling semantic exceptions
>
>
> Earlier, if someone queries a native table that does not exist -
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>d482699c-f3cd-49d7-a8a5-dd8437ec4ee3</id>
> <error>
> <code>1001</code>
> <message>Internal Server Error.</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: Error executing query
> .
> .
> .
>
> -----------------------------------------------
>
> After the fix-
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <lensAPIResult>
> <id>81753012-99e8-4695-ac60-33ee1e9db289</id>
> <error>
> <code>4001</code>
> <message>Semantic Error : Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44'</message>
> <stackTrace>org.apache.lens.server.api.error.LensException: SEMANTIC_ERROR[Error while compiling statement: FAILED: SemanticException [Error 10001]: Line 1:31 Table not found 'test_data44']
> .
> .
> .
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/lens-errors.conf a582dc2
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 4561ccf
> lens-driver-hive/src/main/java/org/apache/lens/driver/hive/LensHiveErrorCode.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/39131/diff/
>
>
> Testing
> -------
>
> Yes.
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.394 s]
> [INFO] Lens ............................................... SUCCESS [ 4.437 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.879 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.698 s]
> [INFO] Lens Cube .......................................... SUCCESS [07:06 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 26.526 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.488 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:14 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 54.033 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 21.722 s]
> [INFO] Lens Server ........................................ SUCCESS [11:19 min]
> [INFO] Lens client ........................................ SUCCESS [ 46.726 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:45 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 11.543 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 12.677 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.966 s]
> [INFO] Lens Regression .................................... SUCCESS [ 16.229 s]
> [INFO] Lens UI ............................................ SUCCESS [ 42.657 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:51 min
> [INFO] Finished at: 2015-10-06T23:01:26+05:30
> [INFO] Final Memory: 216M/3028M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Deepak Barr
>
>