Re: FAILED: ParseException line 12:0 mismatched input 'Comment' expecting Identifier near ',' in column specification

2013-09-18 Thread Artem Ervits
Thank you, will do.


Artem Ervits
Data Analyst
New York Presbyterian Hospital

From: Justin Workman [mailto:justinjwork...@gmail.com]
Sent: Wednesday, September 18, 2013 11:01 AM
To: user@hive.apache.org 
Subject: Re: FAILED: ParseException line 12:0 mismatched input 'Comment' 
expecting Identifier near ',' in column specification

Try putting back ticks around comment since its a reserved word.

Sent from my iPhone

On Sep 18, 2013, at 8:54 AM, Artem Ervits 
mailto:are9...@nyp.org>> wrote:

Anyone?

From: Artem Ervits [mailto:are9...@nyp.org]
Sent: Monday, September 16, 2013 5:07 PM
To: user@hive.apache.org
Subject: FAILED: ParseException line 12:0 mismatched input 'Comment' expecting 
Identifier near ',' in column specification

Hello all, I’m trying to create a table with a column called “Comment” and I 
get the following exception:

FAILED: ParseException line 12:0 mismatched input 'Comment' expecting 
Identifier near ',' in column specification

I am running hive-common-0.10.0.23.jar version of Hive. Is that a bug or a 
feature? I understand that you can insert comments in DDL statements but what 
if a column name happens to be a reserved word, as in this case?

Thanks

Artem Ervits
ar...@nyp.org
New York Presbyterian Hospital


This electronic message is intended to be for the use only of the named 
recipient, and may contain information that is confidential or privileged. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the contents of this message is 
strictly prohibited. If you have received this message in error or are not the 
named recipient, please notify us immediately by contacting the sender at the 
electronic mail address noted above, and delete and destroy all copies of this 
message. Thank you.


Confidential Information subject to NYP's (and its affiliates') information 
management and security policies (http://infonet.nyp.org/QA/HospitalManual).

This electronic message is intended to be for the use only of the named 
recipient, and may contain information that is confidential or privileged. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the contents of this message is 
strictly prohibited. If you have received this message in error or are not the 
named recipient, please notify us immediately by contacting the sender at the 
electronic mail address noted above, and delete and destroy all copies of this 
message. Thank you.

This electronic message is intended to be for the use only of the named 
recipient, and may contain information that is confidential or privileged.  If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the contents of this message is 
strictly prohibited.  If you have received this message in error or are not the 
named recipient, please notify us immediately by contacting the sender at the 
electronic mail address noted above, and delete and destroy all copies of this 
message.  Thank you.


Re: User accounts to execute hive queries

2013-09-18 Thread Thejas Nair
You might find my slides on this topic useful -
http://www.slideshare.net/thejasmn/hive-authorization-models

Also linked from last slide  -
https://cwiki.apache.org/confluence/display/HCATALOG/Storage+Based+Authorization

On Tue, Sep 17, 2013 at 11:46 PM, Nitin Pawar  wrote:
> The link I gave in previous mail explains how can you user level
> authorizations in hive.
>
>
>
> On Mon, Sep 16, 2013 at 7:57 PM,  wrote:
>>
>> Hi Nitin,
>>
>>
>>
>> I want it secured.
>>
>>
>>
>> Yes, I would like to give specific access to specific users. E.g. “select
>> * from” access to some and “add/modify/delete” options to some
>>
>>
>>
>>
>>
>> “What kind of security do you have on hdfs? “
>>
>> I could not follow this question
>>
>>
>>
>> Thanks,
>>
>> Shouvanik
>>
>> From: Nitin Pawar [mailto:nitinpawar...@gmail.com]
>> Sent: Monday, September 16, 2013 6:50 PM
>> To: Haldar, Shouvanik
>> Cc: user@hive.apache.org
>> Subject: Re: User accounts to execute hive queries
>>
>>
>>
>> You will need to tell few more things.
>>
>> Do you want it secured?
>>
>> Do you distinguish users in different categories on what one particular
>> user can do or not?
>>
>> What kind of security do you have on hdfs?
>>
>>
>>
>>
>>
>> It is definitely possible for users to run queries on their own username
>> but then you have to take few measures as well.
>>
>> which user can do what action. Which user can access what location on hdfs
>> etc
>>
>>
>>
>> For user management on hive side you can read at
>> https://cwiki.apache.org/Hive/languagemanual-authorization.html
>>
>>
>>
>> if you do not want to go through the secure way,
>>
>> then add all the users to one group and then grant permissions to that
>> group on your warehouse directory.
>>
>>
>>
>> other way if the table data is not shared then,
>>
>> create individual directory for each user on hdfs and give only that user
>> access to that directory.
>>
>>
>> 
>> This message is for the designated recipient only and may contain
>> privileged, proprietary, or otherwise confidential information. If you have
>> received it in error, please notify the sender immediately and delete the
>> original. Any other use of the e-mail by you is prohibited.
>>
>> Where allowed by local law, electronic communications with Accenture and
>> its affiliates, including e-mail and instant messaging (including content),
>> may be scanned by our systems for the purposes of information security and
>> assessment of internal compliance with Accenture policy.
>>
>>
>> __
>>
>> www.accenture.com
>
>
>
>
> --
> Nitin Pawar

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.


Re: Export/Import Table in Hive NPE

2013-09-18 Thread Brad Ruderman
Hi All-
Just wondering if anyone had any ideas. The error message I am getting now
when exporting a managed table from hive 0.9 to hive .10 is:


13/09/18 13:14:02 ERROR ql.Driver: FAILED: SemanticException Exception
while processing
org.apache.hadoop.hive.ql.parse.SemanticException: Exception while
processing
at
org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer.analyzeInternal(ImportSemanticAnalyzer.java:277)
 at
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:459)
 at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:349)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:938)
 at org.apache.hadoop.hive.ql.Driver.run(Driver.java:902)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
 at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
 at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:347)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:706)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
