hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-11274) Support executing script file from hdfs in beeline
Date Fri, 17 Jul 2015 22:39:05 GMT

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

Xuefu Zhang edited comment on HIVE-11274 at 7/17/15 10:38 PM:
--------------------------------------------------------------

[~jeffzhang] does Ferdinand's comments make sense to you? I'm closing this one and feel free
to reopen if otherwise.


was (Author: xuefuz):
[~jeffzhang] doesn't Ferdinand's comments makes sense to you? I'm closing this one and feel
free to reopen if otherwise.

> Support executing script file from hdfs in beeline
> --------------------------------------------------
>
>                 Key: HIVE-11274
>                 URL: https://issues.apache.org/jira/browse/HIVE-11274
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Jeff Zhang
>            Assignee: Ferdinand Xu
>
> It is supported for cli to execute hive script on hdfs, it should be straightforward
to support it in beeline too.
> Beeline.java
> {code}
>   private int executeFile(String fileName) {
>     FileInputStream initStream = null;
>     try {
>       initStream = new FileInputStream(fileName);
>       return execute(getConsoleReader(initStream), true);
>     } catch (Throwable t) {
>       handleException(t);
>       return ERRNO_OTHER;
>     } finally {
>       IOUtils.closeStream(initStream);
>       consoleReader = null;
>       output("");   // dummy new line
>     }
>   }
> {code}



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

Mime
View raw message