[jira] [Updated] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-13 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14001:
--
Status: Patch Available  (was: Open)

Please review - every comment is welcome (first patch)

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.0.1, 0.10.0
>Reporter: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Issue Comment Deleted] (HIVE-13899) Beeline CLI is not showing the db name even after setting the property 'set hive.cli.print.current.db=true'

2016-06-13 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-13899:
--
Comment: was deleted

(was: Created an upstream JIRA:
HIVE-14001
)

> Beeline CLI is not showing the db name even after setting the property 'set 
> hive.cli.print.current.db=true'
> ---
>
> Key: HIVE-13899
> URL: https://issues.apache.org/jira/browse/HIVE-13899
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 0.10.0
>Reporter: Sravan Suryadevara
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-13 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14001:
--
Attachment: HIVE-14001.patch

Checking the command line parameters.
If -e are present, and at least one command is specified, and a file is 
specified with a -f argument, then exiting with error code 1.

Testcase is created too.

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13899) Beeline CLI is not showing the db name even after setting the property 'set hive.cli.print.current.db=true'

2016-06-13 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15327446#comment-15327446
 ] 

Peter Vary commented on HIVE-13899:
---

Created an upstream JIRA:
HIVE-14001


> Beeline CLI is not showing the db name even after setting the property 'set 
> hive.cli.print.current.db=true'
> ---
>
> Key: HIVE-13899
> URL: https://issues.apache.org/jira/browse/HIVE-13899
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 0.10.0
>Reporter: Sravan Suryadevara
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13899) Beeline CLI is not showing the db name even after setting the property 'set hive.cli.print.current.db=true'

2016-06-13 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15327504#comment-15327504
 ] 

Peter Vary commented on HIVE-13899:
---

Does anyone working on this issue?

If not, then I might try create a patch.

> Beeline CLI is not showing the db name even after setting the property 'set 
> hive.cli.print.current.db=true'
> ---
>
> Key: HIVE-13899
> URL: https://issues.apache.org/jira/browse/HIVE-13899
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 0.10.0
>Reporter: Sravan Suryadevara
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-15 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332010#comment-15332010
 ] 

Peter Vary commented on HIVE-14001:
---

I think these issues are unrelated, and I have checked the other QA runs, and I 
see these errors there too.

Could someone please review my patch?

Thanks,
Peter

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-15 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331979#comment-15331979
 ] 

Peter Vary commented on HIVE-14001:
---

The test are run, but could not be published because of a JIRA problem - here 
are the results:

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12809859/HIVE-14001.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 6 failed/errored test(s), 10226 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_acid_globallimit
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_list_bucket_dml_13
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_stats_list_bucket
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_multiinsert
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver_index_bitmap3
org.apache.hadoop.hive.llap.tezplugins.TestLlapTaskSchedulerService.testDelayedLocalityNodeCommErrorImmediateAllocation
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/108/testReport
Console output: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/108/console
Test logs: 
http://ec2-50-18-27-0.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-108/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 6 tests failed
{noformat}

This message is automatically generated.


> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14013) Describe table doesn't show unicode properly

2016-06-15 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331761#comment-15331761
 ] 

Peter Vary commented on HIVE-14013:
---

Hi,

I have stumbled upon your patch, and I think it would be useful to apply your 
escaping to every comment field, like:

+++ 
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
  (revision )
@@ -231,7 +233,7 @@
 appendColumnStatsNoFormatting(colBuffer, "", "", "", "", "", "", "", 
"");
   }
 }
-colBuffer.append(comment == null ? "" : comment);
+colBuffer.append(comment == null ? "" : 
HiveStringUtils.escapeJava(comment));
 colBuffer.append(LINE_DELIM);
   }
 
@@ -266,7 +268,7 @@
 IndexType indexType = HiveIndex.getIndexTypeByClassName(indexHandlerClass);
 indexColumns.add(indexType.getName());
 
-indexColumns.add(index.getParameters().get("comment"));
+
indexColumns.add(HiveStringUtils.escapeJava(index.getParameters().get("comment")));
 
 formatOutput(indexColumns.toArray(new String[0]), indexInfo);
 
Regards,
Peter

> Describe table doesn't show unicode properly
> 
>
> Key: HIVE-14013
> URL: https://issues.apache.org/jira/browse/HIVE-14013
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Affects Versions: 2.2.0
>Reporter: Aihua Xu
>Assignee: Aihua Xu
> Attachments: HIVE-14013.1.patch
>
>
> Describe table output will show comments incorrectly rather than the unicode 
> itself.
> {noformat}
> hive> desc formatted t1;
> # Detailed Table Information 
> Table Type: MANAGED_TABLE
> Table Parameters:
> COLUMN_STATS_ACCURATE   {\"BASIC_STATS\":\"true\"}
> comment \u8868\u4E2D\u6587\u6D4B\u8BD5
> numFiles0   
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-16 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14001:
--
Attachment: HIVE-14001.2.patch

Resubmitting the same patch to get into the queue

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.2.patch, HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-13899) Beeline CLI is not showing the db name even after setting the property 'set hive.cli.print.current.db=true'

2016-06-21 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary reassigned HIVE-13899:
-

Assignee: Peter Vary

> Beeline CLI is not showing the db name even after setting the property 'set 
> hive.cli.print.current.db=true'
> ---
>
> Key: HIVE-13899
> URL: https://issues.apache.org/jira/browse/HIVE-13899
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 0.10.0
>Reporter: Sravan Suryadevara
>Assignee: Peter Vary
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-16 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary reassigned HIVE-14001:
-

Assignee: Peter Vary

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.2.patch, HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-06-16 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15334177#comment-15334177
 ] 

Peter Vary commented on HIVE-14001:
---

Review request created:
https://reviews.apache.org/r/48798/

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14001.2.patch, HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14100) current_user() returns invalid information

2016-06-28 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15352673#comment-15352673
 ] 

Peter Vary commented on HIVE-14100:
---

The jira for the original function

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Priority: Minor
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14195) HiveMetaStoreClient getFunction() does not throw NoSuchObjectException

2016-07-12 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15372520#comment-15372520
 ] 

Peter Vary commented on HIVE-14195:
---

The test failures are not related

> HiveMetaStoreClient getFunction() does not throw NoSuchObjectException
> --
>
> Key: HIVE-14195
> URL: https://issues.apache.org/jira/browse/HIVE-14195
> Project: Hive
>  Issue Type: Bug
>  Components: Metastore
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14195.2.patch, HIVE-14195.patch
>
>
> HiveMetaStoreClient getFunction(dbName, funcName) does not throw 
> NoSuchObjectException when no function with funcName exists in the db. 
> Instead, I need to search the MetaException message for 
> 'NoSuchObjectException'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HIVE-13899) Beeline CLI is not showing the db name even after setting the property 'set hive.cli.print.current.db=true'

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary resolved HIVE-13899.
---
Resolution: Won't Fix

The configuration is working in CLI, and in BeeLine in compatibility mode.

In BeeLine in beeline mode use the --showDbInPrompt command line option instead.

See HIVE-14123

> Beeline CLI is not showing the db name even after setting the property 'set 
> hive.cli.print.current.db=true'
> ---
>
> Key: HIVE-13899
> URL: https://issues.apache.org/jira/browse/HIVE-13899
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 0.10.0
>Reporter: Sravan Suryadevara
>Assignee: Peter Vary
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14360) Starting BeeLine after using !save, there is an error logged: "Error setting configuration: conf"

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14360:
--
Status: Patch Available  (was: Open)

Patch added

> Starting BeeLine after using !save, there is an error logged: "Error setting 
> configuration: conf"
> -
>
> Key: HIVE-14360
> URL: https://issues.apache.org/jira/browse/HIVE-14360
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14360.patch
>
>
> When saving the configuration in BeeLine the conf attribute is persisted, 
> which should not. When loading the configuration this causes an error message 
> to be printed:
> {noformat}
> Error setting configuration: conf: java.lang.IllegalArgumentException: No 
> method matching "setconf" was found in org.apache.hive.beeline.BeeLineOpts.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14360) Starting BeeLine after using !save, there is an error logged: "Error setting configuration: conf"

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14360:
--
Attachment: HIVE-14360.patch

