Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-06-16 Thread Navis Ryu


 On May 7, 2014, 9:44 p.m., Xuefu Zhang wrote:
  beeline/src/java/org/apache/hive/beeline/BeeLine.java, line 726
  https://reviews.apache.org/r/19984/diff/3/?file=575958#file575958line726
 
  In previous implementation, executing a script file happens after 
  info(getApplicationTitle()), but new code will do that befort the call. 
  Does this have any side-effect?

It's original behavior of script file(-f). Seemed not make additional problems, 
at least.


 On May 7, 2014, 9:44 p.m., Xuefu Zhang wrote:
  beeline/src/java/org/apache/hive/beeline/BeeLine.java, line 805
  https://reviews.apache.org/r/19984/diff/3/?file=575958#file575958line805
 
  Does removing this line has any side-effect?

Exiting or not is decided by caller, so I resumed it's meaningless to set 
exit=true/close connection in here. For stdin and script(-f), always exit 
closing all connections. For script(-i), always not exit. In the latter case, 
should we close current connection? I cannot sure of it.


 On May 7, 2014, 9:44 p.m., Xuefu Zhang wrote:
  beeline/src/java/org/apache/hive/beeline/BeeLine.java, line 810
  https://reviews.apache.org/r/19984/diff/3/?file=575958#file575958line810
 
  While it's good to simply and clean up the old code, in general I'd 
  like to have separate JIRA tracking each problem. This is fine. My only 
  concern though, is that the old code seems trying to overcome some 
  difficulty. I'm not sure the new implementation will cover that.

I remember I've confirmed the behavior on the new code. But rolled-back as you 
said.


- Navis


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


On May 7, 2014, 4:10 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated May 7, 2014, 4:10 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-06-16 Thread Navis Ryu

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

(Updated June 17, 2014, 1:49 a.m.)


Review request for hive.


Changes
---

Addressed comments


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


Repository: hive-git


Description
---

Hive CLI has -i option. From Hive CLI help:
{code}
...
 -i filenameInitialization SQL file
...
{code}

However, Beeline has no such option:
{code}
xzhang@xzlt:~/apa/hive3$ 
./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
 -u jdbc:hive2:// -i hive.rc
...
Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
-i (No such file or directory)
Property url is required
Beeline version 0.14.0-SNAPSHOT by Apache Hive
...
{code}


Diffs (updated)
-

  beeline/src/java/org/apache/hive/beeline/BeeLine.java dcdd6f2 
  beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
  beeline/src/java/org/apache/hive/beeline/Commands.java 94f74d2 
  beeline/src/main/resources/BeeLine.properties 697c29a 
  
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 
4d15e3c 

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


Testing
---


Thanks,

Navis Ryu



Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-05-15 Thread Thejas Nair

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


Can you also include a unit test for this ? It can go into 
TestBeeLineWithArgs.java


- Thejas Nair


On May 7, 2014, 4:10 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated May 7, 2014, 4:10 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-05-11 Thread Xuefu Zhang

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



beeline/src/java/org/apache/hive/beeline/BeeLine.java
https://reviews.apache.org/r/19984/#comment76223

In previous implementation, executing a script file happens after 
info(getApplicationTitle()), but new code will do that befort the call. Does 
this have any side-effect?



beeline/src/java/org/apache/hive/beeline/BeeLine.java
https://reviews.apache.org/r/19984/#comment76224

Does removing this line has any side-effect?



beeline/src/java/org/apache/hive/beeline/BeeLine.java
https://reviews.apache.org/r/19984/#comment76225

While it's good to simply and clean up the old code, in general I'd like to 
have separate JIRA tracking each problem. This is fine. My only concern though, 
is that the old code seems trying to overcome some difficulty. I'm not sure the 
new implementation will cover that.


- Xuefu Zhang


On May 7, 2014, 4:10 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated May 7, 2014, 4:10 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-05-07 Thread Navis Ryu

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

(Updated May 7, 2014, 4:10 a.m.)


Review request for hive.


Changes
---

Addressed comments


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


Repository: hive-git


Description
---

Hive CLI has -i option. From Hive CLI help:
{code}
...
 -i filenameInitialization SQL file
...
{code}

However, Beeline has no such option:
{code}
xzhang@xzlt:~/apa/hive3$ 
./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
 -u jdbc:hive2:// -i hive.rc
...
Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
-i (No such file or directory)
Property url is required
Beeline version 0.14.0-SNAPSHOT by Apache Hive
...
{code}


Diffs (updated)
-

  beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
  beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
  beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
  beeline/src/main/resources/BeeLine.properties 697c29a 

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


Testing
---


Thanks,

Navis Ryu



Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-04-15 Thread Navis Ryu


 On April 10, 2014, 11:33 p.m., Xuefu Zhang wrote:
  beeline/src/java/org/apache/hive/beeline/BeeLine.java, line 1489
  https://reviews.apache.org/r/19984/diff/2/?file=552253#file552253line1489
 
  What's the need for this?

