[jira] [Created] (HIVE-13696) Validate jobs submitted to fair-scheduler

2016-05-05 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13696:
-

 Summary: Validate jobs submitted to fair-scheduler
 Key: HIVE-13696
 URL: https://issues.apache.org/jira/browse/HIVE-13696
 Project: Hive
  Issue Type: Improvement
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert


Ensure that jobs are placed into the correct queue according to 
{{fair-scheduler.xml}}. Jobs should be placed into the correct queue, and users 
should not be able to submit jobs to queues they do not have access to.



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


[jira] [Created] (HIVE-13478) [Cleanup] Improve HookUtils performance

2016-04-11 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13478:
-

 Summary: [Cleanup] Improve HookUtils performance
 Key: HIVE-13478
 URL: https://issues.apache.org/jira/browse/HIVE-13478
 Project: Hive
  Issue Type: Improvement
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert
Priority: Minor


Minor cleanup. {{HookUtils.getHooks}} multiple times for every statement 
executed performing nearly identical work. Cache the results of the work to 
improve performance. 

Also introduce the {{@CacheableHook}} annotation which can be appended to hooks 
that don't need to be re-instantiated using expensive reflection (such as 
Sentry hooks that load configuration on initialization).



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


[jira] [Created] (HIVE-13387) Beeline fails silently from missing dependency

2016-03-30 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13387:
-

 Summary: Beeline fails silently from missing dependency
 Key: HIVE-13387
 URL: https://issues.apache.org/jira/browse/HIVE-13387
 Project: Hive
  Issue Type: Task
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert
Priority: Minor


Beeline fails to connect because {{HiveSqlException}} dependency is not on 
classpath:

{code}
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52)
at 
org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1077)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1116)
at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:762)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:841)
at 
org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:493)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:476)
Caused by: java.lang.NoClassDefFoundError: 
org/apache/hive/service/cli/HiveSQLException
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:131)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at 
org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:141)
at 
org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:205)
at org.apache.hive.beeline.Commands.connect(Commands.java:1393)
at org.apache.hive.beeline.Commands.connect(Commands.java:1314)
... 11 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.hive.service.cli.HiveSQLException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 19 more
{code}

This happens when trying to run beeline as a standalone java application:

{code}
sircodesalot@excalibur:~/Dev/Cloudera/hive/beeline$ mvn exec:java 
-Dexec.args='-u jdbc:hive2://localhost:1 sircodesalot' 
-Dexec.mainClass="org.apache.hive.beeline.BeeLine"
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building Hive Beeline 2.1.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ hive-beeline ---
Connecting to jdbc:hive2://localhost:1
ERROR StatusLogger No log4j2 configuration file found. Using default 
configuration: logging only errors to the console.
org/apache/hive/service/cli/HiveSQLException
Beeline version ??? by Apache Hive

// HERE: This will never connect because of ClassNotFoundException. 
0: jdbc:hive2://localhost:1 (closed)>
{code}



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


[jira] [Created] (HIVE-13385) [Cleanup] Streamline Beeline instantiation

2016-03-30 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13385:
-

 Summary: [Cleanup] Streamline Beeline instantiation
 Key: HIVE-13385
 URL: https://issues.apache.org/jira/browse/HIVE-13385
 Project: Hive
  Issue Type: Task
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert


Janitorial. Remove circular dependencies in {{BeelineCommandLineCompleter}}. 
Stream line code readability.



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


[jira] [Created] (HIVE-13311) MetaDataFormatUtils throws NPE when HiveDecimal.create is null

2016-03-20 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13311:
-

 Summary: MetaDataFormatUtils throws NPE when HiveDecimal.create is 
null
 Key: HIVE-13311
 URL: https://issues.apache.org/jira/browse/HIVE-13311
 Project: Hive
  Issue Type: Bug
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert


The {{MetadataFormatUtils.convertToString}} functions have guards to validate 
for when valid is null, however the 

{code}
  private static String convertToString(Decimal val) {
if (val == null) {
  return "";
}

return HiveDecimal.create(new BigInteger(val.getUnscaled()), 
val.getScale()).toString();
  }
{code}



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


[jira] [Created] (HIVE-13231) Show helpful error message on failure to create nested table in nested directory

2016-03-08 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-13231:
-

 Summary: Show helpful error message on failure to create nested 
table in nested directory
 Key: HIVE-13231
 URL: https://issues.apache.org/jira/browse/HIVE-13231
 Project: Hive
  Issue Type: Bug
  Components: Hive
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert
Priority: Minor


cannot store data in a directory whose parent doesn't exist, even though the 
target dir does have an existing ancestor on HDFS.

{code}
0: jdbc:hive2://10.17.81.192:1/default> create table test3 location 
'/user/hive/data/yshi/nonexisting/test3' as select * from sample_07;
Error: Error while processing statement: FAILED: Execution Error, return code 1 
from org.apache.hadoop.hive.ql.exec.MoveTask (state=08S01,code=1)
Error message:
2015-10-29 19:04:46,323 ERROR org.apache.hadoop.hive.ql.exec.Task: Failed with 
exception Unable to rename: 
hdfs://host-10-17-81-192.coe.cloudera.com:8020/user/hive/warehouse/.hive-staging_hive_2015-10-29_19-04-08_375_5385987873542863570-3/-ext-10001
 to: /user/hive/data/yshi/nonexisting/test3
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to rename: 
hdfs://host-10-17-81-192.coe.cloudera.com:8020/user/hive/warehouse/.hive-staging_hive_2015-10-29_19-04-08_375_5385987873542863570-3/-ext-10001
 to: /user/hive/data/yshi/nonexisting/test3
