You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Arjun KR (JIRA)" <ji...@apache.org> on 2017/08/02 06:14:00 UTC
[jira] [Commented] (DRILL-5700) nohup support for sqlline
[ https://issues.apache.org/jira/browse/DRILL-5700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16110374#comment-16110374 ]
Arjun KR commented on DRILL-5700:
---------------------------------
The issue seems to be related to JLine used with sqlline executed on background. Similar issue is reported with Hive beeline script and is fixed by adding jvm option '-Djline.terminal=jline.UnsupportedTerminal"'. This could be added in sqlline script as below.
{code:java}
if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then
export SQLLINE_JAVA_OPTS="$SQLLINE_JAVA_OPTS -Djline.terminal=jline.UnsupportedTerminal"
fi
SHELL_OPTS="$DRILL_SHELL_JAVA_OPTS $SQLLINE_JAVA_OPTS $DRILL_SHELL_LOG_OPTS $CLIENT_GC_OPTS"
CMD="$JAVA $SHELL_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver --maxWidth=10000"
{code}
> nohup support for sqlline
> --------------------------
>
> Key: DRILL-5700
> URL: https://issues.apache.org/jira/browse/DRILL-5700
> Project: Apache Drill
> Issue Type: Improvement
> Components: Client - CLI
> Reporter: Arjun KR
> Priority: Minor
>
> Sqlline script does support nohup mode for execution. On execution, it remains stopped until it is made fore ground.
> {code:java}
> [mapr@node1 ~]$ cat test.sql
> select * from sys.drillbits
> [mapr@node1 ~]$
> [mapr@node1 ~]$ nohup sqlline -u "jdbc:drill:" -n mapr -p mapr -f test.sql &
> [1] 24019
> [mapr@node1 ~]$ nohup: ignoring input and appending output to `nohup.out'
> [1]+ Stopped nohup sqlline -u "jdbc:drill:zk=node1:5181" -n mapr -p mapr -f test.sql
> [mapr@node1 ~]$
> [mapr@node1 ~]$ fg
> nohup sqlline -u "jdbc:drill:zk=node1:5181" -n mapr -p mapr -f test.sql
> [mapr@node1 ~]$
> [mapr@node1 ~]$ cat nohup.out
> 0: jdbc:drill:zk=node1:5181> Closing: org.apache.drill.jdbc.impl.DrillConnectionImpl
> output of ps: S
> 1/1 select * from sys.drillbits;
> +------------------+------------+---------------+------------+----------+----------+
> | hostname | user_port | control_port | data_port | current | version |
> +------------------+------------+---------------+------------+----------+----------+
> | node1 | 31010 | 31011 | 31012 | true | 1.10.0 |
> +------------------+------------+---------------+------------+----------+----------+
> 1 row selected (0.354 seconds)
> Closing: org.apache.drill.jdbc.impl.DrillConnectionImpl
> apache drill 1.10.0
> "drill baby drill"
> [mapr@node1 ~]$
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)