Commented as CTRL-D in original source, which is removed by mistake. I'll add 
that.


 On April 10, 2014, 11:33 p.m., Xuefu Zhang wrote:
  beeline/src/main/resources/BeeLine.properties, line 148
  https://reviews.apache.org/r/19984/diff/2/?file=552256#file552256line148
 
  Hive CLI seems honoring init file even for -e option. See CliDriver.java
  
  From the patch, it seems that init file is executed even with -e 
  option. Could you verify?

-i init file can be used with one of the -e query or -f exec file, not 
both. This is same behavior with CliDriver.


- Navis


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


On April 8, 2014, 2:07 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated April 8, 2014, 2:07 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-04-15 Thread Xuefu Zhang


 On April 10, 2014, 11:33 p.m., Xuefu Zhang wrote:
  beeline/src/main/resources/BeeLine.properties, line 148
  https://reviews.apache.org/r/19984/diff/2/?file=552256#file552256line148
 
  Hive CLI seems honoring init file even for -e option. See CliDriver.java
  
  From the patch, it seems that init file is executed even with -e 
  option. Could you verify?
 
 Navis Ryu wrote:
 -i init file can be used with one of the -e query or -f exec file, 
 not both. This is same behavior with CliDriver.

Okay. I see. My mistake. I thought it was talking about -i option. Let's not 
make this change as it's unrelated. We can have a separate JIRA to fix the text.


- Xuefu


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


On April 8, 2014, 2:07 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated April 8, 2014, 2:07 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-04-10 Thread Xuefu Zhang

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



beeline/src/java/org/apache/hive/beeline/BeeLine.java
https://reviews.apache.org/r/19984/#comment72952

What's the need for this?



beeline/src/main/resources/BeeLine.properties
https://reviews.apache.org/r/19984/#comment72949

Hive CLI seems honoring init file even for -e option. See CliDriver.java

From the patch, it seems that init file is executed even with -e option. 
Could you verify?


- Xuefu Zhang


On April 8, 2014, 2:07 a.m., Navis Ryu wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19984/
 ---
 
 (Updated April 8, 2014, 2:07 a.m.)
 
 
 Review request for hive.
 
 
 Bugs: HIVE-6561
 https://issues.apache.org/jira/browse/HIVE-6561
 
 
 Repository: hive-git
 
 
 Description
 ---
 
 Hive CLI has -i option. From Hive CLI help:
 {code}
 ...
  -i filenameInitialization SQL file
 ...
 {code}
 
 However, Beeline has no such option:
 {code}
 xzhang@xzlt:~/apa/hive3$ 
 ./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
  -u jdbc:hive2:// -i hive.rc
 ...
 Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
 Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
 Transaction isolation: TRANSACTION_REPEATABLE_READ
 -i (No such file or directory)
 Property url is required
 Beeline version 0.14.0-SNAPSHOT by Apache Hive
 ...
 {code}
 
 
 Diffs
 -
 
   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
   beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
   beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
   beeline/src/main/resources/BeeLine.properties 697c29a 
 
 Diff: https://reviews.apache.org/r/19984/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Navis Ryu
 




Re: Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-04-07 Thread Navis Ryu

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

(Updated April 8, 2014, 2:07 a.m.)


Review request for hive.


Changes
---

addressed comment


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


Repository: hive-git


Description
---

Hive CLI has -i option. From Hive CLI help:
{code}
...
 -i filenameInitialization SQL file
...
{code}

However, Beeline has no such option:
{code}
xzhang@xzlt:~/apa/hive3$ 
./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
 -u jdbc:hive2:// -i hive.rc
...
Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
-i (No such file or directory)
Property url is required
Beeline version 0.14.0-SNAPSHOT by Apache Hive
...
{code}


Diffs (updated)
-

  beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
  beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 44cabdf 
  beeline/src/java/org/apache/hive/beeline/Commands.java 493f963 
  beeline/src/main/resources/BeeLine.properties 697c29a 

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


Testing
---


Thanks,

Navis Ryu



Review Request 19984: Beeline should accept -i option to Initializing a SQL file

2014-04-02 Thread Navis Ryu

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

Review request for hive.


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


Repository: hive-git


Description
---

Hive CLI has -i option. From Hive CLI help:
{code}
...
 -i filenameInitialization SQL file
...
{code}

However, Beeline has no such option:
{code}
xzhang@xzlt:~/apa/hive3$ 
./packaging/target/apache-hive-0.14.0-SNAPSHOT-bin/apache-hive-0.14.0-SNAPSHOT-bin/bin/beeline
 -u jdbc:hive2:// -i hive.rc
...
Connected to: Apache Hive (version 0.14.0-SNAPSHOT)
Driver: Hive JDBC (version 0.14.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
-i (No such file or directory)
Property url is required
Beeline version 0.14.0-SNAPSHOT by Apache Hive
...
{code}


Diffs
-

  beeline/src/java/org/apache/hive/beeline/BeeLine.java 5773109 
  beeline/src/main/resources/BeeLine.properties 697c29a 

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


Testing
---


Thanks,

Navis Ryu