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 34d1404ae9 apply spotless
34d1404ae9 is described below

commit 34d1404ae93cca0fddede101c745b6b0f7907b86
Author: Tian Jiang <[email protected]>
AuthorDate: Wed May 17 10:15:08 2023 +0800

    apply spotless
---
 .../planner/plan/node/write/InsertTabletNode.java  | 63 ++++++----------------
 .../scheduler/FragmentInstanceDispatcherImpl.java  |  3 +-
 2 files changed, 19 insertions(+), 47 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertTabletNode.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertTabletNode.java
index af8909113b..5560affafa 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertTabletNode.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/plan/node/write/InsertTabletNode.java
@@ -160,8 +160,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
   }
 
   @Override
-  public void addChild(PlanNode child) {
-  }
+  public void addChild(PlanNode child) {}
 
   @Override
   public PlanNode clone() {
@@ -240,8 +239,8 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
             .getDataRegionReplicaSetForWriting(devicePath.getFullPath(), 
timePartitionSlots);
 
     // collect redirectInfo
-    TRegionReplicaSet tRegionReplicaSet = dataRegionReplicaSets
-        .get(dataRegionReplicaSets.size() - 1);
+    TRegionReplicaSet tRegionReplicaSet =
+        dataRegionReplicaSets.get(dataRegionReplicaSets.size() - 1);
     int preferredLocation =
         tRegionReplicaSet.isSetPreferredLocation() ? 
tRegionReplicaSet.preferredLocation : 0;
     analysis.addEndPointToRedirectNodeList(
@@ -448,9 +447,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     ReadWriteIOUtils.write((byte) (isAligned ? 1 : 0), stream);
   }
 
-  /**
-   * Serialize measurements or measurement schemas, ignoring failed time series
-   */
+  /** Serialize measurements or measurement schemas, ignoring failed time 
series */
   private void writeMeasurementsOrSchemas(ByteBuffer buffer) {
     ReadWriteIOUtils.write(measurements.length - getFailedMeasurementNumber(), 
buffer);
     ReadWriteIOUtils.write((byte) (measurementSchemas != null ? 1 : 0), 
buffer);
@@ -469,9 +466,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize measurements or measurement schemas, ignoring failed time series
-   */
+  /** Serialize measurements or measurement schemas, ignoring failed time 
series */
   private void writeMeasurementsOrSchemas(DataOutputStream stream) throws 
IOException {
     stream.writeInt(measurements.length - getFailedMeasurementNumber());
     stream.write((byte) (measurementSchemas != null ? 1 : 0));
@@ -490,9 +485,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize data types, ignoring failed time series
-   */
+  /** Serialize data types, ignoring failed time series */
   private void writeDataTypes(ByteBuffer buffer) {
     for (int i = 0; i < dataTypes.length; i++) {
       // ignore failed partial insert
@@ -503,9 +496,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize data types, ignoring failed time series
-   */
+  /** Serialize data types, ignoring failed time series */
   private void writeDataTypes(DataOutputStream stream) throws IOException {
     for (int i = 0; i < dataTypes.length; i++) {
       // ignore failed partial insert
@@ -530,9 +521,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize bitmaps, ignoring failed time series
-   */
+  /** Serialize bitmaps, ignoring failed time series */
   private void writeBitMaps(ByteBuffer buffer) {
     ReadWriteIOUtils.write(BytesUtils.boolToByte(bitMaps != null), buffer);
     if (bitMaps != null) {
@@ -552,9 +541,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize bitmaps, ignoring failed time series
-   */
+  /** Serialize bitmaps, ignoring failed time series */
   private void writeBitMaps(DataOutputStream stream) throws IOException {
     ReadWriteIOUtils.write(BytesUtils.boolToByte(bitMaps != null), stream);
     if (bitMaps != null) {
@@ -574,9 +561,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize values, ignoring failed time series
-   */
+  /** Serialize values, ignoring failed time series */
   private void writeValues(ByteBuffer buffer) {
     for (int i = 0; i < columns.length; i++) {
       // ignore failed partial insert
@@ -587,9 +572,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize values, ignoring failed time series
-   */
+  /** Serialize values, ignoring failed time series */
   private void writeValues(DataOutputStream stream) throws IOException {
     for (int i = 0; i < columns.length; i++) {
       // ignore failed partial insert
@@ -737,17 +720,13 @@ public class InsertTabletNode extends InsertNode 
implements WALEntryValue, ISche
 
   // region serialize & deserialize methods for WAL
 
-  /**
-   * Serialized size for wal
-   */
+  /** Serialized size for wal */
   @Override
   public int serializedSize() {
     return serializedSize(0, rowCount);
   }
 
-  /**
-   * Serialized size for wal
-   */
+  /** Serialized size for wal */
   public int serializedSize(int start, int end) {
     return Short.BYTES + subSerializeSize(start, end);
   }
@@ -844,9 +823,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     buffer.put((byte) (isAligned ? 1 : 0));
   }
 
-  /**
-   * Serialize measurement schemas, ignoring failed time series
-   */
+  /** Serialize measurement schemas, ignoring failed time series */
   private void writeMeasurementSchemas(IWALByteBufferView buffer) {
     buffer.putInt(measurements.length - getFailedMeasurementNumber());
     serializeMeasurementSchemasToWAL(buffer);
@@ -859,9 +836,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize bitmaps, ignoring failed time series
-   */
+  /** Serialize bitmaps, ignoring failed time series */
   private void writeBitMaps(IWALByteBufferView buffer, int start, int end) {
     buffer.put(BytesUtils.boolToByte(bitMaps != null));
     if (bitMaps != null) {
@@ -884,9 +859,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Serialize values, ignoring failed time series
-   */
+  /** Serialize values, ignoring failed time series */
   private void writeValues(IWALByteBufferView buffer, int start, int end) {
     for (int i = 0; i < columns.length; i++) {
       // ignore failed partial insert
@@ -942,9 +915,7 @@ public class InsertTabletNode extends InsertNode implements 
WALEntryValue, ISche
     }
   }
 
-  /**
-   * Deserialize from wal
-   */
+  /** Deserialize from wal */
   public static InsertTabletNode deserializeFromWAL(DataInputStream stream) 
throws IOException {
     // we do not store plan node id in wal entry
     InsertTabletNode insertNode = new InsertTabletNode(new PlanNodeId(""));
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 8a3b86176e..bf2e095720 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
@@ -372,7 +372,8 @@ public class FragmentInstanceDispatcherImpl implements 
IFragInstanceDispatcher {
 
         TSStatus status = writeResult.getStatus();
         if (!writeResult.isAccepted()) {
-          if (status == null || status.getCode() != 
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
+          if (status == null
+              || status.getCode() != 
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
             logger.warn(
                 "write locally failed. TSStatus: {}, message: {}",
                 status,

Reply via email to