You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Prasad Mujumdar <pr...@cloudera.com> on 2013/12/06 01:31:12 UTC

Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/
-----------------------------------------------------------

Review request for hive and Brock Noland.


Bugs: HIVE-4395
    https://issues.apache.org/jira/browse/HIVE-4395


Repository: hive-git


Description
-------

Support fetch-from-start for hiveserver2 fetch operations. 
 - Handle new fetch orientation for various HS2 operations.
 - Added support to reset the read position in Hive driver
 - Enabled scroll cursors with support for positioning cursor to start of resultset


Diffs
-----

  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
  jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
  ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
  ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
  service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
  service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
  service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
  service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
  service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
  service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
  service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
  service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
  service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 

Diff: https://reviews.apache.org/r/16063/diff/


Testing
-------

Added new testcases to TestJdbcDriver2


Thanks,

Prasad Mujumdar


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.

> On Dec. 6, 2013, 3:13 a.m., Thejas Nair wrote:
> > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 457
> > <https://reviews.apache.org/r/16063/diff/1/?file=394724#file394724line457>
> >
> >     I think it will be better to say soemthing like "Concurrency level " + resultSetConcurrency + " not supported "
> >     
> >

Updated the error message


> On Dec. 6, 2013, 3:13 a.m., Thejas Nair wrote:
> > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 460
> > <https://reviews.apache.org/r/16063/diff/1/?file=394724#file394724line460>
> >
> >     can you include the unsupported type in error message ?

Updated the error message.


> On Dec. 6, 2013, 3:13 a.m., Thejas Nair wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/Driver.java, line 1581
> > <https://reviews.apache.org/r/16063/diff/1/?file=394728#file394728line1581>
> >
> >     should we just fail in the unlikely event the clearFetch throws an exception ? It might be in some weird state if this happens.
> >     But I don't have strong opinions about it.
> >

hmm .. I think that's would be a safer approach. It might be very tricky to diagnose subsequent errors if any.
Changed it to throw an exception.


- Prasad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29866
-----------------------------------------------------------


On Dec. 6, 2013, 12:31 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 12:31 a.m.)
> 
> 
> Review request for hive and Brock Noland.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Thejas Nair <th...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29866
-----------------------------------------------------------



jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
<https://reviews.apache.org/r/16063/#comment57334>

    I think it will be better to say soemthing like "Concurrency level " + resultSetConcurrency + " not supported "
    
    



jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
<https://reviews.apache.org/r/16063/#comment57335>

    can you include the unsupported type in error message ?



ql/src/java/org/apache/hadoop/hive/ql/Driver.java
<https://reviews.apache.org/r/16063/#comment57336>

    should we just fail in the unlikely event the clearFetch throws an exception ? It might be in some weird state if this happens.
    But I don't have strong opinions about it.
    


- Thejas Nair


On Dec. 6, 2013, 12:31 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 12:31 a.m.)
> 
> 
> Review request for hive and Brock Noland.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.

> On Dec. 6, 2013, 6:45 p.m., Carl Steinbach wrote:
> > service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java, line 197
> > <https://reviews.apache.org/r/16063/diff/2/?file=394966#file394966line197>
> >
> >     Since this EnumSet if constant I think we should make it a static final class variable.
> >     
> >     Also, formatting.

right.
moved it to Operations class and added a another wrapper API to verify against the default fetch orientation.


> On Dec. 6, 2013, 6:45 p.m., Carl Steinbach wrote:
> > service/src/java/org/apache/hive/service/cli/operation/Operation.java, line 138
> > <https://reviews.apache.org/r/16063/diff/2/?file=394973#file394973line138>
> >
> >     Use supportedOrientations.contains(orientation) instead of manually iterating through the set. Also, should this method be protected instead of public?

Updated.


- Prasad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29893
-----------------------------------------------------------


On Dec. 6, 2013, 5:37 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 5:37 a.m.)
> 
> 
> Review request for hive, Brock Noland and Thejas Nair.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 7b1c9da 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Carl Steinbach <cw...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29893
-----------------------------------------------------------



ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java
<https://reviews.apache.org/r/16063/#comment57360>

    Formatting.



service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java
<https://reviews.apache.org/r/16063/#comment57361>

    Since this EnumSet if constant I think we should make it a static final class variable.
    
    Also, formatting.



service/src/java/org/apache/hive/service/cli/operation/Operation.java
<https://reviews.apache.org/r/16063/#comment57362>

    Use supportedOrientations.contains(orientation) instead of manually iterating through the set. Also, should this method be protected instead of public?


- Carl Steinbach


On Dec. 6, 2013, 5:37 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 5:37 a.m.)
> 
> 
> Review request for hive, Brock Noland and Thejas Nair.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 7b1c9da 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.

> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1833
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1833>
> >
> >     comment not applicable ?

ah, CPT errors. Removed.


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1837
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1837>
> >
> >     why not re-use execFetchFirst here ?

execFetchFirst was more tightly associated with the SQL query. Changed it to be more generic and used in the other tests as well.


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1856
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1856>
> >
> >     comment not applicable ?

removed


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1884
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1884>
> >
> >     you can use fail("..") instead of assertTrue here.

Done


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1886
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1886>
> >
> >     I think the error message would need to be updated in the test case.

yes, Thanks for catching that. It looks like the hive-unit tests is getting skipped all together due to some other build changes. Hence I didn't notice the failures.

Added SQLState in the error and updated the test to check for SQLState instead of messages.


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1913
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1913>
> >
> >     nit - a trailing white space

Removed


