This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch native_raft
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/native_raft by this push:
new c9a6453f02 apply spotless
c9a6453f02 is described below
commit c9a6453f020df363810bd001cb8746734ba76e3e
Author: Tian Jiang <[email protected]>
AuthorDate: Tue May 16 10:39:18 2023 +0800
apply spotless
---
.../apache/iotdb/commons/partition/ExecutorType.java | 11 +++--------
.../apache/iotdb/commons/partition/StorageExecutor.java | 17 +++++++++--------
.../org/apache/iotdb/commons/utils/ThriftUtils.java | 7 +++----
.../db/mpp/plan/scheduler/AsyncPlanNodeSender.java | 3 ++-
.../plan/scheduler/FragmentInstanceDispatcherImpl.java | 12 +++++-------
5 files changed, 22 insertions(+), 28 deletions(-)
diff --git
a/node-commons/src/main/java/org/apache/iotdb/commons/partition/ExecutorType.java
b/node-commons/src/main/java/org/apache/iotdb/commons/partition/ExecutorType.java
index dafe6dfbc0..fd01bd2f3d 100644
---
a/node-commons/src/main/java/org/apache/iotdb/commons/partition/ExecutorType.java
+++
b/node-commons/src/main/java/org/apache/iotdb/commons/partition/ExecutorType.java
@@ -23,14 +23,10 @@ import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
-/**
- * The interface is used to indicate where to execute a FragmentInstance
- */
+/** The interface is used to indicate where to execute a FragmentInstance */
public interface ExecutorType {
- /**
- * Indicate if ExecutorType is StorageExecutor
- */
+ /** Indicate if ExecutorType is StorageExecutor */
boolean isStorageExecutor();
TDataNodeLocation getDataNodeLocation();
@@ -45,6 +41,5 @@ public interface ExecutorType {
*
* @param endPoint associated with the preferred location.
*/
- default void updatePreferredLocation(TEndPoint endPoint) {
- }
+ default void updatePreferredLocation(TEndPoint endPoint) {}
}
diff --git
a/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
b/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
index d6af675d5d..a0bf31cc4a 100644
---
a/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
+++
b/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
@@ -19,21 +19,20 @@
package org.apache.iotdb.commons.partition;
-import java.util.List;
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+import org.apache.iotdb.commons.utils.ThriftUtils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
+import java.util.List;
import java.util.Objects;
-import org.apache.iotdb.commons.utils.ThriftUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * StorageExecutor indicates execution of this query need data from
StorageEngine
- */
+/** StorageExecutor indicates execution of this query need data from
StorageEngine */
public class StorageExecutor implements ExecutorType {
private static final Logger logger =
LoggerFactory.getLogger(StorageExecutor.class);
@@ -95,7 +94,9 @@ public class StorageExecutor implements ExecutorType {
if (i < dataNodeLocations.size()) {
regionReplicaSet.setPreferredLocation(i);
- logger.info("Preferred location of {} has been set to {}",
regionReplicaSet,
+ logger.info(
+ "Preferred location of {} has been set to {}",
+ regionReplicaSet,
regionReplicaSet.getDataNodeLocations().get(i));
}
}
diff --git
a/node-commons/src/main/java/org/apache/iotdb/commons/utils/ThriftUtils.java
b/node-commons/src/main/java/org/apache/iotdb/commons/utils/ThriftUtils.java
index f65ace4ec4..b3cbfe3163 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/utils/ThriftUtils.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/utils/ThriftUtils.java
@@ -18,13 +18,12 @@
*/
package org.apache.iotdb.commons.utils;
-import java.util.Objects;
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-/**
- * Utils that extend thrift generated objects.
- */
+import java.util.Objects;
+
+/** Utils that extend thrift generated objects. */
public class ThriftUtils {
private ThriftUtils() {
// Empty constructor
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/AsyncPlanNodeSender.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/AsyncPlanNodeSender.java
index a858a25977..dd3ca95492 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/AsyncPlanNodeSender.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/AsyncPlanNodeSender.java
@@ -132,7 +132,8 @@ public class AsyncPlanNodeSender {
}
}
- if (status != null && status.getCode() ==
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
+ if (status != null
+ && status.getCode() ==
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
int instanceIndex = entry.getKey();
FragmentInstance fragmentInstance = instances.get(instanceIndex);
fragmentInstance.getExecutorType().updatePreferredLocation(status.getRedirectNode());
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
index d362d1fbfc..e6155735ad 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
@@ -28,8 +28,6 @@ import
org.apache.iotdb.commons.client.async.AsyncDataNodeInternalServiceClient;
import org.apache.iotdb.commons.client.exception.ClientManagerException;
import org.apache.iotdb.commons.client.sync.SyncDataNodeInternalServiceClient;
import org.apache.iotdb.commons.consensus.ConsensusGroupId;
-import org.apache.iotdb.commons.partition.QueryExecutor;
-import org.apache.iotdb.commons.partition.StorageExecutor;
import
org.apache.iotdb.commons.service.metric.enums.PerformanceOverviewMetrics;
import org.apache.iotdb.commons.utils.ThriftUtils;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
@@ -98,9 +96,10 @@ public class FragmentInstanceDispatcherImpl implements
IFragInstanceDispatcher {
this.writeOperationExecutor = writeOperationExecutor;
this.syncInternalServiceClientManager = syncInternalServiceClientManager;
this.asyncInternalServiceClientManager = asyncInternalServiceClientManager;
- this.localEndPoint = new TEndPoint(
- IoTDBDescriptor.getInstance().getConfig().getInternalAddress(),
- IoTDBDescriptor.getInstance().getConfig().getInternalPort());
+ this.localEndPoint =
+ new TEndPoint(
+ IoTDBDescriptor.getInstance().getConfig().getInternalAddress(),
+ IoTDBDescriptor.getInstance().getConfig().getInternalPort());
}
@Override
@@ -398,6 +397,5 @@ public class FragmentInstanceDispatcherImpl implements
IFragInstanceDispatcher {
}
@Override
- public void abort() {
- }
+ public void abort() {}
}