From 0cfc9e258b2edf3f0e358fb1019f78facbc78e02 Mon Sep 17 00:00:00 2001 From: Tomoyuki Morita Date: Wed, 13 Nov 2024 14:14:59 -0800 Subject: [PATCH] Reformat code Signed-off-by: Tomoyuki Morita --- .../org/opensearch/sql/spark/dispatcher/BatchQueryHandler.java | 3 ++- .../opensearch/sql/spark/leasemanager/DefaultLeaseManager.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/async-query-core/src/main/java/org/opensearch/sql/spark/dispatcher/BatchQueryHandler.java b/async-query-core/src/main/java/org/opensearch/sql/spark/dispatcher/BatchQueryHandler.java index 837b0500de..dbd6411998 100644 --- a/async-query-core/src/main/java/org/opensearch/sql/spark/dispatcher/BatchQueryHandler.java +++ b/async-query-core/src/main/java/org/opensearch/sql/spark/dispatcher/BatchQueryHandler.java @@ -77,7 +77,8 @@ public String cancelJob( } /** - * This method allows RefreshQueryHandler to override the job type when calling leaseManager.borrow. + * This method allows RefreshQueryHandler to override the job type when calling + * leaseManager.borrow. */ protected void borrow(String datasource) { leaseManager.borrow(new LeaseRequest(JobType.BATCH, datasource)); diff --git a/async-query/src/main/java/org/opensearch/sql/spark/leasemanager/DefaultLeaseManager.java b/async-query/src/main/java/org/opensearch/sql/spark/leasemanager/DefaultLeaseManager.java index 5d793aafd8..db8ca1ad2b 100644 --- a/async-query/src/main/java/org/opensearch/sql/spark/leasemanager/DefaultLeaseManager.java +++ b/async-query/src/main/java/org/opensearch/sql/spark/leasemanager/DefaultLeaseManager.java @@ -92,7 +92,8 @@ public String description() { @Override public boolean test(LeaseRequest leaseRequest) { - if (leaseRequest.getJobType() != JobType.REFRESH && leaseRequest.getJobType() != JobType.STREAMING) { + if (leaseRequest.getJobType() != JobType.REFRESH + && leaseRequest.getJobType() != JobType.STREAMING) { return true; } return activeRefreshJobCount(stateStore, ALL_DATASOURCE).get() < refreshJobLimit();