From 15f6438ab9ae332b70f226155c7da7d316b69950 Mon Sep 17 00:00:00 2001 From: Cheng Pan <379377944@qq.com> Date: Sun, 13 Jun 2021 22:39:27 +0800 Subject: [PATCH] [KYUUBI #691] Rename getQueryLog to fetchQueryLog ### _Why are the changes needed?_ Rename `ExecuteStatement#getQueryLog` to `ExecuteStatement#fetchQueryLog`, to suppress IDEA complaination **Accessor-like named method has Unit result type** and make it more readable. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes #691 from pan3793/readable. Closes #691 96c0c26 [Cheng Pan] Rename getQueryLog to fetchQueryLog Authored-by: Cheng Pan <379377944@qq.com> Signed-off-by: Kent Yao --- .../org/apache/kyuubi/operation/ExecuteStatement.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala index 7292a1353..798f5f047 100644 --- a/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala +++ b/kyuubi-main/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala @@ -84,7 +84,7 @@ class ExecuteStatement( var statusResp = client.GetOperationStatus(statusReq) var isComplete = false while (!isComplete) { - getQueryLog() + fetchQueryLog() verifyTStatus(statusResp.getStatus) val remoteState = statusResp.getOperationState info(s"Query[$statementId] in ${remoteState.name()}") @@ -118,10 +118,10 @@ class ExecuteStatement( } } // see if anymore log could be fetched - getQueryLog() + fetchQueryLog() } catch onError() - private def getQueryLog(): Unit = { + private def fetchQueryLog(): Unit = { getOperationLog.foreach { logger => try { val resp = client.FetchResults(fetchLogReq)