RE: Security for Hive

2013-02-22 Thread Austin Chungath
  So that means any user can revoke or give permissions to any user for any
table in the metastore?

Sent from my Phone, please ignore typos
 --
From: bejoy...@yahoo.com
Sent: 22-02-2013 11:30 PM
To: user@hive.apache.org
Subject: Re: Security for Hive

Hi Sachin

Currently there is no such admin user concept in hive.
Regards
Bejoy KS

Sent from remote device, Please excuse typos
--
*From: * Sachin Sudarshana 
*Date: *Fri, 22 Feb 2013 16:40:49 +0530
*To: *
*ReplyTo: * user@hive.apache.org
*Subject: *Re: Security for Hive

Hi,
I have read about roles, user privileges, group privileges etc.
But these roles can be created by any user for any database/table. I would
like to know if there is a specific 'administrator' for hive who can log on
with his credentials and is the only one entitled to create roles, grant
privileges etc.

Thank you.

On Fri, Feb 22, 2013 at 4:19 PM, Jagat Singh  wrote:

> You might want to read this
>
> https://cwiki.apache.org/Hive/languagemanual-auth.html
>
>
>
>
> On Fri, Feb 22, 2013 at 9:44 PM, Sachin Sudarshana <
> sachin.sudarsh...@gmail.com> wrote:
>
>> Hi,
>>
>> I have just started learning about hive.
>> I have configured Hive to use mysql as the metastore instead of derby.
>> If I wish to use GRANT and REVOKE commands, i can use it with any user. A
>> user can issue GRANT or REVOKE commands to any other users' table since
>> both the users' tables are present in the same warehouse.
>>
>> Isn't there a concept of superuser/admin in hive who alone has the
>> authority to issue these commands ?
>>
>> Any answer is greatly appreciated!
>>
>> --
>> Thanks and Regards,
>> Sachin Sudarshana
>>
>
>


-- 
Thanks and Regards,
Sachin Sudarshana


Re: [SQLWindowing] Windowing function output path syntax (#26)

2013-02-22 Thread Butani, Harish
 The plan dump indicates that you are not using the latest code from the 
ptf-windowing branch. So first of all, if you can please try with the latest 
code.
Otherwise can you post the log file of the failed task; and also tell us which 
version of the code you are using.

Regards,
Harish.

From: neelesh gadhia mailto:ngad...@yahoo.com>>
Reply-To: "user@hive.apache.org" 
mailto:user@hive.apache.org>>, neelesh gadhia 
mailto:ngad...@yahoo.com>>
Date: Friday, February 22, 2013 2:55 PM
To: "user@hive.apache.org" 
mailto:user@hive.apache.org>>, 
"hashut...@apache.org" 
mailto:hashut...@apache.org>>
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)

Thanks Harish for your quick response.

I tried it with the new syntax using one of the example in 
ptf_general_queries.q and get the following error. Am I still doing something 
wrong here?

hive> select mid, tdate, tamt,sum(tamt) as com_sum over (rows between unbounded 
preceding and current row)
> from t_enc
> distribute by mid
> sort by mid, tdate;

1.TS :
RowResolver::
columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
Aliases:[
t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
]
columns mapped to expressions:[
]

2.RS :
RowResolver::
columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
Aliases:[
t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
]
columns mapped to expressions:[
]