> Starting BeeLine after using !save, there is an error logged: "Error setting 
> configuration: conf"
> -
>
> Key: HIVE-14360
> URL: https://issues.apache.org/jira/browse/HIVE-14360
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14360.patch
>
>
> When saving the configuration in BeeLine the conf attribute is persisted, 
> which should not. When loading the configuration this causes an error message 
> to be printed:
> {noformat}
> Error setting configuration: conf: java.lang.IllegalArgumentException: No 
> method matching "setconf" was found in org.apache.hive.beeline.BeeLineOpts.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HIVE-10738) Beeline does not respect hive.cli.print.current.db

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary resolved HIVE-10738.
---
Resolution: Won't Fix

The configuration is working in CLI, and in BeeLine in compatibility mode.
In BeeLine in beeline mode use the --showDbInPrompt command line option instead.
See HIVE-14123

> Beeline does not respect hive.cli.print.current.db
> --
>
> Key: HIVE-10738
> URL: https://issues.apache.org/jira/browse/HIVE-10738
> Project: Hive
>  Issue Type: Bug
>Reporter: Reuben Kuhnert
>Assignee: Reuben Kuhnert
>Priority: Minor
>
> Hive CLI (shows default database):
> {code}
> hive> set hive.cli.print.current.db=true;
> set hive.cli.print.current.db=true;
> hive (default)> 
> {code}
> Beeline (no change):
> {code}
> 0: jdbc:hive2://localhost:1> set hive.cli.print.current.db=true;
> set hive.cli.print.current.db=true;
> No rows affected (3.016 seconds)
> 0: jdbc:hive2://localhost:1> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14361) Empty method in TestClientCommandHookFactory

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14361:
--
Status: Patch Available  (was: Open)

Removed

> Empty method in TestClientCommandHookFactory
> 
>
> Key: HIVE-14361
> URL: https://issues.apache.org/jira/browse/HIVE-14361
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14361.patch
>
>
> Remove the empty method left in TestClientCommandHookFactory



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14361) Empty method in TestClientCommandHookFactory

2016-07-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14361:
--
Attachment: HIVE-14361.patch

> Empty method in TestClientCommandHookFactory
> 
>
> Key: HIVE-14361
> URL: https://issues.apache.org/jira/browse/HIVE-14361
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Trivial
> Attachments: HIVE-14361.patch
>
>
> Remove the empty method left in TestClientCommandHookFactory



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14360) Starting BeeLine after using !save, there is an error logged: "Error setting configuration: conf"

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15398998#comment-15398998
 ] 

Peter Vary commented on HIVE-14360:
---

Failures are not related

> Starting BeeLine after using !save, there is an error logged: "Error setting 
> configuration: conf"
> -
>
> Key: HIVE-14360
> URL: https://issues.apache.org/jira/browse/HIVE-14360
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14360.patch
>
>
> When saving the configuration in BeeLine the conf attribute is persisted, 
> which should not. When loading the configuration this causes an error message 
> to be printed:
> {noformat}
> Error setting configuration: conf: java.lang.IllegalArgumentException: No 
> method matching "setconf" was found in org.apache.hive.beeline.BeeLineOpts.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15398995#comment-15398995
 ] 

Peter Vary commented on HIVE-14374:
---

[~kuczoram] might be interested in as well.

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-29 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.6.patch

Latest patch, see review

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15399546#comment-15399546
 ] 

Peter Vary commented on HIVE-14374:
---

{noformat}
  public boolean set(String key, String value, boolean quiet) {
try {
  beeLine.getReflector().invoke(this, "set" + key, new Object[] {value});
  return true;
} catch (Exception e) {
  if (!quiet) {
beeLine.error(beeLine.loc("error-setting", new Object[] {key, e}));
  }
  return false;
}
}
{noformat}

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15400036#comment-15400036
 ] 

Peter Vary commented on HIVE-14146:
---

[~aihuaxu] Checked, and found the following:
- Beeline - when using "describe pretty" the \n is padded and displayed - this 
is as intended - the original behavior is not changed
- Cli - when using "describe pretty" the \n is padded and displayed - this is 
as intended - the original behavior is not changed

What I have missed, that in Cli when using "describe formatted" the following 
code sets the output to padded:
{noformat}
package org.apache.hadoop.hive.ql.exec;
[..]
public class DDLTask extends Task implements Serializable {
[..]
  private int describeTable(Hive db, DescTableDesc descTbl) throws 
HiveException {
[..]
  // In case the query is served by HiveServer2, don't pad it with spaces,
  // as HiveServer2 output is consumed by JDBC/ODBC clients.
  boolean isOutputPadded = !SessionState.get().isHiveServerQuery();
{noformat}
So the column comments are printed as a formatted strings with new lines - but 
not the table comment. (same as in pretty mode)

What do you think we should do here?
I personally would prefer to remove this code below (pretty comment 
formatting), so every comment should be handled in the same way (printing \n 
instead of newline):
{noformat}
package org.apache.hadoop.hive.ql.metadata.formatting;
[..]
public final class MetaDataFormatUtils {
[..]
  private static void formatWithIndentation(String colName, String colType, 
String colComment,
[..]
// comment indent processing for multi-line comments
// comments should be indented the same amount on each line
// if the first line comment starts indented by k,
// the following line comments should also be indented by k
String[] commentSegments = colComment.split("\n|\r|\r\n");
tableInfo.append(String.format("%-" + ALIGNMENT + "s", 
commentSegments[0])).append(LINE_DELIM);
int colNameLength = ALIGNMENT > colName.length() ? ALIGNMENT : 
colName.length();
int colTypeLength = ALIGNMENT > colType.length() ? ALIGNMENT : 
colType.length();
for (int i = 1; i < commentSegments.length; i++) {
  tableInfo.append(String.format("%" + colNameLength + "s" + FIELD_DELIM + 
"%"
  + colTypeLength + "s" + FIELD_DELIM + "%s", "", "", 
commentSegments[i])).append(LINE_DELIM);
}
{noformat}

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15400101#comment-15400101
 ] 

Peter Vary commented on HIVE-14374:
---

[~stakiar] Currently only a handful of parameters are documented as a command 
line option, but almost twice as many could be set from the configuration file. 
I don't know how much of it is by design, and how much of this is by error. I 
hope someone with more experience in Hive could help here.

+1 for the commons-cli solution and then we could forget every annotation 
magic. I wasn't brave enough to suggest it, although it is already used in 
beeline compatibility mode.

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-29 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1546#comment-1546
 ] 

Peter Vary commented on HIVE-14123:
---

[~leftylev] Is this the standard method of taking note of the required 
documentation changes?
- Label
- Url of the doc which should be changed


> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-14123.10.patch, HIVE-14123.2.patch, 
> HIVE-14123.3.patch, HIVE-14123.4.patch, HIVE-14123.5.patch, 
> HIVE-14123.6.patch, HIVE-14123.7.patch, HIVE-14123.8.patch, 
> HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15401997#comment-15401997
 ] 

Peter Vary commented on HIVE-14374:
---

The showConnectedUrl parameter (HIVE-11244) is never used anymore.
It is lost in merge: HIVE-11769

[~nemon] Shall we reintroduce it, or if nobody missed it, we should just remove 
the possibility altogether?

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402041#comment-15402041
 ] 

Peter Vary commented on HIVE-14374:
---

Thanks, will see if anyone else needs it.

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402024#comment-15402024
 ] 

Peter Vary commented on HIVE-14374:
---

The connected URLis always shown since HIVE-11769 - which I think made it into 
2.1.0

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15401952#comment-15401952
 ] 

Peter Vary commented on HIVE-14374:
---

I was trying to check the following configuration options but I think they were 
never intended to work as a command line parameter. 
--addlocaldriverjar=DRIVERJARNAME Add driver jar file in the beeline client side
--addlocaldrivername=DRIVERNAME Add drivier name needs to be supported in the 
beeline client side

The following does not work:
{code}
$ ./beeline --addlocaldriverjar=pgsql.jar
{code}

I think these are commands intended to use in an already running client, like 
this:
{code}
$ ./beeline
0: jdbc:hive2://localhost:1> !addlocaldriverjar plqsl.jar
{code}

If so, then I think it should be removed from the BeeLine.properties file. 
Am i right [~Ferd]

Thanks,
Peter

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15401903#comment-15401903
 ] 

Peter Vary commented on HIVE-14374:
---