Caused by: java.lang.NullPointerException
at java.util.ArrayList.(ArrayList.java:131)
at
org.apache.hadoop.hive.ql.plan.CreateTableDesc.(CreateTableDesc.java:128)
 at
org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer.analyzeInternal(ImportSemanticAnalyzer.java:99)
... 16 more

13/09/18 13:14:02 INFO ql.Driver: 
13/09/18 13:14:02 INFO ql.Driver: 
13/09/18 13:14:02 INFO ql.Driver: 
13/09/18 13:14:02 INFO ql.Driver: 
13/09/18 13:14:02 INFO ql.Driver: 

Thanks,
Brad



On Tue, Sep 17, 2013 at 2:22 PM, Brad Ruderman wrote:

> Hi All-
> I am trying to export a table in Hive 0.9, then import it into Hive 0.10
> staging. Essentially moving data from a production import to staging.
>
> I used the EXPORT table command, however when I try to import the table
> back into staging I receive the following (pulled from the hive.log file).
> Could anyone help to point me in what i should be looking that could cause
> the problem? This is a hive managed table in the source instance, where it
> was originally moved into hive by Sqoop.
>
> Thanks,
> Brad
>
>
>
> 2013-09-17 14:10:27,482 INFO  parse.ParseDriver
> (ParseDriver.java:parse(433)) - Parsing command: IMPORT FROM
> 'hdfs://user/hdfs/test_table'
> 2013-09-17 14:10:27,482 INFO  parse.ParseDriver
> (ParseDriver.java:parse(450)) - Parse Completed
> 2013-09-17 14:10:27,486 ERROR ql.Driver
> (SessionState.java:printError(427)) - FAILED: SemanticException Exception
> while processing
> org.apache.hadoop.hive.ql.parse.SemanticException: Exception while
> processing
> at
> org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer.analyzeInternal(ImportSemanticAnalyzer.java:277)
>  at
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:459)
>  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:349)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:938)
>  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:902)
> at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
>  at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
>  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> Caused by: java.lang.IllegalArgumentException:
> java.net.UnknownHostException: user
> at
> org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:414)
>  at
> org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:164)
> at
> org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:129)
>  at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:448)
> at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:410)
>  at
> org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:128)
> at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2308)
>  at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:87)
> at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2

Hive Query via Hue, Only column headers in downloaded CSV or XSL results, sometimes