3.EX :
RowResolver::
columns:[t_enc._col0, t_enc._col1, t_enc._col2]
Aliases:[
t_enc:[mid -> _col0, tdate -> _col1, tamt -> _col2
]
columns mapped to expressions:[
]

4.PTF :
RowResolver::
columns:[._col0, t_enc._col1, t_enc._col2, t_enc._col3]
Aliases:[
:[(tok_function sum (tok_table_or_col tamt) (tok_windowspec 
(tok_windowrange (preceding unbounded) current))) -> _col0
t_enc:[mid -> _col1, tdate -> _col2, tamt -> _col3
]
columns mapped to expressions:[
(TOK_FUNCTION sum (TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC 
(TOK_WINDOWRANGE (preceding unbounded) current))) -> (TOK_FUNCTION sum 
(TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC (TOK_WINDOWRANGE (preceding unbounded) 
current)))
]

insclause-0:
Def ObjectInspector:[_col0, _col1, _col2]
SerDe:org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
windowingtablefunction:
Def ObjectInspector:[com_sum, _col0, _col1, _col2]
SerDe:org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
Evaluator Output ObjectInspector:[com_sum, _col0, _col1, _col2]
SelectList:_col0, _col1, _col2, _col3

1.TS :
RowResolver::
columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
Aliases:[
t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
]
columns mapped to expressions:[
]

2.RS :
RowResolver::
columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
Aliases:[
t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
]
columns mapped to expressions:[
]

3.EX :
RowResolver::
columns:[t_enc._col0, t_enc._col1, t_enc._col2]
Aliases:[
t_enc:[mid -> _col0, tdate -> _col1, tamt -> _col2
]
columns mapped to expressions:[
]

4.PTF :
RowResolver::
columns:[._col0, t_enc._col1, t_enc._col2, t_enc._col3]
Aliases:[
:[(tok_function sum (tok_table_or_col tamt) (tok_windowspec 
(tok_windowrange (preceding unbounded) current))) -> _col0
t_enc:[mid -> _col1, tdate -> _col2, tamt -> _col3
]
columns mapped to expressions:[
(TOK_FUNCTION sum (TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC 
(TOK_WINDOWRANGE (preceding unbounded) current))) -> (TOK_FUNCTION sum 
(TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC (TOK_WINDOWRANGE (preceding unbounded) 
current)))
]

5.SEL :
RowResolver::
columns:[._col0, ._col1, ._col2, ._col3]
Aliases:[
:[mid -> _col0, tdate -> _col1, tamt -> _col2, com_sum -> _col3
]
columns mapped to expressions:[
]

6.FS :
RowResolver::
columns:[._col0, ._col1, ._col2, ._col3]
Aliases:[
:[mid -> _col0, tdate -> _col1, tamt -> _col2, com_sum -> _col3
]
columns mapped to expressions:[
]

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
 

Re: Function definition in hive

2013-02-22 Thread Alexander Pivovarov
https://cwiki.apache.org/Hive/hiveplugins.html

Creating Custom UDFs

First, you need to create a new class that extends UDF, with one or more
methods named evaluate.

package com.example.hive.udf;
import org.apache.hadoop.hive.ql.exec.UDF;import org.apache.hadoop.io.Text;
public final class Lower extends UDF {
  public Text evaluate(final Text s) {
if (s == null) { return null; }
return new Text(s.toString().toLowerCase());
  }
}

(Note that there's already a built-in function for this, it's just an easy
example).

After compiling your code to a jar, you need to add this to the hive
classpath. See the section below on deploying jars.

Once hive is started up with your jars in the classpath, the final step is
to register your function:

create temporary function my_lower as 'com.example.hive.udf.Lower';

Now you can start using it:

hive> select my_lower(title), sum(freq) from titles group by my_lower(title);

...

Ended Job = job_200906231019_0006
OK
cmo 13.0
vp  7.0

For a more involved example, see this
page
.
Deploying jars for User Defined Functions and User Defined SerDes

In order to start using your UDF, you first need to add the code to the
classpath:


hive> add jar my_jar.jar;
Added my_jar.jar to class path

By default, it will look in the current directory. You can also specify a
full path:

hive> add jar /tmp/my_jar.jar;
Added /tmp/my_jar.jar to class path

Your jar will then be on the classpath for all jobs initiated from that
session. To see which jars have been added to the classpath you can use:

hive> list jars;
my_jar.jar



On Fri, Feb 22, 2013 at 5:09 PM, Yu PENG  wrote:

> Hi,
>
> I am a newbie for Hive. I was assigned a job to do a lot of queries with
> similar structure. I just want to ask if there is a way to define functions
> like other programming languages so that I can call the function with
> different parameters. This will be really helpful. Does anyone know that?
>
> Thanks,
> Yu Peng
>
>
>


Function definition in hive

2013-02-22 Thread Yu PENG
Hi,

I am a newbie for Hive. I was assigned a job to do a lot of queries with
similar structure. I just want to ask if there is a way to define functions
like other programming languages so that I can call the function with
different parameters. This will be really helpful. Does anyone know that?

Thanks,
Yu Peng


Re: [SQLWindowing] Windowing function output path syntax (#26)

2013-02-22 Thread neelesh gadhia
Thanks Harish for your quick response.

I tried it with the new syntax using one of the example in 
ptf_general_queries.q and get the following error. Am I still doing something 
wrong here?

hive> select mid, tdate, tamt,sum(tamt) as com_sum over (rows between unbounded 
preceding and current row)
    > from t_enc
    > distribute by mid 
    > sort by mid, tdate;

1.TS :
RowResolver::
    columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
    Aliases:[
        t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
    ]
    columns mapped to expressions:[
    ]

2.RS :
RowResolver::
    columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
    Aliases:[
        t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
    ]
    columns mapped to expressions:[
    ]

3.EX :
RowResolver::
    columns:[t_enc._col0, t_enc._col1, t_enc._col2]
    Aliases:[
        t_enc:[mid -> _col0, tdate -> _col1, tamt -> _col2
    ]
    columns mapped to expressions:[
    ]

4.PTF :
RowResolver::
    columns:[._col0, t_enc._col1, t_enc._col2, t_enc._col3]
    Aliases:[
        :[(tok_function sum (tok_table_or_col tamt) (tok_windowspec 
(tok_windowrange (preceding unbounded) current))) -> _col0
        t_enc:[mid -> _col1, tdate -> _col2, tamt -> _col3
    ]
    columns mapped to expressions:[
        (TOK_FUNCTION sum (TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC 
(TOK_WINDOWRANGE (preceding unbounded) current))) -> (TOK_FUNCTION sum 
(TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC (TOK_WINDOWRANGE (preceding unbounded) 
current)))
    ]

insclause-0:
Def ObjectInspector:[_col0, _col1, _col2]
SerDe:org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
windowingtablefunction:
Def ObjectInspector:[com_sum, _col0, _col1, _col2]
SerDe:org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
Evaluator Output ObjectInspector:[com_sum, _col0, _col1, _col2]
SelectList:_col0, _col1, _col2, _col3

1.TS :
RowResolver::
    columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
    Aliases:[
        t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
    ]
    columns mapped to expressions:[
    ]

2.RS :
RowResolver::
    columns:[t_enc.mid, t_enc.tdate, t_enc.tamt, 
t_enc.BLOCK__OFFSET__INSIDE__FILE, t_enc.INPUT__FILE__NAME]
    Aliases:[
        t_enc:[mid -> mid, tdate -> tdate, tamt -> tamt, 
block__offset__inside__file -> BLOCK__OFFSET__INSIDE__FILE, input__file__name 
-> INPUT__FILE__NAME
    ]
    columns mapped to expressions:[
    ]

3.EX :
RowResolver::
    columns:[t_enc._col0, t_enc._col1, t_enc._col2]
    Aliases:[
        t_enc:[mid -> _col0, tdate -> _col1, tamt -> _col2
    ]
    columns mapped to expressions:[
    ]

4.PTF :
RowResolver::
    columns:[._col0, t_enc._col1, t_enc._col2, t_enc._col3]
    Aliases:[
        :[(tok_function sum (tok_table_or_col tamt) (tok_windowspec 
(tok_windowrange (preceding unbounded) current))) -> _col0
        t_enc:[mid -> _col1, tdate -> _col2, tamt -> _col3
    ]
    columns mapped to expressions:[
        (TOK_FUNCTION sum (TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC 
(TOK_WINDOWRANGE (preceding unbounded) current))) -> (TOK_FUNCTION sum 
(TOK_TABLE_OR_COL tamt) (TOK_WINDOWSPEC (TOK_WINDOWRANGE (preceding unbounded) 
current)))
    ]

5.SEL :
RowResolver::
    columns:[._col0, ._col1, ._col2, ._col3]
    Aliases:[
        :[mid -> _col0, tdate -> _col1, tamt -> _col2, com_sum -> _col3
    ]
    columns mapped to expressions:[
    ]

6.FS :
RowResolver::
    columns:[._col0, ._col1, ._col2, ._col3]
    Aliases:[
        :[mid -> _col0, tdate -> _col1, tamt -> _col2, com_sum -> _col3
    ]
    columns mapped to expressions:[
    ]

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=
In order to set a constant number of reducers:
  set mapred.reduce.tasks=
Starting Job = job_201302221435_0001, Tracking URL = 
http://localhost:50030/jobdetails.jsp?jobid=job_201302221435_0001
Kill Command = /usr/local/Cellar/hadoop/1.1.1/libexec/bin/../bin/hadoop job  
-kill job_201302221435_0001
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2013-02-22 14:52:43,467 Stage-1 map = 0%,  reduce = 0%
2013-02-22 14:53:05,568 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_201302221435_0001 with errors
Error during job, obtaining debugging information...
Job Tracking URL: 
http://localhost:50030/job

Re: [SQLWindowing] Windowing function output path syntax (#26)

2013-02-22 Thread Butani, Harish
Hi Neelesh,

You are using the syntax from the SQLWindowing project; which was done on top 
of HQL.
Now the syntax is standard SQL; see ptf_general_queries.q for examples. Your 
e.g can be expressed as:

select sum(tamt) over (partition by mid order by mid rows between unbounded 
preceding and current row) as cum_amt,
mid,tdate,tamt,cum_amt
>From t_enc

Regards,
Harish.
From: neelesh gadhia mailto:ngad...@yahoo.com>>
Reply-To: "user@hive.apache.org" 
mailto:user@hive.apache.org>>, neelesh gadhia 
mailto:ngad...@yahoo.com>>
Date: Friday, February 22, 2013 2:05 PM
To: "hashut...@apache.org" 
mailto:hashut...@apache.org>>, 
"user@hive.apache.org" 
mailto:user@hive.apache.org>>
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)

Hello,

I downloaded the source code from ptf-windowing branch and build the dist based 
on that.

Now when I try to make use of windowing function using the following ql, I get 
an error as shown below. Am I missing anything here? Please advise.


from 
partition by mid
order by mid
with
sum(tamt) over rows between
unbounded preceding and current row as cum_amt
select mid,tdate,tamt,cum_amt;


hive> from 
> partition by mid
> order by mid
> with
> sum(tamt) over rows between
> unbounded preceding and current row as cum_amt
> select mid,tdate,tamt,cum_amt;
NoViableAltException(258@[])
at 
org.apache.hadoop.hive.ql.parse.HiveParser.joinSource(HiveParser.java:32612)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.fromClause(HiveParser.java:32498)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatement(HiveParser.java:26832)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:26716)
at 
org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:981)
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:687)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:444)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:416)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:898)
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:413)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:756)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
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:156)
FAILED: ParseException line 1:5 cannot recognize input near '<' 'select' 'mid' 
in join source








From: hbutani mailto:notificati...@github.com>>
To: hbutani/SQLWindowing 
mailto:sqlwindow...@noreply.github.com>>
Cc: ngadhia mailto:ngad...@yahoo.com>>
Sent: Sunday, February 17, 2013 4:50 PM
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)

Hi,
We don't actively support this library anymore. This functionality is in the 
process of being folded into hive. You can see the latest code at 
https://github.com/apache/hive, the ptf-windowing branch. Also checkout the 
Jiras in Hive Jira: look for Jiras whose Component is PTF-Windowing.
regards,
Harish.
—
Reply to this email directly or view it on 
GitHub.





Re: [SQLWindowing] Windowing function output path syntax (#26)

2013-02-22 Thread neelesh gadhia
Hello,

I downloaded the source code from ptf-windowing branch and build the dist based 
on that. 


Now when I try to make use of windowing function using the following ql, I get 
an error as shown below. Am I missing anything here? Please advise.



from 
partition by mid
order by mid
with
sum(tamt) over rows between
unbounded preceding and current row as cum_amt
select mid,tdate,tamt,cum_amt;


hive> from     
    > partition by mid
    > order by mid
    > with
    > sum(tamt) over rows between
    > unbounded preceding and current row as cum_amt
    > select mid,tdate,tamt,cum_amt;
NoViableAltException(258@[])
    at 
org.apache.hadoop.hive.ql.parse.HiveParser.joinSource(HiveParser.java:32612)
    at 
org.apache.hadoop.hive.ql.parse.HiveParser.fromClause(HiveParser.java:32498)
    at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatement(HiveParser.java:26832)
    at 
org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:26716)
    at 
org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:981)
    at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:687)
    at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:444)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:416)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:898)
    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:413)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:756)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
    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:156)