{panel:title=Missing wiki documentation, but existing help documentation}
-a (authType) - jdbc connection authentication type
-i  script file for initialization
--property-file= the file to read connection properties (url, 
driver, user, password) from
--addlocaldriverjar=DRIVERJARNAME Add driver jar file in the beeline client side
--addlocaldrivername=DRIVERNAME Add drivier name needs to be supported in the 
beeline client side
--incremental=[true/false] When set to false, the entire result set is fetched 
and buffered before being displayed...
--showConnectedUrl=[true/false] Prompt HiveServer2's URI to which this beeline 
connected.
{panel}

Handling the ones abover is easy. Just add the documentation to wiki, I will do 
this

{panel:title=Configuration file specific, and could be set by command line as 
well}
entirelineascommand - should beeline try to split the commands on ;
maxheight - set by the terminal on start, but could be overwritten by command 
line
maxwidth - set by the terminal on start, but could be overwritten by command 
line
timeout - did not set/get - do not know what is it about
showelapsedtime - on commit, rollback, execute should beeline print the elapsed 
time
lastconnectedurl - used by -r (reconnect) to connect to the database, but could 
be overwritten by command line
trimscripts - should beeline trim the script lines before executing
historyfile - where should be the history file saved (absolute path)
{panel}

Handling these is more complicated. [~leftylev] I have seen, that you know 
about the documentation of the parameters. Do you know anything about these 
features? Are these are planned and just the documentation is lacking, or the 
possiblity of setting these parameters is an unintended "feature"? Or I just 
have to dig the code, and try to guess from there?

The question is still stands, only we have more data now:
- Do we create 2 groups of parameters for command line parameters, and 
configuration file parameters, or we use only one group?

I think we might have only one group, and it would be used for both type of 
parameters just as [~stakiar] proposed.

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific 

[jira] [Commented] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15401763#comment-15401763
 ] 

Peter Vary commented on HIVE-14123:
---

[~leftylev] Could you please check my modifications?
- Wiki - [Beeline Command 
Options|https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-BeelineCommandOptions]
- Jira - Relase notes of this Jira is set

Do I need to do anything more, or everything is ok now, and I could remove the 
TODOC## label as well.

Thanks,
Peter

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-14123.10.patch, HIVE-14123.2.patch, 
> HIVE-14123.3.patch, HIVE-14123.4.patch, HIVE-14123.5.patch, 
> HIVE-14123.6.patch, HIVE-14123.7.patch, HIVE-14123.8.patch, 
> HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-08-01 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Release Note: New BeeLine Command option --showDbInPrompt to display the 
current database name in prompt

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-14123.10.patch, HIVE-14123.2.patch, 
> HIVE-14123.3.patch, HIVE-14123.4.patch, HIVE-14123.5.patch, 
> HIVE-14123.6.patch, HIVE-14123.7.patch, HIVE-14123.8.patch, 
> HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15401797#comment-15401797
 ] 

Peter Vary commented on HIVE-14374:
---

Hi,

I have collected the configuration variables:

{panel:title=Wiki}
-u, -r, -n, -p, -d, -e, -f, -w --password-file, --hiveconf, --hivevar, --color, 
--showHeader, --headerInterval, --fastConnect, --autoCommit, --verbose, 
--showWarnings, --showDbInPrompt, --showNestedErrs, --numberFormat, --force, 
--maxWidth, --maxColumnWidth, --silent, --autosave, --outputformat, 
--truncateTable, --delimiterForDSV, --isolation, --nullemptystring, 
--incremental, --help
{panel}

{panel:title=Help text - beeline mode}
-u, -r, -n, -p, -d, -i, -e, -f, -w --password-file, --hiveconf, --hivevar, 
--property-file, --color, --showHeader, --headerInterval, --fastConnect, 
--autoCommit, --verbose, --showWarnings, --showDbInPrompt, --showNestedErrs, 
--numberFormat, --force, --maxWidth, --maxColumnWidth, --silent, --autosave, 
--outputformat, --incremental, --truncateTable, --delimiterForDSV, --isolation, 
--nullemptystring, --addlocaldriverjar, --addlocaldrivername, 
--showConnectedUrl, --help
{panel}

{panel:title=Help text - compatibility mode}
Generated from code, so the same as below
{panel}

{panel:title=Code - beeline compatibility mode}
-database, -e, -f, -i, --hiveconf, --hivevar, -d --define, -S| --silent, -v| 
--verbose, -H| --help

{panel}

{panel:title=Code - beeline beeline mode}
-d, -u, -r, -n, -p, -w --password-file, -a, -i, -e, -f, -help, --hivevar, 
--hiveconf, --property-file
+ all of the configuration file options
{panel}

{panel:title=Configuration file - beeline beeline mode}
headerinterval, fastconnect, incremental, outputformat, autosave, 
entirelineascommand, authtype, delimiterfordsv, force, initfiles, 
showconnectedurl, maxheight, maxcolumnwidth, numberformat, timeout, 
showelapsedtime, verbose, showwarnings, hivevariables, lastconnectedurl, 
truncatetable, isolation, nullemptystring, trimscripts, showdbinprompt, 
scriptfile, color, shownestederrs, showheader, autocommit, hiveconfvariables, 
historyfile
{panel}


> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> 

[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-08-01 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.7.patch

Regenerated the diff, since I do not know why it was not recognized.

The decision on the CLI formatted comment handling is still required

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, 
> HIVE-14146.7.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-08-01 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402245#comment-15402245
 ] 

Peter Vary commented on HIVE-14146:
---

I rebased and run the qtests. It seems ok now - we will see the result not too 
soon :)
What I am not sure about, how to handle the CLI/BeeLine differences here.
CLI uses formatted outputting, which specifically displays comments with \n in 
new lines, but only in column comments, and not in table comments.

Probably the nicest solution would be to keep the \n-s as newlines in CLI mode 
in table comments as well, so at least in CLI every newline would remain a 
newline, and in BeeLine every newline would be a \n.

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, 
> HIVE-14146.7.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-08-02 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.8.patch

In BeeLine every newline is displayed with \n
In CLI the table and the view related commands will display the newlines as 
newlines, the index, and database related commands will display as \n-s

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, 
> HIVE-14146.7.patch, HIVE-14146.8.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14409) Allow regex pattern in the output of qtest

2016-08-03 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15405558#comment-15405558
 ] 

Peter Vary commented on HIVE-14409:
---

Probably already aware of this, but there is a partialReservedPlanMask in 
QtestUtil, which allows pattern matching for the output lines, and regex could 
be used to match groups with different orders (for example: 
http://stackoverflow.com/questions/2596868/regex-matching-against-groups-in-different-order-without-repeating-the-group).
 So if it is not test specific issue, then it could be used to help the problem 
- and generated more, as [~kgyrtkirk] already pointed out :)

> Allow regex pattern in the output of qtest
> --
>
> Key: HIVE-14409
> URL: https://issues.apache.org/jira/browse/HIVE-14409
> Project: Hive
>  Issue Type: Improvement
>  Components: Test
>Reporter: Akira Ajisaka
>
> We cannot guarantee the output from external libraries (ex. HashMap), so we 
> need to make the validation infrastructure to allow a sort within a single 
> line.
> HIVE-13894, HIVE-13907, and HIVE-14088 are related.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-08-03 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15405624#comment-15405624
 ] 

Peter Vary commented on HIVE-14123:
---

Thanks for teaching [~leftylev]

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Fix For: 2.2.0
>
> Attachments: HIVE-14123.10.patch, HIVE-14123.2.patch, 
> HIVE-14123.3.patch, HIVE-14123.4.patch, HIVE-14123.5.patch, 
> HIVE-14123.6.patch, HIVE-14123.7.patch, HIVE-14123.8.patch, 
> HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-11 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15417584#comment-15417584
 ] 

Peter Vary commented on HIVE-14426:
---

[~leftylev] I tried to rephrase the comment:

{noformat}
Dumping every environment variable value and the entire configuration 
to the
log could be damaging, so this parameter makes it possible to 
explicitly turn it off
by setting its value to false.
{noformat}

What do you think?
It this good, or further changes are needed?

Thanks,
Peter

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14426.2.patch, HIVE-14426.3.patch, HIVE-14426.patch
>
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-10 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14426:
--
Attachment: HIVE-14426.3.patch

