[
https://issues.apache.org/jira/browse/DRILL-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694110#comment-14694110
]
Vince Gonzalez commented on DRILL-3090:
---------------------------------------
I saw this issue today on a three Drillbit cluster. Version 1.1.0.
{code}
0: jdbc:drill:> !script t
Saving command script to "/home/mapr/t". Enter "script" with no arguments to
stop it.
0: jdbc:drill:> select count(1) from cp.`employee.json`;
+---------+
| EXPR$0 |
+---------+
| 1155 |
+---------+
1 row selected (0.127 seconds)
0: jdbc:drill:> !script
Script closed. Enter "run /home/mapr/t" to replay it.
0: jdbc:drill:> !run /home/mapr/t
1/2 select count(1) from cp.`employee.json`;
+---------+
| EXPR$0 |
+---------+
| 1155 |
+---------+
1 row selected (0.146 seconds)
2/2 !script
Usage: script <filename>
Aborting command set because "force" is false and command failed: "!script"
{code}
> sqlline : save SQL to script file and replay from script, results in error
> --------------------------------------------------------------------------
>
> Key: DRILL-3090
> URL: https://issues.apache.org/jira/browse/DRILL-3090
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - CLI
> Affects Versions: 1.0.0
> Environment: ffbb9c7adc6360744bee186e1f69d47dc743f73e
> Reporter: Khurram Faraaz
> Assignee: Daniel Barclay (Drill)
> Priority: Minor
> Fix For: 1.4.0
>
>
> Save a SQL query to a script file and replay the SQL from the script file
> using !run, on sqlline prompt throws error. We should not see the error when
> we replay the SQL from the script file.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> !script file3
> Saving command script to "/opt/mapr/drill/drill-1.0.0/bin/file3". Enter
> "script" with no arguments to stop it.
> 0: jdbc:drill:schema=dfs.tmp> select * from sys.drillbits;
> +------------+------------+--------------+------------+------------+
> | hostname | user_port | control_port | data_port | current |
> +------------+------------+--------------+------------+------------+
> | centos-04.qa.lab | 31010 | 31011 | 31012 | false |
> | centos-02.qa.lab | 31010 | 31011 | 31012 | false |
> | centos-01.qa.lab | 31010 | 31011 | 31012 | false |
> | centos-03.qa.lab | 31010 | 31011 | 31012 | true |
> +------------+------------+--------------+------------+------------+
> 4 rows selected (0.176 seconds)
> 0: jdbc:drill:schema=dfs.tmp> !script
> Script closed. Enter "run /opt/mapr/drill/drill-1.0.0/bin/file3" to replay it.
> 0: jdbc:drill:schema=dfs.tmp> !run /opt/mapr/drill/drill-1.0.0/bin/file3
> 1/2 select * from sys.drillbits;
> +------------+------------+--------------+------------+------------+
> | hostname | user_port | control_port | data_port | current |
> +------------+------------+--------------+------------+------------+
> | centos-04 | 31010 | 31011 | 31012 | false |
> | centos-02 | 31010 | 31011 | 31012 | false |
> | centos-01 | 31010 | 31011 | 31012 | false |
> | centos-03 | 31010 | 31011 | 31012 | true |
> +------------+------------+--------------+------------+------------+
> 4 rows selected (0.178 seconds)
> 2/2 !script
> Usage: script <filename>
> Aborting command set because "force" is false and command failed: "!script"
> {code}
> I looked at the contents of file3 under /opt/mapr/drill/drill-1.0.0/bin
> There seems to be an additional/extra "!script" in the file.
> {code}
> [root@centos-01 bin]# cat file3
> select * from sys.drillbits;
> !script
> [root@centos-01 bin]#
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)