FAILED: ParseException line 1:5 cannot recognize input near '<' 'select' 'mid' 
in join source









 From: hbutani 
To: hbutani/SQLWindowing  
Cc: ngadhia  
Sent: Sunday, February 17, 2013 4:50 PM
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)
 

Hi,
We don't actively support this library anymore. This functionality is in the 
process of being folded into hive. You can see the latest code at 
https://github.com/apache/hive, the ptf-windowing branch. Also checkout the 
Jiras in Hive Jira: look for Jiras whose Component is PTF-Windowing.
regards,
Harish.
—
Reply to this email directly or view it on GitHub.  

Re: unbalanced transaction calls

2013-02-22 Thread Vinod Kumar Vavilapalli
If we can enable access logs on the meta store and figure out the last query 
before the one that failed, it should be easy to track it.

I did find a couple of unbalanced calls in code. Will look more carefully and 
file a ticket.

Thanks,
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/

On Feb 22, 2013, at 4:45 AM, Hemanth Yamijala wrote:

> Hi,
> 
> This error is coming when we are running a CREATE TABLE script. Where are you 
> suggesting we make these changes ?
> 
> 
> On Fri, Feb 22, 2013 at 1:31 PM, Navis류승우  wrote:
> Could you try to make transaction related methods synchronized?
> 
> It's openTransaction/commitTransaction/isActiveTransaction/rollbackTransaction
> on ObjectStore.java
> 
> 2013/2/22 Hemanth Yamijala :
> > Hi,
> >
> > We are running into the same problem as well. Is there any clue what could
> > be wrong ?
> >
> > Thanks
> > hemanth
> >
> >
> > On Wed, Feb 6, 2013 at 1:51 AM, James Warren
> >  wrote:
> >>
> >> As part of our daily workflow, we're running a few hundred hive
> >> queries that are coordinated through oozie.  Recently we're
> >> encountering issues where on average a job or two fails - and never
> >> the same query.  The observed error is:
> >>
> >> FAILED: Error in metadata: java.lang.RuntimeException:
> >> commitTransaction was called but openTransactionCalls = 0. This
> >> probably indicates that there are unbalanced calls to
> >> openTransaction/commitTransaction
> >>
> >> which I've seen was referred to in HIVE-1760 but patched in 0.7.
> >>
> >> We're running Hive 0.9 (from CDH 4.1 - will redirect to the Cloudera
> >> lists if that is a more appropriate form) - any ideas / suggestions
> >> where I should start looking?
> >>
> >> cheers,
> >> -James
> >
> >
> 



