private void split(
      InsertTabletNode insertTabletNode,
      int loc,
      int endOffset,
      Map<Long, List<int[]>[]> splitInfo) {
    // before is first start point
    int before = loc;
    long beforeTime = insertTabletNode.getTimes()[before];
    // before time partition
    long beforeTimePartition = TimePartitionUtils.getTimePartitionId(beforeTime);
    // init flush time map
    initFlushTimeMap(beforeTimePartition);

    // if is sequence
    boolean isSequence = false;
    while (loc < endOffset) {
      long time = insertTabletNode.getTimes()[loc];
      final long timePartitionId = TimePartitionUtils.getTimePartitionId(time);

      long lastFlushTime;
      // judge if we should insert sequence
      if (timePartitionId != beforeTimePartition) {
        initFlushTimeMap(timePartitionId);
        lastFlushTime = getLastFlushTime(timePartitionId, insertTabletNode.getDeviceID(loc));
        updateSplitInfo(splitInfo, beforeTimePartition, isSequence, new int[] {before, loc});
        before = loc;
        beforeTimePartition = timePartitionId;
        isSequence = time > lastFlushTime;
      } else if (!isSequence) {
        lastFlushTime = getLastFlushTime(timePartitionId, insertTabletNode.getDeviceID(loc));
        if (time > lastFlushTime) {
          // the same partition and switch to sequence data
          // insert previous range into unsequence
          updateSplitInfo(splitInfo, beforeTimePartition, false, new int[] {before, loc});
          before = loc;
          isSequence = true;
        }
      }
      // else: the same partition and isSequence not changed, just move the cursor forward
      loc++;
    }

    // do not forget last part
    if (before < loc) {
      updateSplitInfo(splitInfo, beforeTimePartition, isSequence, new int[] {before, loc});
    }
  }
insert one row of data.

@param insertRowNode one row of data
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java