Instead of changing the log level, an explicit parameter is added to remove the 
possibility of unintended data leak.

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14426.2.patch, HIVE-14426.3.patch, HIVE-14426.patch
>
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-08-03 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.9.patch

The index comments with newlines are handled now

I had to change several test outputs to match the changes:
- describe_comment_indent.q.out - With multiline comments the extra lines was 
not indented appropriately. My patch solves this problem
- create_view_translate.q.out, create_view_partitioned.q.out, 
create_view.q.out, alter_view_as_select.q.out - Describing views a little nicer 
now - the multiline select is indented
- create_like.q.out - Table parameters containing newlines displayed nicely

The comments in describe database XXX results is not handled yet. The problem 
here is that the comment is the 2nd column, so printing the extra lines is not 
trivial. Either I would like to leave this as-is, or put this to another jira, 
or reorder the fields, so the comment is the last.

{noformat:title=Current}
hive> describe database escape_comments_db;
escape_comments_db  a\nbfile:/tmp/hive/warehouse/escape_comments_db.db  
petervary   USER
{noformat}

It is not too much hassle to do this:
{noformat:title=Proposed}
hive> describe database escape_comments_db;
escape_comments_db  file:/tmp/warehouse/escape_comments_db.db   
petervary   USERa

b
{noformat}

I am not convinced that it is worth to do this, or even if anyone would 
understand this:
{noformat:title=Alternative}
hive> describe database escape_comments_db;
escape_comments_db  a   file:/tmp/hive/warehouse/escape_comments_db.db  
petervary   USER
b
{noformat}

What do you think?

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.6.patch, 
> HIVE-14146.7.patch, HIVE-14146.8.patch, HIVE-14146.9.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14409) Allow regex pattern in the output of qtest

2016-08-03 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15406147#comment-15406147
 ] 

Peter Vary commented on HIVE-14409:
---

Thanks for the patch. These flaky tests are a pain. It will be nice to get rid 
of them.

I think, that with this patch we lose the ability to regenerate the out file 
with maven. Am I right, or did I miss something?
One solution could be putting the patterns into the input file, or even better 
into a 3rd file, and if that file doesn't exists, then we do not have to run 
the pattern matching for the whole file when it is not necessary 

> Allow regex pattern in the output of qtest
> --
>
> Key: HIVE-14409
> URL: https://issues.apache.org/jira/browse/HIVE-14409
> Project: Hive
>  Issue Type: Improvement
>  Components: Test
>Reporter: Akira Ajisaka
>Assignee: Akira Ajisaka
> Attachments: HIVE-14409.00.patch
>
>
> We cannot guarantee the output from external libraries (ex. HashMap), so we 
> need to make the validation infrastructure to allow a sort within a single 
> line.
> HIVE-13894, HIVE-13907, and HIVE-14088 are related.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-04 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14426:
--
Attachment: HIVE-14426.patch

Move it to trace level

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14426.patch
>
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-08-04 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.10.patch

Several more testcase changes:
- create_with_constraints.q.out - printing column names in constrains was not 
indented correctly before - my patch incidentally solves this
- alter_table_invalidate_column_stats.q.out, columnstats_part_coltype.q.out - 
column headers was not indented appropriately
- alter_view_as_select_with_partition.q - forget to add to the patch last time 
-multiline select is indented

The other testcases were about printing null instead of empty string. The patch 
updated to print it correctly.

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.10.patch, HIVE-14146.2.patch, 
> HIVE-14146.3.patch, HIVE-14146.4.patch, HIVE-14146.5.patch, 
> HIVE-14146.6.patch, HIVE-14146.7.patch, HIVE-14146.8.patch, 
> HIVE-14146.9.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14374) BeeLine argument, and configuration handling cleanup

2016-08-04 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15407458#comment-15407458
 ] 

Peter Vary commented on HIVE-14374:
---

Looked up from the code and jira the remaining attributes:
- entirelineascommand - required for SchemaTool, but not intended for public 
usage
- maxheight, maxwidth - was not able to find about the intended usage (do we 
need a command line argument for it, or not) - maxwidth specifically not saved, 
but loaded, and possible to set by a commandline argument. Maybe 
[~cwsteinbach], or [~ashutoshc] could tell more. Otherwise I think it would be 
a good idea to set it from command line.
- timeout - the code does not uses it, jira does not help. Maybe 
[~cwsteinbach], or [~ashutoshc] could tell more. Otherwise I think it would 
should remove it altogether.
- showelapsedtime - the jira does not help, but I think it would be a good idea 
to set it from command line.
- lastconnectedurl - looking through the jira (HIVE-13670), the author 
([~sushanth]) was avare of the "using reflection to set command line arguments" 
feature, but still not put into the documentation. So I think this is not 
intended as a command line argument. [~sushanth] please comment, if I 
missunderstand anything. Otherwise we should remove the command line setting 
possibility
- trimscripts - the jira does not help, but I think it would be a good idea to 
set it from command line.
- historyfile - the jira does not help, but I think it would be a good idea to 
set it from command line.

> BeeLine argument, and configuration handling cleanup
> 
>
> Key: HIVE-14374
> URL: https://issues.apache.org/jira/browse/HIVE-14374
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> BeeLine uses reflection, to set the BeeLineOpts attributes when parsing 
> command line arguments, and when loading the configuration file.
> This means, that creating a setXXX, getXXX method in BeeLineOpts is a 
> potential risk of exposing an attribute for the user unintentionally. There 
> is a possibility to exclude an attribute from saving the value in the 
> configuration file with the Ignore annotation. This does not restrict the 
> loading or command line setting of these parameters which means there are 
> many undocumented "features" as-is, like setting the lastConnectedUrl, 
> allowMultilineCommand, maxHeight, trimScripts, etc. from command line.
> This part of the code needs a little cleanup.
> I think we should make this exposure more explicit, and be able to 
> differentiate the configurable options depending on the source (command line, 
> and configuration file), so I propose to create a mechanism to tell 
> explicitly which BeeLineOpts attributes are settable by command line, and 
> configuration file, and every other attribute should be inaccessible by the 
> user of the beeline cli.
> One possible solution could be two annotations like these:
> - CommandLineOption - there could be a mandatory text parameter here, so the 
> developer had to provide the help text for it which could be displayed to the 
> user
> - ConfigurationFileOption - no text is required here
> Something like this:
> - This attribute could be provided by command line, and from a configuration 
> file too:
> {noformat}
> @CommandLineOption("automatically save preferences")
> @ConfigurationFileOption
> public void setAutosave(boolean autosave) {
>   this.autosave = autosave;
> }
> public void getAutosave() {
>   return this.autosave;
> }
> {noformat}
> - This attribute could be set through the configuration only
> {noformat}
> @ConfigurationFileOption
> public void setLastConnectedUrl(String lastConnectedUrl) {
>   this.lastConnectedUrl = lastConnectedUrl;

> }
> 

> public String getLastConnectedUrl()
> {

>   return lastConnectedUrl;
> 
}
> 
{noformat}
> - Attribute could be set through command line only - I think this is not too 
> relevant, but possible
> {noformat}
> @CommandLineOption("specific command line option")
> public void setSpecificCommandLineOption(String specificCommandLineOption) {
> 
  this.specificCommandLineOption = specificCommandLineOption;
> 
}
> 

> public String getSpecificCommandLineOption() {
> 
  return specificCommandLineOption;
> 
}
> 
{noformat}
> - Attribute could not be set
> {noformat}
> public static Env getEnv() {
> 
  return env;
> 
}
> 

public static void setEnv(Env envToUse) {
> 
  env = envToUse;
> 
}
> {noformat}
> Accouring to our previous conversations, I think you might be interested in: 
> [~spena], [~vihangk1], [~aihuaxu], [~ngangam], [~ychena], [~xuefuz]
> but anyone is welcome to discuss this.
> What do you think about the proposed solution?
> Any better ideas, or extensions?
> Thanks,
> Peter

[jira] [Updated] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-04 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14426:
--
Status: Patch Available  (was: Open)

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14426.patch
>
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14415) Upgrade qtest execution framework to junit4 - TestPerfCliDriver

2016-08-04 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15407408#comment-15407408
 ] 

Peter Vary commented on HIVE-14415:
---