Re: Security for Hive

2013-02-22 Thread bejoy_ks
Hi Sachin

Currently there is no such admin user concept in hive.

Regards 
Bejoy KS

Sent from remote device, Please excuse typos

-Original Message-
From: Sachin Sudarshana 
Date: Fri, 22 Feb 2013 16:40:49 
To: 
Reply-To: user@hive.apache.org
Subject: Re: Security for Hive

Hi,
I have read about roles, user privileges, group privileges etc.
But these roles can be created by any user for any database/table. I would
like to know if there is a specific 'administrator' for hive who can log on
with his credentials and is the only one entitled to create roles, grant
privileges etc.

Thank you.

On Fri, Feb 22, 2013 at 4:19 PM, Jagat Singh  wrote:

> You might want to read this
>
> https://cwiki.apache.org/Hive/languagemanual-auth.html
>
>
>
>
> On Fri, Feb 22, 2013 at 9:44 PM, Sachin Sudarshana <
> sachin.sudarsh...@gmail.com> wrote:
>
>> Hi,
>>
>> I have just started learning about hive.
>> I have configured Hive to use mysql as the metastore instead of derby.
>> If I wish to use GRANT and REVOKE commands, i can use it with any user. A
>> user can issue GRANT or REVOKE commands to any other users' table since
>> both the users' tables are present in the same warehouse.
>>
>> Isn't there a concept of superuser/admin in hive who alone has the
>> authority to issue these commands ?
>>
>> Any answer is greatly appreciated!
>>
>> --
>> Thanks and Regards,
>> Sachin Sudarshana
>>
>
>


