return true;
}
private Runnable createLogRunnable(Statement statement) {
if (statement instanceof HiveStatement) {
final HiveStatement hiveStatement = (HiveStatement) statement;
Runnable runnable = new Runnable() {
@Override
public void run() {
while (hiveStatement.hasMoreLogs()) {
try {
// fetch the log periodically and output to beeline console
for (String log : hiveStatement.getQueryLog()) {
beeLine.info(log);
}
Thread.sleep(DEFAULT_QUERY_PROGRESS_INTERVAL);
} catch (SQLException e) {
beeLine.error(new SQLWarning(e));