[~kgyrtkirk] You were a tad faster, than me on this problem. In this morning I 
was about to take one of the jira (HIVE-12033) [~spena] left, which is about 
the intellij debugging issue too. Good to see more of us working on the testing 
framework. I will try to look at your patch today, or later tomorrow. Although 
I am not a committer, but one more eyes always help 

> Upgrade qtest execution framework to junit4 - TestPerfCliDriver
> ---
>
> Key: HIVE-14415
> URL: https://issues.apache.org/jira/browse/HIVE-14415
> Project: Hive
>  Issue Type: Improvement
>  Components: Tests
>Reporter: Zoltan Haindrich
>Assignee: Zoltan Haindrich
> Attachments: HIVE-14415.1.patch
>
>
> I would like to upgrade the current maven+ant+velocimacro+junit4 qtest 
> generation framework to use only junit4 - while (trying) to keep 
> all the existing features it provides.
> What I can't really do with the current one: execute easily a single qtests 
> from an IDE (as a matter of fact I can...but it's way too complicated; after 
> this it won't be a cake-walk either...but it will be a step closer ;)
> I think this change will make it more clear how these tests are configured 
> and executed.
> I will do this in two phases, currently i will only change 
> {{TestPerfCliDriver}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-04 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary reassigned HIVE-14426:
-

Assignee: Peter Vary

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14426) Extensive logging on info level in WebHCat

2016-08-13 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14426:
--
Attachment: HIVE-14426.4.patch

Updated configuration description

> Extensive logging on info level in WebHCat
> --
>
> Key: HIVE-14426
> URL: https://issues.apache.org/jira/browse/HIVE-14426
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14426.2.patch, HIVE-14426.3.patch, 
> HIVE-14426.4.patch, HIVE-14426.patch
>
>
> There is an extensive logging in WebHCat at info level, and even some 
> sensitive information could be logged



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14444) Upgrade qtest execution framework to junit4 - migrate most of them

2016-08-12 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15419671#comment-15419671
 ] 

Peter Vary commented on HIVE-1:
---

I am only concerned about the end results, and not really about the steps which 
are leading there. So if you agree, after you commit the patch then I will 
incorporate the stuff I proposed in the review. Of course I would like you both 
to review my patch.

Regarding of the BeeLine testcases, I think we should check the HIVE-4161. It 
was reported be [~thejas] a log time ago, and it was about to creating a small 
subset of the test cases which should use BeeLine for testing Hive. The funny 
thing is, that it was only partially solved - with the result of removing every 
single BeeLine tests in the end, and we are still waiting for someone to create 
some BeeLine tests package.

On the other hand, in this document we stated, that the HiveCLI is deprecated, 
and the users should use BeeLine instead 
(https://cwiki.apache.org/confluence/display/Hive/Replacing+the+Implementation+of+Hive+CLI+Using+Beeline)

I think with that in mind, in the medium term we should consider to migrate the 
integration test cases to BeeLine. The exact method and steps is up for 
discussion. Maybe the first thing would be to create the working TestBeeLine 
testcase for several chosen queries from the existing mix, and with that check 
the viability of the idea. It this is possible we might consider running the 
testcases parallel. This has serious risks, but can have a huge impact on the 
overall runtime of the tests.

I do not think I could like to create a patch independently of this one to make 
the BeeLine testcases working. What I did do to be able to run the alter3.q 
testcase query on my laptop is some trivial refactoring, and the following 
almost trivial changes:
{noformat}
diff --git beeline/src/java/org/apache/hive/beeline/util/QFileClient.java 
beeline/src/java/org/apache/hive/beeline/util/QFileClient.java
index 81f1b0e..44b9ca5 100644
--- beeline/src/java/org/apache/hive/beeline/util/QFileClient.java
+++ beeline/src/java/org/apache/hive/beeline/util/QFileClient.java
@@ -125,6 +125,7 @@ void initFilterSet() {
 .addFilter(outputDirectory.toString(), "!!{outputDirectory}!!")
 .addFilter(qFileDirectory.toString(), "!!{qFileDirectory}!!")
 .addFilter(hiveRootDirectory.toString(), "!!{hive.root}!!")
+.addFilter("\\(queryId=[^\\)]*\\)","queryId=(!!{queryId}!!)")
 .addFilter("file:/\\w\\S+", "file:/!!ELIDED!!")
 .addFilter("pfile:/\\w\\S+", "pfile:/!!ELIDED!!")
 .addFilter("hdfs:/\\w\\S+", "hdfs:/!!ELIDED!!")
@@ -134,6 +135,7 @@ void initFilterSet() {
 .addFilter("(\\D)" + currentTimePrefix + "\\d{9}(\\D)", 
"$1!!UNIXTIMEMILLIS!!$2")
 .addFilter(userName, "!!{user.name}!!")
 .addFilter(operatorPattern, "\"$1_!!ELIDED!!\"")
+.addFilter("Time taken: [0-9\\.]* seconds", "Time taken: !!ELIDED!! 
seconds")
 ;
   };
{noformat}

With that I think we will have a more or less working testdriver for BeeLine 
testcase, on which we can improve on.

> Upgrade qtest execution framework to junit4 - migrate most of them
> --
>
> Key: HIVE-1
> URL: https://issues.apache.org/jira/browse/HIVE-1
> Project: Hive
>  Issue Type: Sub-task
>  Components: Tests
>Reporter: Zoltan Haindrich
>Assignee: Zoltan Haindrich
> Attachments: HIVE-1.1.patch, HIVE-1.2.patch, 
> HIVE-1.3.patch, HIVE-1.4.patch
>
>
> this is the second step..migrating all exiting qtestgen generated tests to 
> junit4
> it might be possible that not all will get migrated in this ticket...I will 
> leave out the problematic ones...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14444) Upgrade qtest execution framework to junit4 - migrate most of them

2016-08-12 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15419712#comment-15419712
 ] 

Peter Vary commented on HIVE-1:
---

Lets see what could we do about the BeeLine driver,  and when we know the 
possibilities, maybe problems, then we discuss them on the dev list.

> Upgrade qtest execution framework to junit4 - migrate most of them
> --
>
> Key: HIVE-1
> URL: https://issues.apache.org/jira/browse/HIVE-1
> Project: Hive
>  Issue Type: Sub-task
>  Components: Tests
>Reporter: Zoltan Haindrich
>Assignee: Zoltan Haindrich
> Attachments: HIVE-1.1.patch, HIVE-1.2.patch, 
> HIVE-1.3.patch, HIVE-1.4.patch
>
>
> this is the second step..migrating all exiting qtestgen generated tests to 
> junit4
> it might be possible that not all will get migrated in this ticket...I will 
> leave out the problematic ones...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14215) Displaying inconsistent CPU usage data with MR execution engine

2016-07-13 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374761#comment-15374761
 ] 

Peter Vary commented on HIVE-14215:
---

The test failures are not related

> Displaying inconsistent CPU usage data with MR execution engine
> ---
>
> Key: HIVE-14215
> URL: https://issues.apache.org/jira/browse/HIVE-14215
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14215.patch
>
>
> If the MR task is finished after printing the cumulative CPU time then there 
> is the possibility to print inconsistent CPU usage information.
> Correct one:
> {noformat}
> 2016-07-12 11:31:42,961 Stage-3 map = 0%,  reduce = 0%
> 2016-07-12 11:31:48,237 Stage-3 map = 100%,  reduce = 0%, Cumulative CPU 2.5 
> sec
> MapReduce Total cumulative CPU time: 2 seconds 500 msec
> Ended Job = job_1468321038188_0003
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.5 sec   HDFS Read: 5864 HDFS Write: 
> 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 500 msec
> {noformat}
> One type of inconsistent data (easily reproducible one):
> {noformat}
> 2016-07-12 11:39:00,540 Stage-3 map = 0%,  reduce = 0%
> Ended Job = job_1468321038188_0004
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.51 sec   HDFS Read: 5864 HDFS 
> Write: 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 510 msec
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-18 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15382188#comment-15382188
 ] 

Peter Vary edited comment on HIVE-14123 at 7/18/16 12:19 PM:
-

Review comments addressed


was (Author: pvary):
Review comment addressed

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.5.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-18 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.5.patch

Review comment addressed

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.5.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-18 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.7.patch

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, 
> HIVE-14123.7.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-18 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.6.patch

The QA is not started

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-18 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.4.patch

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-19 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384207#comment-15384207
 ] 

