• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / iotdb / #9683

pending completion
#9683

push

travis_ci

web-flow
[IOTDB-6043] Pipe: a framework to support wal hardlink mode (#10440)

Co-authored-by: Steve Yurong Su <rong@apache.org>

150 of 150 new or added lines in 17 files covered. (100.0%)

79218 of 164968 relevant lines covered (48.02%)

0.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

27.12
/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeConfig.java
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements.  See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership.  The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19

20
package org.apache.iotdb.commons.pipe.config;
21

22
import org.apache.iotdb.commons.conf.CommonConfig;
23
import org.apache.iotdb.commons.conf.CommonDescriptor;
24

25
import org.slf4j.Logger;
26
import org.slf4j.LoggerFactory;
27

28
public class PipeConfig {
29

30
  private static final CommonConfig COMMON_CONFIG = CommonDescriptor.getInstance().getConfig();
1✔
31

32
  /////////////////////////////// File ///////////////////////////////
33

34
  public String getPipeHardlinkBaseDirName() {
35
    return COMMON_CONFIG.getPipeHardlinkBaseDirName();
1✔
36
  }
37

38
  public String getPipeHardlinkTsFileDirName() {
39
    return COMMON_CONFIG.getPipeHardlinkTsFileDirName();
1✔
40
  }
41

42
  public String getPipeHardlinkWALDirName() {
43
    return COMMON_CONFIG.getPipeHardlinkWALDirName();
1✔
44
  }
45

46
  public boolean getPipeHardLinkWALEnabled() {
47
    return COMMON_CONFIG.getPipeHardLinkWALEnabled();
1✔
48
  }
49

50
  /////////////////////////////// Tablet ///////////////////////////////
51

52
  public int getPipeDataStructureTabletRowSize() {
53
    return COMMON_CONFIG.getPipeDataStructureTabletRowSize();
1✔
54
  }
55

56
  /////////////////////////////// Subtask Executor ///////////////////////////////
57

58
  public int getPipeSubtaskExecutorMaxThreadNum() {
59
    return COMMON_CONFIG.getPipeSubtaskExecutorMaxThreadNum();
1✔
60
  }
61

62
  public int getPipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount() {
63
    return COMMON_CONFIG.getPipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount();
1✔
64
  }
65

66
  public long getPipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration() {
67
    return COMMON_CONFIG.getPipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration();
1✔
68
  }
69

70
  public long getPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs() {
71
    return COMMON_CONFIG.getPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs();
1✔
72
  }
73

74
  /////////////////////////////// Extractor ///////////////////////////////
75

76
  public int getPipeExtractorAssignerDisruptorRingBufferSize() {
77
    return COMMON_CONFIG.getPipeExtractorAssignerDisruptorRingBufferSize();
1✔
78
  }
79

80
  public int getPipeExtractorMatcherCacheSize() {
81
    return COMMON_CONFIG.getPipeExtractorMatcherCacheSize();
1✔
82
  }
83

84
  public int getPipeExtractorPendingQueueCapacity() {
85
    return COMMON_CONFIG.getPipeExtractorPendingQueueCapacity();
×
86
  }
87

88
  public int getPipeExtractorPendingQueueTabletLimit() {
89
    return COMMON_CONFIG.getPipeExtractorPendingQueueTabletLimit();
1✔
90
  }
91

92
  /////////////////////////////// Connector ///////////////////////////////
93

94
  public long getPipeConnectorTimeoutMs() {
95
    return COMMON_CONFIG.getPipeConnectorTimeoutMs();
×
96
  }
97

98
  public int getPipeConnectorReadFileBufferSize() {
99
    return COMMON_CONFIG.getPipeConnectorReadFileBufferSize();
×
100
  }
101

102
  public long getPipeConnectorRetryIntervalMs() {
103
    return COMMON_CONFIG.getPipeConnectorRetryIntervalMs();
×
104
  }
105

106
  public int getPipeConnectorPendingQueueSize() {
107
    return COMMON_CONFIG.getPipeConnectorPendingQueueSize();
×
108
  }
109

110
  /////////////////////////////// Meta Consistency ///////////////////////////////
111

112
  public boolean isSeperatedPipeHeartbeatEnabled() {
113
    return COMMON_CONFIG.isSeperatedPipeHeartbeatEnabled();
×
114
  }
115

116
  public int getPipeHeartbeatIntervalSecondsForCollectingPipeMeta() {
117
    return COMMON_CONFIG.getPipeHeartbeatIntervalSecondsForCollectingPipeMeta();
×
118
  }
119

120
  public long getPipeMetaSyncerInitialSyncDelayMinutes() {
121
    return COMMON_CONFIG.getPipeMetaSyncerInitialSyncDelayMinutes();
×
122
  }
123

124
  public long getPipeMetaSyncerSyncIntervalMinutes() {
125
    return COMMON_CONFIG.getPipeMetaSyncerSyncIntervalMinutes();
×
126
  }
127

128
  public long getPipeMetaSyncerAutoRestartPipeCheckIntervalRound() {
129
    return COMMON_CONFIG.getPipeMetaSyncerAutoRestartPipeCheckIntervalRound();
×
130
  }
131

132
  public boolean getPipeAutoRestartEnabled() {
133
    return COMMON_CONFIG.getPipeAutoRestartEnabled();
×
134
  }
135

136
  /////////////////////////////// Utils ///////////////////////////////
137

138
  private static final Logger LOGGER = LoggerFactory.getLogger(PipeConfig.class);
1✔
139

140
  public void printAllConfigs() {
141
    LOGGER.info("PipeHardlinkBaseDirName: {}", getPipeHardlinkBaseDirName());
×
142
    LOGGER.info("PipeHardlinkTsFileDirName: {}", getPipeHardlinkTsFileDirName());
×
143
    LOGGER.info("PipeHardlinkWALDirName: {}", getPipeHardlinkWALDirName());
×
144
    LOGGER.info("PipeHardLinkWALEnabled: {}", getPipeHardLinkWALEnabled());
×
145

146
    LOGGER.info("PipeDataStructureTabletRowSize: {}", getPipeDataStructureTabletRowSize());
×
147

148
    LOGGER.info("PipeSubtaskExecutorMaxThreadNum: {}", getPipeSubtaskExecutorMaxThreadNum());
×
149
    LOGGER.info(
×
150
        "PipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount: {}",
151
        getPipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount());
×
152
    LOGGER.info(
×
153
        "PipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration: {}",
154
        getPipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration());
×
155
    LOGGER.info(
×
156
        "PipeSubtaskExecutorPendingQueueMaxBlockingTimeMs: {}",
157
        getPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs());
×
158

159
    LOGGER.info(
×
160
        "PipeExtractorAssignerDisruptorRingBufferSize: {}",
161
        getPipeExtractorAssignerDisruptorRingBufferSize());
×
162
    LOGGER.info("PipeExtractorMatcherCacheSize: {}", getPipeExtractorMatcherCacheSize());
×
163
    LOGGER.info("PipeExtractorPendingQueueCapacity: {}", getPipeExtractorPendingQueueCapacity());
×
164
    LOGGER.info(
×
165
        "PipeExtractorPendingQueueTabletLimit: {}", getPipeExtractorPendingQueueTabletLimit());
×
166

167
    LOGGER.info("PipeConnectorTimeoutMs: {}", getPipeConnectorTimeoutMs());
×
168
    LOGGER.info("PipeConnectorReadFileBufferSize: {}", getPipeConnectorReadFileBufferSize());
×
169
    LOGGER.info("PipeConnectorRetryIntervalMs: {}", getPipeConnectorRetryIntervalMs());
×
170
    LOGGER.info("PipeConnectorPendingQueueSize: {}", getPipeConnectorPendingQueueSize());
×
171

172
    LOGGER.info("SeperatedPipeHeartbeatEnabled: {}", isSeperatedPipeHeartbeatEnabled());
×
173
    LOGGER.info(
×
174
        "PipeHeartbeatIntervalSecondsForCollectingPipeMeta: {}",
175
        getPipeHeartbeatIntervalSecondsForCollectingPipeMeta());
×
176
    LOGGER.info(
×
177
        "PipeMetaSyncerInitialSyncDelayMinutes: {}", getPipeMetaSyncerInitialSyncDelayMinutes());
×
178
    LOGGER.info("PipeMetaSyncerSyncIntervalMinutes: {}", getPipeMetaSyncerSyncIntervalMinutes());
×
179
    LOGGER.info(
×
180
        "PipeMetaSyncerAutoRestartPipeCheckIntervalRound: {}",
181
        getPipeMetaSyncerAutoRestartPipeCheckIntervalRound());
×
182
    LOGGER.info("PipeAutoRestartEnabled: {}", getPipeAutoRestartEnabled());
×
183
  }
×
184

185
  /////////////////////////////// Singleton ///////////////////////////////
186

187
  private PipeConfig() {}
188

189
  public static PipeConfig getInstance() {
190
    return PipeConfigHolder.INSTANCE;
1✔
191
  }
192

193
  private static class PipeConfigHolder {
194
    private static final PipeConfig INSTANCE = new PipeConfig();
1✔
195
  }
196
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc