[
https://issues.apache.org/jira/browse/FLINK-9361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16474339#comment-16474339
]
ASF GitHub Bot commented on FLINK-9361:
---------------------------------------
GitHub user twalthr opened a pull request:
https://github.com/apache/flink/pull/6012
[FLINK-9361] [sql-client] Fix refresh interval in changelog mode
## What is the purpose of the change
This PR removes a InterruptedIOException when changing the refresh interval
of the SQL Client CLI in changelog mode.
## Brief change log
- Do not use interrupts but a `wait`/`notify` pattern.
- Deselected row on refresh in changelog mode.
## Verifying this change
Manually verified.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/twalthr/flink FLINK-9361
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6012.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6012
----
commit 7e975502ef9b89a47b019315d7019fd110af68db
Author: Timo Walther <twalthr@...>
Date: 2018-05-14T14:48:12Z
[FLINK-9361] [sql-client] Fix refresh interval in changelog mode
----
> Changing refresh interval in changelog mode leads to exception
> --------------------------------------------------------------
>
> Key: FLINK-9361
> URL: https://issues.apache.org/jira/browse/FLINK-9361
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Timo Walther
> Priority: Major
>
> Changing the refresh interval in changelog mode leads to the following
> exception in the SQL CLI Client:
> {code}
> Exception in thread "Thread-5" java.io.IOError:
> java.io.InterruptedIOException: Command interrupted
> at
> org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:62)
> at org.jline.terminal.Terminal.getWidth(Terminal.java:103)
> at
> org.apache.flink.table.client.cli.CliClient.isPlainTerminal(CliClient.java:131)
> at
> org.apache.flink.table.client.cli.CliClient.clearTerminal(CliClient.java:119)
> at org.apache.flink.table.client.cli.CliView.display(CliView.java:191)
> at
> org.apache.flink.table.client.cli.CliChangelogResultView.display(CliChangelogResultView.java:95)
> at
> org.apache.flink.table.client.cli.CliResultView$RefreshThread.run(CliResultView.java:250)
> Caused by: java.io.InterruptedIOException: Command interrupted
> at org.jline.utils.ExecHelper.exec(ExecHelper.java:46)
> at org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:175)
> at org.jline.terminal.impl.ExecPty.getSize(ExecPty.java:169)
> at
> org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
> ... 6 more
> Caused by: java.lang.InterruptedException
> at java.lang.Object.wait(Native Method)
> at java.lang.Object.wait(Object.java:502)
> at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
> at org.jline.utils.ExecHelper.waitAndCapture(ExecHelper.java:66)
> at org.jline.utils.ExecHelper.exec(ExecHelper.java:36)
> ... 9 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)