Peter Vary commented on HIVE-14123:
---

Currently we have the following configuration variables (before the patch as 
well):
- Compatibility mode - use the hive-site.xml, and hive config variables as ever
- Beeline mode
- beeline.properties configuration file from the following directories: 
HOME/.beeline/ on UNIX, and HOME/beeline/ on Windows.
- Command line options - these overwrite the ones stored in 
beeline.properties

I have decided not to change this separation in my patch, and my changes only 
effect beeline in beeline mode.

It is not trivial to use the HiveConf object (hive configuration) in beeline 
mode, since it is designed specifically to read the hive-site.xml and other 
server side configurations, and initialized during the server startup. And even 
after refactoring this code, since beeline is a client side program, it is 
debatable which set of variables should be used (server side/client side).
There is a different jira - HIVE-13688 -, which more or less addresses the same 
issue (HiveConf variable substitution).  


> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, 
> HIVE-14123.7.patch, HIVE-14123.8.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-19 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.8.patch

Addressed review comment

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, 
> HIVE-14123.7.patch, HIVE-14123.8.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-19 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.9.patch

Some more comments addressed

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, 
> HIVE-14123.7.patch, HIVE-14123.8.patch, HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-19 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384327#comment-15384327
 ] 

Peter Vary commented on HIVE-14123:
---

Original usage in compatibility mode, and CLI:
{noformat}
$ ./hive
Hive-on-MR is deprecated in Hive 2 and may not be available in the future 
versions. Consider using a different execution engine (i.e. spark, tez) or 
using Hive 1.X releases.
hive> set hive.cli.print.current.db=true;
hive (default)>
{noformat}

or

{noformat}
$ ./hive --hiveconf hive.cli.print.current.db=true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future 
versions. Consider using a different execution engine (i.e. spark, tez) or 
using Hive 1.X releases.
hive (default)> 
{noformat}

or in the configuration file like hive-site.xml

{noformat}

  hive.cli.print.current.db
  true

{noformat}

the result is:
{noformat}
$ ./hive
Hive-on-MR is deprecated in Hive 2 and may not be available in the future 
versions. Consider using a different execution engine (i.e. spark, tez) or 
using Hive 1.X releases.
hive (default)> 
{noformat}

The new usage possibilities in beeline mode:
{noformat}
$ ./beeline -u "jdbc:hive2:// a a" --showDbInPrompt=true
Connecting to jdbc:hive2://
Connected to: Apache Hive (version 2.2.0-SNAPSHOT)
Driver: Hive JDBC (version 2.2.0-SNAPSHOT)
Beeline version 2.2.0-SNAPSHOT by Apache Hive
0: jdbc:hive2:// (default)>
{noformat}

or in the ~/.beeline/beeline.properties on UNIX, or in 
HOME/beeline/beeline.properties on Windows
{noformat}
#Beeline version 2.2.0-SNAPSHOT by Apache Hive
#Tue Jul 19 17:09:49 CEST 2016
beeline.showdbinprompt=true
{noformat}

the result is:
{noformat}
$ ./beeline -u "jdbc:hive2:// a a"
Connecting to jdbc:hive2://
Connected to: Apache Hive (version 2.2.0-SNAPSHOT)
Driver: Hive JDBC (version 2.2.0-SNAPSHOT)
Beeline version 2.2.0-SNAPSHOT by Apache Hive
0: jdbc:hive2:// (default)> 
{noformat}

There is currently no possibility in beeline mode to change the configuration 
runtime.

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, 
> HIVE-14123.4.patch, HIVE-14123.5.patch, HIVE-14123.6.patch, 
> HIVE-14123.7.patch, HIVE-14123.8.patch, HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-19 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Attachment: HIVE-14123.10.patch

Addressing review comments

> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.10.patch, HIVE-14123.2.patch, 
> HIVE-14123.3.patch, HIVE-14123.4.patch, HIVE-14123.5.patch, 
> HIVE-14123.6.patch, HIVE-14123.7.patch, HIVE-14123.8.patch, 
> HIVE-14123.9.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14001) beeline doesn't give out an error when takes either "-e" or "-f" in command instead of both

2016-07-15 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15379357#comment-15379357
 ] 

Peter Vary commented on HIVE-14001:
---

[~xuefuz] This patch created the consistency between Beeline in compatibility 
mode (initArgsFromCliVars already contained this check), and Beeline in beeline 
mode (initArgs method will contain the check after the patch). The CLI contains 
this check also.

So we are finally-totally-consistent! :) 

> beeline doesn't give out an error when takes either "-e" or "-f" in command 
> instead of both
> ---
>
> Key: HIVE-14001
> URL: https://issues.apache.org/jira/browse/HIVE-14001
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline
>Affects Versions: 0.10.0, 2.0.1
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Trivial
> Fix For: 2.2.0
>
> Attachments: HIVE-14001.2.patch, HIVE-14001.patch
>
>
> When providing both arguments there should be an error message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14215) Displaying inconsistent CPU usage data with MR execution engine

2016-07-12 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15372954#comment-15372954
 ] 

Peter Vary commented on HIVE-14215:
---

To reproduce these consistently, I have to put a Thread.sleep at the end of the 
while cycle in the method progress(ExecDriverTaskHandle th), after this (line 
373):
{noformat}
  console.printInfo(output);
  task.setStatusMessage(output);
  reportTime = System.currentTimeMillis();
{noformat}

This way I raised the occurrence of the rare situation, where the job is 
finished after the cpu time generation, but before the check of the while cycle.

> Displaying inconsistent CPU usage data with MR execution engine
> ---
>
> Key: HIVE-14215
> URL: https://issues.apache.org/jira/browse/HIVE-14215
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>
> If the MR task is finished after printing the cumulative CPU time then there 
> is the possibility to print inconsistent CPU usage information.
> Correct one:
> {noformat}
> 2016-07-12 11:31:42,961 Stage-3 map = 0%,  reduce = 0%
> 2016-07-12 11:31:48,237 Stage-3 map = 100%,  reduce = 0%, Cumulative CPU 2.5 
> sec
> MapReduce Total cumulative CPU time: 2 seconds 500 msec
> Ended Job = job_1468321038188_0003
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.5 sec   HDFS Read: 5864 HDFS Write: 
> 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 500 msec
> {noformat}
> One type of inconsistent data (easily reproducible one):
> {noformat}
> 2016-07-12 11:39:00,540 Stage-3 map = 0%,  reduce = 0%
> Ended Job = job_1468321038188_0004
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.51 sec   HDFS Read: 5864 HDFS 
> Write: 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 510 msec
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14215) Displaying inconsistent CPU usage data with MR execution engine

2016-07-12 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14215:
--
Attachment: HIVE-14215.patch

Not sure how to create a unit test for this situation, but created a simple 
patch which contains reordering the cpu time calculation.

> Displaying inconsistent CPU usage data with MR execution engine
> ---
>
> Key: HIVE-14215
> URL: https://issues.apache.org/jira/browse/HIVE-14215
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14215.patch
>
>
> If the MR task is finished after printing the cumulative CPU time then there 
> is the possibility to print inconsistent CPU usage information.
> Correct one:
> {noformat}
> 2016-07-12 11:31:42,961 Stage-3 map = 0%,  reduce = 0%
> 2016-07-12 11:31:48,237 Stage-3 map = 100%,  reduce = 0%, Cumulative CPU 2.5 
> sec
> MapReduce Total cumulative CPU time: 2 seconds 500 msec
> Ended Job = job_1468321038188_0003
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.5 sec   HDFS Read: 5864 HDFS Write: 
> 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 500 msec
> {noformat}
> One type of inconsistent data (easily reproducible one):
> {noformat}
> 2016-07-12 11:39:00,540 Stage-3 map = 0%,  reduce = 0%
> Ended Job = job_1468321038188_0004
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.51 sec   HDFS Read: 5864 HDFS 
> Write: 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 510 msec
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14215) Displaying inconsistent CPU usage data with MR execution engine

2016-07-12 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15372929#comment-15372929
 ] 

Peter Vary commented on HIVE-14215:
---