-- 
Thanks and Regards,
Sachin Sudarshana



Re: unbalanced transaction calls

2013-02-22 Thread Hemanth Yamijala
Hi,

This error is coming when we are running a CREATE TABLE script. Where are
you suggesting we make these changes ?


On Fri, Feb 22, 2013 at 1:31 PM, Navis류승우  wrote:

> Could you try to make transaction related methods synchronized?
>
> It's
> openTransaction/commitTransaction/isActiveTransaction/rollbackTransaction
> on ObjectStore.java
>
> 2013/2/22 Hemanth Yamijala :
> > Hi,
> >
> > We are running into the same problem as well. Is there any clue what
> could
> > be wrong ?
> >
> > Thanks
> > hemanth
> >
> >
> > On Wed, Feb 6, 2013 at 1:51 AM, James Warren
> >  wrote:
> >>
> >> As part of our daily workflow, we're running a few hundred hive
> >> queries that are coordinated through oozie.  Recently we're
> >> encountering issues where on average a job or two fails - and never
> >> the same query.  The observed error is:
> >>
> >> FAILED: Error in metadata: java.lang.RuntimeException:
> >> commitTransaction was called but openTransactionCalls = 0. This
> >> probably indicates that there are unbalanced calls to
> >> openTransaction/commitTransaction
> >>
> >> which I've seen was referred to in HIVE-1760 but patched in 0.7.
> >>
> >> We're running Hive 0.9 (from CDH 4.1 - will redirect to the Cloudera
> >> lists if that is a more appropriate form) - any ideas / suggestions
> >> where I should start looking?
> >>
> >> cheers,
> >> -James
> >
> >
>