> On Dec. 6, 2013, 8:04 p.m., Thejas Nair wrote:
> > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java, line 1918
> > <https://reviews.apache.org/r/16063/diff/2/?file=394957#file394957line1918>
> >
> >     Thanks for these comments!
> >     can you extend the comment to - "@param oneRowOnly - read only one row from result"
> >

Done


- Prasad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29900
-----------------------------------------------------------


On Dec. 6, 2013, 5:37 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 5:37 a.m.)
> 
> 
> Review request for hive, Brock Noland and Thejas Nair.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 7b1c9da 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Thejas Nair <th...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/#review29900
-----------------------------------------------------------


Thanks for the comprehensive tests!


itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57375>

    comment not applicable ?



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57376>

    why not re-use execFetchFirst here ?



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57373>

    comment not applicable ?



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57377>

    why not re-use execFetchFirst here ?



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57378>

    you can use fail("..") instead of assertTrue here.



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57379>

    I think the error message would need to be updated in the test case.



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57380>

    I think the error message would need to be updated in the test case.



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57381>

    nit - a trailing white space



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/16063/#comment57371>

    Thanks for these comments!
    can you extend the comment to - "@param oneRowOnly - read only one row from result"
    


- Thejas Nair


On Dec. 6, 2013, 5:37 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16063/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2013, 5:37 a.m.)
> 
> 
> Review request for hive, Brock Noland and Thejas Nair.
> 
> 
> Bugs: HIVE-4395
>     https://issues.apache.org/jira/browse/HIVE-4395
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Support fetch-from-start for hiveserver2 fetch operations. 
>  - Handle new fetch orientation for various HS2 operations.
>  - Added support to reset the read position in Hive driver
>  - Enabled scroll cursors with support for positioning cursor to start of resultset
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 7b1c9da 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
>   jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
>   ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
>   ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
>   service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
>   service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
>   service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
>   service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
>   service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
>   service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
>   service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
>   service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
>   service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 
> 
> Diff: https://reviews.apache.org/r/16063/diff/
> 
> 
> Testing
> -------
> 
> Added new testcases to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/
-----------------------------------------------------------

(Updated Dec. 9, 2013, 8:41 a.m.)


Review request for hive, Brock Noland and Thejas Nair.


Changes
-------

Updated patch to fix the failed cascade_dbdrop test


Bugs: HIVE-4395
    https://issues.apache.org/jira/browse/HIVE-4395


Repository: hive-git


Description
-------

Support fetch-from-start for hiveserver2 fetch operations. 
 - Handle new fetch orientation for various HS2 operations.
 - Added support to reset the read position in Hive driver
 - Enabled scroll cursors with support for positioning cursor to start of resultset


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 1ba8ad3 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 96bd724 
  jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
  ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 30ef73e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
  ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
  service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
  service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
  service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
  service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
  service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
  service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
  service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
  service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
  service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 

Diff: https://reviews.apache.org/r/16063/diff/


Testing
-------

Added new testcases to TestJdbcDriver2


Thanks,

Prasad Mujumdar


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/
-----------------------------------------------------------

(Updated Dec. 7, 2013, 4:24 a.m.)


Review request for hive, Brock Noland and Thejas Nair.


Changes
-------

Updates per review feedback.


Bugs: HIVE-4395
    https://issues.apache.org/jira/browse/HIVE-4395


Repository: hive-git


Description
-------

Support fetch-from-start for hiveserver2 fetch operations. 
 - Handle new fetch orientation for various HS2 operations.
 - Added support to reset the read position in Hive driver
 - Enabled scroll cursors with support for positioning cursor to start of resultset


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 1ba8ad3 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 96bd724 
  jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
  ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 30ef73e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
  ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
  service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
  service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
  service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
  service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
  service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
  service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
  service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
  service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
  service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 

Diff: https://reviews.apache.org/r/16063/diff/


Testing
-------

Added new testcases to TestJdbcDriver2


Thanks,

Prasad Mujumdar


Re: Review Request 16063: HIVE-4395: Support TFetchOrientation.FIRST for HiveServer2 FetchResults

Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16063/
-----------------------------------------------------------

(Updated Dec. 6, 2013, 5:37 a.m.)


Review request for hive, Brock Noland and Thejas Nair.


Changes
-------

Changes per review feedback.
The tests in original patch didn't included correctly in the new patch due to path changes after maven build. Those are included in the updated patch now.


Bugs: HIVE-4395
    https://issues.apache.org/jira/browse/HIVE-4395


Repository: hive-git


Description
-------

Support fetch-from-start for hiveserver2 fetch operations. 
 - Handle new fetch orientation for various HS2 operations.
 - Added support to reset the read position in Hive driver
 - Enabled scroll cursors with support for positioning cursor to start of resultset


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 7b1c9da 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java ef39573 
  jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 812ee56 
  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java fce19bf 
  ql/src/java/org/apache/hadoop/hive/ql/Context.java ed502a7 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 86db406 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java 343f760 
  ql/src/java/org/apache/hadoop/hive/ql/processors/DfsProcessor.java ce54e0c 
  service/src/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java 581e69c 
  service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java af87a90 
  service/src/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java 0fe01c0 
  service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java bafe40c 
  service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java 2be018e 
  service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java 7e8a06b 
  service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java 2daa9cd 
  service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java a1ac55b 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 6f4b8dc 
  service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 301187d 

Diff: https://reviews.apache.org/r/16063/diff/


Testing
-------

Added new testcases to TestJdbcDriver2


Thanks,

Prasad Mujumdar