And an here it is even worse:
{noformat}
2016-07-12 14:00:42,190 Stage-3 map = 0%,  reduce = 0%
2016-07-12 14:00:50,465 Stage-3 map = 67%,  reduce = 0%, Cumulative CPU 6.56 sec
MapReduce Total cumulative CPU time: 6 seconds 560 msec
Ended Job = job_1468321038188_0018
MapReduce Jobs Launched: 
Stage-Stage-3: Map: 3   Cumulative CPU: 10.26 sec   HDFS Read: 383060 HDFS 
Write: 6190612 SUCCESS
Total MapReduce CPU Time Spent: 10 seconds 260 msec
{noformat}

> Displaying inconsistent CPU usage data with MR execution engine
> ---
>
> Key: HIVE-14215
> URL: https://issues.apache.org/jira/browse/HIVE-14215
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
>
> If the MR task is finished after printing the cumulative CPU time then there 
> is the possibility to print inconsistent CPU usage information.
> Correct one:
> {noformat}
> 2016-07-12 11:31:42,961 Stage-3 map = 0%,  reduce = 0%
> 2016-07-12 11:31:48,237 Stage-3 map = 100%,  reduce = 0%, Cumulative CPU 2.5 
> sec
> MapReduce Total cumulative CPU time: 2 seconds 500 msec
> Ended Job = job_1468321038188_0003
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.5 sec   HDFS Read: 5864 HDFS Write: 
> 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 500 msec
> {noformat}
> One type of inconsistent data (easily reproducible one):
> {noformat}
> 2016-07-12 11:39:00,540 Stage-3 map = 0%,  reduce = 0%
> Ended Job = job_1468321038188_0004
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.51 sec   HDFS Read: 5864 HDFS 
> Write: 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 510 msec
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14215) Displaying inconsistent CPU usage data with MR execution engine

2016-07-12 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14215:
--
Status: Patch Available  (was: Open)

Tested the patch with the same sleep changes, and is is working

> Displaying inconsistent CPU usage data with MR execution engine
> ---
>
> Key: HIVE-14215
> URL: https://issues.apache.org/jira/browse/HIVE-14215
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14215.patch
>
>
> If the MR task is finished after printing the cumulative CPU time then there 
> is the possibility to print inconsistent CPU usage information.
> Correct one:
> {noformat}
> 2016-07-12 11:31:42,961 Stage-3 map = 0%,  reduce = 0%
> 2016-07-12 11:31:48,237 Stage-3 map = 100%,  reduce = 0%, Cumulative CPU 2.5 
> sec
> MapReduce Total cumulative CPU time: 2 seconds 500 msec
> Ended Job = job_1468321038188_0003
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.5 sec   HDFS Read: 5864 HDFS Write: 
> 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 500 msec
> {noformat}
> One type of inconsistent data (easily reproducible one):
> {noformat}
> 2016-07-12 11:39:00,540 Stage-3 map = 0%,  reduce = 0%
> Ended Job = job_1468321038188_0004
> MapReduce Jobs Launched: 
> Stage-Stage-3: Map: 1   Cumulative CPU: 2.51 sec   HDFS Read: 5864 HDFS 
> Write: 103 SUCCESS
> Total MapReduce CPU Time Spent: 2 seconds 510 msec
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14100) current_user() returns invalid information

2016-06-27 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350995#comment-15350995
 ] 

Peter Vary commented on HIVE-14100:
---

The description states (current_user() - Returns current user name | 
SessionState *UserFromAuthenticator*), but when using 
HadoopDefaultAuthentication, it returns the unix username running the 
hiveserver2 process.

[~apivovarov] What was the original intention of the current_user()? Should it 
return the user used for the background process authentication 
(UserFromAuthenticator), or the user used to authenticate the connection 
(SessionState.get().getUserName())?

Thanks,
Peter

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Priority: Minor
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14098:
--
Status: Patch Available  (was: Open)

> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351007#comment-15351007
 ] 

Peter Vary commented on HIVE-14098:
---

Checked the results, and I think these are not related

> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.2.patch, HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350851#comment-15350851
 ] 

Peter Vary commented on HIVE-14098:
---

[~spena] please review
https://reviews.apache.org/r/49259/


> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.2.patch, HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14098:
--
Attachment: HIVE-14098.2.patch

Git generated format

> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.2.patch, HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14098:
--
Attachment: HIVE-14098.patch

Removing password logging

> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14098) Logging task properties, and environment variables might contain passwords

2016-06-27 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350814#comment-15350814
 ] 

Peter Vary commented on HIVE-14098:
---

Checked the results, and I think these are not related

> Logging task properties, and environment variables might contain passwords
> --
>
> Key: HIVE-14098
> URL: https://issues.apache.org/jira/browse/HIVE-14098
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Logging, Spark
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14098.patch
>
>
> Hive MapredLocalTask Can Print Environment Passwords, like 
> -Djavax.net.ssl.trustStorePassword.
> The same could happen, when logging spark properties



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14138) CBO failed for select current_database()

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14138:
--
Attachment: HIVE-14138.patch

Patch for not using CBO if there is no source table in any of the queries, or 
subqueries 

> CBO failed for select current_database()
> 
>
> Key: HIVE-14138
> URL: https://issues.apache.org/jira/browse/HIVE-14138
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Peter Vary
>Priority: Minor
> Attachments: HIVE-14138.patch
>
>
> When issuing the following query, with hive.cbo.enable set to true:
> select current_database();
> The following exception is printed to the Hiveserver2 logs:
> 2016-06-30T09:58:24,146 ERROR [HiveServer2-Handler-Pool: Thread-33] 
> parse.CalcitePlanner: CBO failed, skipping CBO. 
> org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: 
> Unsupported
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3136)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:940)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:894)
>   at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
>   at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
>   at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149)
>   at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:712)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:280)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10795)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:239)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:438)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:329)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1159)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1146)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:464)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:451)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
>   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>   at 
> org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
>   at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-14138) CBO failed for select current_database()

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary reassigned HIVE-14138:
-

Assignee: Peter Vary

> CBO failed for select current_database()
> 
>
> Key: HIVE-14138
> URL: https://issues.apache.org/jira/browse/HIVE-14138
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14138.patch
>
>
> When issuing the following query, with hive.cbo.enable set to true:
> select current_database();
> The following exception is printed to the Hiveserver2 logs:
> 2016-06-30T09:58:24,146 ERROR [HiveServer2-Handler-Pool: Thread-33] 
> parse.CalcitePlanner: CBO failed, skipping CBO. 
> org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: 
> Unsupported
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3136)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:940)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:894)
>   at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
>   at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
>   at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149)
>   at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:712)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:280)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10795)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:239)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:438)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:329)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1159)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1146)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:464)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:451)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
>   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>   at 
> org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
>   at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14138) CBO failed for select current_database()

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14138:
--
Status: Patch Available  (was: Open)

Submitting the patch, to see if it breaks anything

> CBO failed for select current_database()
> 
>
> Key: HIVE-14138
> URL: https://issues.apache.org/jira/browse/HIVE-14138
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14138.patch
>
>
> When issuing the following query, with hive.cbo.enable set to true:
> select current_database();
> The following exception is printed to the Hiveserver2 logs:
> 2016-06-30T09:58:24,146 ERROR [HiveServer2-Handler-Pool: Thread-33] 
> parse.CalcitePlanner: CBO failed, skipping CBO. 
> org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: 
> Unsupported
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3136)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:940)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:894)
>   at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
>   at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
>   at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149)
>   at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:712)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:280)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10795)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:239)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:438)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:329)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1159)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1146)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:464)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:451)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
>   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>   at 
> org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
>   at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14123) Add beeline configuration option to show database in the prompt

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14123:
--
Description: 
There are several jira issues complaining that, the Beeline does not respect 
hive.cli.print.current.db.

This is partially true, since in embedded mode, it uses the 
hive.cli.print.current.db to change the prompt, since HIVE-10511.

In beeline mode, I think this function should use a beeline command line option 
instead, like for the showHeader option emphasizing, that this is a client side 
option.

  was:
There are several jira issues complaining that, the Beeline does not respect 
hive.cli.print.current.db.

This is partially true, since in embedded mode, it uses the 
hive.cli.print.current.db to change the prompt, since HIVE-10511.

In remote mode, I think this function should use a beeline command line option 
instead, like for the showHeader option emphasizing, that this is a client side 
option.