at org.apache.hadoop.hive.ql.exec.MoveTask.moveFile(MoveTask.java:101)
at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:209)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153)
at 
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1554)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1321)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1139)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:962)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:957)
at 
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:144)
at 
org.apache.hive.service.cli.operation.SQLOperation.access$000(SQLOperation.java:68)
at 
org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
at 
org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:502)
at 
org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:212)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}



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


[jira] [Created] (HIVE-12891) Hive fails when java.io.tmpdir is set to a relative location

2016-01-19 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-12891:
-

 Summary: Hive fails when java.io.tmpdir is set to a relative 
location
 Key: HIVE-12891
 URL: https://issues.apache.org/jira/browse/HIVE-12891
 Project: Hive
  Issue Type: Bug
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert


The function {{SessionState.createSessionDirs}} fails when trying to create 
directories where {{java.io.tmpdir}} is set to a relative location.

{code}
\[uber-SubtaskRunner] ERROR o.a.h.hive..ql.Driver - FAILED: 
IllegalArgumentException java.net.URISyntaxException: Relative path in absolute 
URI: file:./tmp///hive_2015_12_11_09-12-25_352_4325234652356-1
...
Minor variations:
\[uber-SubtaskRunner] ERROR o.a.h.hive..ql.Driver - FAILED: SemanticException 
Exception while processing Exception while writing out the local file 
o.a.h.hive.ql/parse.SemanticException: Exception while processing exception 
while writing out local file 
... 
caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: 
Relative path in absolute URI: 
file:./tmp///hive_2015_12_11_09-12-25_352_4325234652356-1 
at o.a.h.fs.Path.initialize (206) 
at o.a.h.fs.Path.(197)... 
at o.a.h.hive.ql.context.getScratchDir(267) 
{code}





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


[jira] [Created] (HIVE-12469) Bump Commons-Collections dependency from 3.2.1 to 3.2.2. to address vulnerability

2015-11-19 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-12469:
-

 Summary: Bump Commons-Collections dependency from 3.2.1 to 3.2.2. 
to address vulnerability
 Key: HIVE-12469
 URL: https://issues.apache.org/jira/browse/HIVE-12469
 Project: Hive
  Issue Type: Bug
  Components: Hive
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert
Priority: Blocker






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


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

2015-05-18 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-10738:
-

 Summary: 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] [Created] (HIVE-10656) Beeline set var=value not carrying over to queries

2015-05-08 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-10656:
-

 Summary: Beeline set var=value not carrying over to queries
 Key: HIVE-10656
 URL: https://issues.apache.org/jira/browse/HIVE-10656
 Project: Hive
  Issue Type: Bug
Reporter: Reuben Kuhnert
Priority: Minor


After performing a {{set name=value}} I would expect that the variable name 
would carry over to all locations within the session. It appears to work when 
querying the value via {{set;}}, but not when trying to do actual sql 
statements.

Example:

{code}
0: jdbc:hive2://localhost:1 set foo;
+--+--+
|   set|
+--+--+
| foo=bar  |
+--+--+
1 row selected (0.932 seconds)

0: jdbc:hive2://localhost:1 select * from ${foo};
Error: Error while compiling statement: FAILED: SemanticException [Error 
10001]: Line 1:14 Table not found 'bar' (state=42S02,code=10001)

0: jdbc:hive2://localhost:1 show tables;
++--+
|  tab_name  |
++--+
| my |
| purchases  |
++--+
2 rows selected (0.437 seconds)
0: jdbc:hive2://localhost:1 set foo=my;

No rows affected (0.017 seconds)
0: jdbc:hive2://localhost:1 set foo;
+-+--+
|   set   |
+-+--+
| foo=my  |
+-+--+
1 row selected (0.02 seconds)

0: jdbc:hive2://localhost:1 select * from ${foo};
select * from ${foo};
Error: Error while compiling statement: FAILED: SemanticException [Error 
10001]: Line 1:14 Table not found 'bar' (state=42S02,code=10001)
{code}



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


[jira] [Created] (HIVE-10597) Relative path doesn't work with CREATE TABLE LOCATION 'relative/path'

2015-05-04 Thread Reuben Kuhnert (JIRA)
Reuben Kuhnert created HIVE-10597:
-

 Summary: Relative path doesn't work with CREATE TABLE LOCATION 
'relative/path'
 Key: HIVE-10597
 URL: https://issues.apache.org/jira/browse/HIVE-10597
 Project: Hive
  Issue Type: Bug
Reporter: Reuben Kuhnert
Assignee: Reuben Kuhnert
Priority: Critical


{code}
0: jdbc:hive2://a2110.halxg.cloudera.com:1000 CREATE EXTERNAL TABLE IF NOT 
EXISTS mydb.employees3 like mydb.employees LOCATION 'data/stock';
Error: Error while processing statement: FAILED: Execution Error, return code 1 
from org.apache.hadoop.hive.ql.exec.DDLTask. 
MetaException(message:java.lang.NullPointerException) (state=08S01,code=1)

0: jdbc:hive2://a2110.halxg.cloudera.com:1000 CREATE EXTERNAL TABLE IF NOT 
EXISTS mydb.employees3 like mydb.employees LOCATION '/user/hive/data/stock';
No rows affected (0.369 seconds)
{code}



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