Re: Security for Hive

2013-02-22 Thread Sachin Sudarshana
Hi,
I have read about roles, user privileges, group privileges etc.
But these roles can be created by any user for any database/table. I would
like to know if there is a specific 'administrator' for hive who can log on
with his credentials and is the only one entitled to create roles, grant
privileges etc.

Thank you.

On Fri, Feb 22, 2013 at 4:19 PM, Jagat Singh  wrote:

> You might want to read this
>
> https://cwiki.apache.org/Hive/languagemanual-auth.html
>
>
>
>
> On Fri, Feb 22, 2013 at 9:44 PM, Sachin Sudarshana <
> sachin.sudarsh...@gmail.com> wrote:
>
>> Hi,
>>
>> I have just started learning about hive.
>> I have configured Hive to use mysql as the metastore instead of derby.
>> If I wish to use GRANT and REVOKE commands, i can use it with any user. A
>> user can issue GRANT or REVOKE commands to any other users' table since
>> both the users' tables are present in the same warehouse.
>>
>> Isn't there a concept of superuser/admin in hive who alone has the
>> authority to issue these commands ?
>>
>> Any answer is greatly appreciated!
>>
>> --
>> Thanks and Regards,
>> Sachin Sudarshana
>>
>
>


-- 
Thanks and Regards,
Sachin Sudarshana


Re: Security for Hive

2013-02-22 Thread Jagat Singh
You might want to read this

https://cwiki.apache.org/Hive/languagemanual-auth.html



On Fri, Feb 22, 2013 at 9:44 PM, Sachin Sudarshana <
sachin.sudarsh...@gmail.com> wrote:

> Hi,
>
> I have just started learning about hive.
> I have configured Hive to use mysql as the metastore instead of derby.
> If I wish to use GRANT and REVOKE commands, i can use it with any user. A
> user can issue GRANT or REVOKE commands to any other users' table since
> both the users' tables are present in the same warehouse.
>
> Isn't there a concept of superuser/admin in hive who alone has the
> authority to issue these commands ?
>
> Any answer is greatly appreciated!
>
> --
> Thanks and Regards,
> Sachin Sudarshana
>


Re: unbalanced transaction calls

2013-02-22 Thread Navis류승우
Could you try to make transaction related methods synchronized?

It's openTransaction/commitTransaction/isActiveTransaction/rollbackTransaction
on ObjectStore.java

2013/2/22 Hemanth Yamijala :
> Hi,
>
> We are running into the same problem as well. Is there any clue what could
> be wrong ?
>
> Thanks
> hemanth
>
>
> On Wed, Feb 6, 2013 at 1:51 AM, James Warren
>  wrote:
>>
>> As part of our daily workflow, we're running a few hundred hive
>> queries that are coordinated through oozie.  Recently we're
>> encountering issues where on average a job or two fails - and never
>> the same query.  The observed error is:
>>
>> FAILED: Error in metadata: java.lang.RuntimeException:
>> commitTransaction was called but openTransactionCalls = 0. This
>> probably indicates that there are unbalanced calls to
>> openTransaction/commitTransaction
>>
>> which I've seen was referred to in HIVE-1760 but patched in 0.7.
>>
>> We're running Hive 0.9 (from CDH 4.1 - will redirect to the Cloudera
>> lists if that is a more appropriate form) - any ideas / suggestions
>> where I should start looking?
>>
>> cheers,
>> -James
>
>