2013-09-18 Thread Sunderlin, Mark
Using Hive V11, via Hue from CDH4, I can run my query, output 10 rows (limit 
10) and download to a nice CSV or XSL file ... sometimes. :-(

Sometimes, even when the run is error free, the download only downloads the 
column headers.  This is true for both the CSV and XSL options.

It is only ten lines of output, so it cannot be a number of rows issue.  Is 
there a limit to the width of the data you can download?  A limit on the number 
of columns?

Anyone seen this before?  Does anyone  know a fix or a work around?

---
Mark E. Sunderlin
Data Architect | AOL NETWORKS BDM
P: 703-265-6935 | C: 540-327-6222 | AIM: MESunderlin
22000 AOL Way,  Dulles, VA  20166




Re: FAILED: ParseException line 12:0 mismatched input 'Comment' expecting Identifier near ',' in column specification

2013-09-18 Thread Justin Workman
Try putting back ticks around comment since its a reserved word.

Sent from my iPhone

On Sep 18, 2013, at 8:54 AM, Artem Ervits  wrote:

  Anyone?



*From:* Artem Ervits [mailto:are9...@nyp.org ]
*Sent:* Monday, September 16, 2013 5:07 PM
*To:* user@hive.apache.org
*Subject:* FAILED: ParseException line 12:0 mismatched input 'Comment'
expecting Identifier near ',' in column specification



Hello all, I’m trying to create a table with a column called “Comment” and
I get the following exception:



FAILED: ParseException line 12:0 mismatched input 'Comment' expecting
Identifier near ',' in column specification



I am running hive-common-0.10.0.23.jar version of Hive. Is that a bug or a
feature? I understand that you can insert comments in DDL statements but
what if a column name happens to be a reserved word, as in this case?



Thanks



Artem Ervits

ar...@nyp.org

New York Presbyterian Hospital




This electronic message is intended to be for the use only of the named
recipient, and may contain information that is confidential or privileged.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of the contents of this message is
strictly prohibited. If you have received this message in error or are not
the named recipient, please notify us immediately by contacting the sender
at the electronic mail address noted above, and delete and destroy all
copies of this message. Thank you.
 --


Confidential Information subject to NYP's (and its affiliates') information
management and security policies (http://infonet.nyp.org/QA/HospitalManual).

This electronic message is intended to be for the use only of the named
recipient, and may contain information that is confidential or privileged.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of the contents of this message is
strictly prohibited. If you have received this message in error or are not
the named recipient, please notify us immediately by contacting the sender
at the electronic mail address noted above, and delete and destroy all
copies of this message. Thank you.


RE: FAILED: ParseException line 12:0 mismatched input 'Comment' expecting Identifier near ',' in column specification

2013-09-18 Thread Artem Ervits
Anyone?

From: Artem Ervits [mailto:are9...@nyp.org]
Sent: Monday, September 16, 2013 5:07 PM
To: user@hive.apache.org
Subject: FAILED: ParseException line 12:0 mismatched input 'Comment' expecting 
Identifier near ',' in column specification

Hello all, I'm trying to create a table with a column called "Comment" and I 
get the following exception:

FAILED: ParseException line 12:0 mismatched input 'Comment' expecting 
Identifier near ',' in column specification

I am running hive-common-0.10.0.23.jar version of Hive. Is that a bug or a 
feature? I understand that you can insert comments in DDL statements but what 
if a column name happens to be a reserved word, as in this case?

Thanks

Artem Ervits
ar...@nyp.org
New York Presbyterian Hospital


This electronic message is intended to be for the use only of the named 
recipient, and may contain information that is confidential or privileged. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the contents of this message is 
strictly prohibited. If you have received this message in error or are not the 
named recipient, please notify us immediately by contacting the sender at the 
electronic mail address noted above, and delete and destroy all copies of this 
message. Thank you.


Confidential Information subject to NYP's (and its affiliates') information 
management and security policies (http://infonet.nyp.org/QA/HospitalManual).

This electronic message is intended to be for the use only of the named 
recipient, and may contain information that is confidential or privileged.  If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the contents of this message is 
strictly prohibited.  If you have received this message in error or are not the 
named recipient, please notify us immediately by contacting the sender at the 
electronic mail address noted above, and delete and destroy all copies of this 
message.  Thank you.