> Add beeline configuration option to show database in the prompt
> ---
>
> Key: HIVE-14123
> URL: https://issues.apache.org/jira/browse/HIVE-14123
> Project: Hive
>  Issue Type: Improvement
>  Components: Beeline, CLI
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14123.2.patch, HIVE-14123.3.patch, HIVE-14123.patch
>
>
> There are several jira issues complaining that, the Beeline does not respect 
> hive.cli.print.current.db.
> This is partially true, since in embedded mode, it uses the 
> hive.cli.print.current.db to change the prompt, since HIVE-10511.
> In beeline mode, I think this function should use a beeline command line 
> option instead, like for the showHeader option emphasizing, that this is a 
> client side option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14100) current_user() returns invalid information

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14100:
--
Status: Patch Available  (was: Open)

The patch is ready

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14100.patch
>
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14100) current_user() returns invalid information

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14100:
--
Attachment: HIVE-14100.patch

Since there was no answer from the original author, and we do not want to break 
the backward compatibility, a new function is provided to return the logged in 
user

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14100.patch
>
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14138) CBO failed for select current_database()

2016-07-06 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14138:
--
Attachment: HIVE-14138.2.patch

Addressing the unit test issue

> CBO failed for select current_database()
> 
>
> Key: HIVE-14138
> URL: https://issues.apache.org/jira/browse/HIVE-14138
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14138.2.patch, HIVE-14138.patch
>
>
> When issuing the following query, with hive.cbo.enable set to true:
> select current_database();
> The following exception is printed to the Hiveserver2 logs:
> 2016-06-30T09:58:24,146 ERROR [HiveServer2-Handler-Pool: Thread-33] 
> parse.CalcitePlanner: CBO failed, skipping CBO. 
> org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: 
> Unsupported
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3136)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:940)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:894)
>   at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113)
>   at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:969)
>   at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149)
>   at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:712)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:280)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10795)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:239)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:438)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:329)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1159)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1146)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:464)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:451)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
>   at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
>   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>   at 
> org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
>   at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-08 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.4.patch

As discussed I merged the escapeCommand with the HiveStringUtils.escapeJava.

Created a new function in HiveStringUtils, so it can be reused.

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14195) HiveMetaStoreClient getFunction() does not throw NoSuchObjectException

2016-07-08 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14195:
--
Priority: Minor  (was: Major)

> HiveMetaStoreClient getFunction() does not throw NoSuchObjectException
> --
>
> Key: HIVE-14195
> URL: https://issues.apache.org/jira/browse/HIVE-14195
> Project: Hive
>  Issue Type: Bug
>  Components: Metastore
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14195.patch
>
>
> HiveMetaStoreClient getFunction(dbName, funcName) does not throw 
> NoSuchObjectException when no function with funcName exists in the db. 
> Instead, I need to search the MetaException message for 
> 'NoSuchObjectException'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14195) HiveMetaStoreClient getFunction() does not throw NoSuchObjectException

2016-07-08 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14195:
--
Attachment: HIVE-14195.patch

The NoSuchObject is handled differently than other exceptions

> HiveMetaStoreClient getFunction() does not throw NoSuchObjectException
> --
>
> Key: HIVE-14195
> URL: https://issues.apache.org/jira/browse/HIVE-14195
> Project: Hive
>  Issue Type: Bug
>  Components: Metastore
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14195.patch
>
>
> HiveMetaStoreClient getFunction(dbName, funcName) does not throw 
> NoSuchObjectException when no function with funcName exists in the db. 
> Instead, I need to search the MetaException message for 
> 'NoSuchObjectException'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14195) HiveMetaStoreClient getFunction() does not throw NoSuchObjectException

2016-07-08 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14195:
--
Status: Patch Available  (was: Open)

> HiveMetaStoreClient getFunction() does not throw NoSuchObjectException
> --
>
> Key: HIVE-14195
> URL: https://issues.apache.org/jira/browse/HIVE-14195
> Project: Hive
>  Issue Type: Bug
>  Components: Metastore
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14195.patch
>
>
> HiveMetaStoreClient getFunction(dbName, funcName) does not throw 
> NoSuchObjectException when no function with funcName exists in the db. 
> Instead, I need to search the MetaException message for 
> 'NoSuchObjectException'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-08 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.5.patch

Cat on the computer - some extra character in the patch

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-06 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.3.patch

The same patch again - I do not think the errors are caused by the patch

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14100) current_user() returns invalid information

2016-07-07 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15365940#comment-15365940
 ] 

Peter Vary commented on HIVE-14100:
---

Review request sent: https://reviews.apache.org/r/49748/

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14100.2.patch, HIVE-14100.patch
>
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14100) current_user() returns invalid information

2016-07-07 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15365931#comment-15365931
 ] 

Peter Vary commented on HIVE-14100:
---

The errors are not related.

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14100.2.patch, HIVE-14100.patch
>
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-11 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15370422#comment-15370422
 ] 

Peter Vary commented on HIVE-14146:
---

Checked the test results and these are not related.

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14195) HiveMetaStoreClient getFunction() does not throw NoSuchObjectException

2016-07-11 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14195:
--
Attachment: HIVE-14195.2.patch

There are existing test for getFunction method, so I removed mine, and updated 
them.

> HiveMetaStoreClient getFunction() does not throw NoSuchObjectException
> --
>
> Key: HIVE-14195
> URL: https://issues.apache.org/jira/browse/HIVE-14195
> Project: Hive
>  Issue Type: Bug
>  Components: Metastore
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14195.2.patch, HIVE-14195.patch
>
>
> HiveMetaStoreClient getFunction(dbName, funcName) does not throw 
> NoSuchObjectException when no function with funcName exists in the db. 
> Instead, I need to search the MetaException message for 
> 'NoSuchObjectException'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-11 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15370453#comment-15370453
 ] 

Peter Vary commented on HIVE-14146:
---

Review request created: https://reviews.apache.org/r/49882/

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.3.patch, 
> HIVE-14146.4.patch, HIVE-14146.5.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.patch

The proposed patch

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-05 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Status: Patch Available  (was: Open)

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-05 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15362599#comment-15362599
 ] 

Peter Vary commented on HIVE-14146:
---

Thanks [~niklaus.xiao].
For human use, your solution is perfect, but we had to parse the response by 
code.
My example above is clearly a bug, which should be solved. My proposed solution 
is to print out an escaped \n for this scenario.

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-05 Thread Peter Vary (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15362693#comment-15362693
 ] 

Peter Vary commented on HIVE-14146:
---

Good catch [~aihuaxu]. I realised that myself, and in the process to updating 
the patch :)
Thanks anyway!!!

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14146) Column comments with "\n" character "corrupts" table metadata

2016-07-06 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14146:
--
Attachment: HIVE-14146.2.patch

Addressed [~aihuaxu]'s comments, and the failing query tests

> Column comments with "\n" character "corrupts" table metadata
> -
>
> Key: HIVE-14146
> URL: https://issues.apache.org/jira/browse/HIVE-14146
> Project: Hive
>  Issue Type: Bug
>  Components: Beeline
>Affects Versions: 2.2.0
>Reporter: Peter Vary
>Assignee: Peter Vary
> Attachments: HIVE-14146.2.patch, HIVE-14146.patch
>
>
> Create a table with the following(noting the \n in the COMMENT):
> {noformat}
> CREATE TABLE commtest(first_nm string COMMENT 'Indicates First name\nof an 
> individual’);
> {noformat}
> Describe shows that now the metadata is messed up:
> {noformat}
> beeline> describe commtest;
> +---++---+--+
> | col_name  | data_type  |comment|
> +---++---+--+
> | first_nm | string   | Indicates First name  |
> | of an individual  | NULL   | NULL  |
> +---++---+--+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14100) current_user() returns invalid information

2016-07-06 Thread Peter Vary (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Vary updated HIVE-14100:
--
Attachment: HIVE-14100.2.patch

Updating the query test

> current_user() returns invalid information
> --
>
> Key: HIVE-14100
> URL: https://issues.apache.org/jira/browse/HIVE-14100
> Project: Hive
>  Issue Type: Bug
>  Components: Authentication, Beeline
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Minor
> Attachments: HIVE-14100.2.patch, HIVE-14100.patch
>
>
> Using HadoopDeaultAuthenticator the current_user() returns the username of 
> the unix user running hiveservice2.
> Using SessionStateAuthenticator the current_user returns the username which 
> is provided when the connection started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   3   4   5   6   7   8   9   10   >