private void makeSureNoDuplicatedMeasurementsInDevices() throws LoadAnalyzeException {
    for (final Map.Entry<IDeviceID, Set<MeasurementSchema>> entry :
        schemaCache.getDevice2TimeSeries().entrySet()) {
      final IDeviceID device = entry.getKey();
      final Map<String, MeasurementSchema> measurement2Schema = new HashMap<>();
      for (final MeasurementSchema timeseriesSchema : entry.getValue()) {
        final String measurement = timeseriesSchema.getMeasurementName();
        if (measurement2Schema.containsKey(measurement)) {
          throw new LoadAnalyzeException(
              String.format("Duplicated measurements %s in device %s.", measurement, device));
        }
        measurement2Schema.put(measurement, timeseriesSchema);
      }
    }
  }
This can only be invoked after all timeseries in the current tsfile have been processed.
Otherwise, the isAligned status may be wrong.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java