Skip to content

Commit

Permalink
remove unused code in TsFileResource
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojialin committed Mar 30, 2020
1 parent cf5f441 commit 3286c98
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ public boolean isFileAlreadyExist(TsFileResource tsFileResource, String storageG
return processor != null && processor.isFileAlreadyExist(tsFileResource, partitionNum);
}

public long getTimePartitionInterval() {
public static long getTimePartitionInterval() {
return timePartitionInterval;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.engine.merge.manage.MergeContext;
import org.apache.iotdb.db.engine.merge.manage.MergeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,17 @@ private void doMerge() throws IOException, MetadataException {

Set<String> devices = MManager.getInstance().getDevices(storageGroupName);
Map<Path, MeasurementSchema> measurementSchemaMap = new HashMap<>();
List<Path> unmergedSeries = new ArrayList<>();
for (String device : devices) {
InternalMNode deviceNode = (InternalMNode) MManager.getInstance().getNodeByPath(device);
for (Entry<String, MNode> entry : deviceNode.getChildren().entrySet()) {
measurementSchemaMap.put(new Path(device, entry.getKey()), ((LeafMNode) entry.getValue()).getSchema());
Path path = new Path(device, entry.getKey());
measurementSchemaMap.put(path, ((LeafMNode) entry.getValue()).getSchema());
unmergedSeries.add(path);
}
}
resource.setMeasurementSchemaMap(measurementSchemaMap);

List<String> storageGroupPaths = MManager.getInstance().getAllTimeseriesName(storageGroupName + ".*");
List<Path> unmergedSeries = new ArrayList<>();
for (String path : storageGroupPaths) {
unmergedSeries.add(new Path(path));
}

mergeLogger.logMergeStart();

MergeMultiChunkTask mergeChunkTask = new MergeMultiChunkTask(mergeContext, taskName, mergeLogger, resource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ public TsFileProcessor getProcessor() {

private FSFactory fsFactory = FSFactoryProducer.getFSFactory();

/**
* set to false if we failed to get TimeSeriesMetadata
*/
private boolean canGetTimeSeriesMetadata = true;

public TsFileResource() {
}

Expand Down Expand Up @@ -474,14 +469,6 @@ public void setProcessor(TsFileProcessor processor) {
this.processor = processor;
}

public boolean canGetTimeSeriesMetadata() {
return canGetTimeSeriesMetadata;
}

public void setCanGetTimeSeriesMetadata(boolean canGetTimeSeriesMetadata) {
this.canGetTimeSeriesMetadata = canGetTimeSeriesMetadata;
}

public TimeseriesMetadata getTimeSeriesMetadata() {
return timeSeriesMetadata;
}
Expand Down

0 comments on commit 3286c98

Please sign in to comment.