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

apache / iotdb / #9824

pending completion
#9824

push

travis_ci

web-flow
Pipe: Remove parameters from iotdb-common.properties that users will not modify (#10851) (#10852)

(cherry picked from commit 11af323b7)

14 of 14 new or added lines in 5 files covered. (100.0%)

79712 of 165790 relevant lines covered (48.08%)

0.48 hits per line

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

25.4
/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
  public boolean isPipeConnectorRPCThriftCompressionEnabled() {
111
    return COMMON_CONFIG.isPipeConnectorRPCThriftCompressionEnabled();
×
112
  }
113

114
  public int getPipeAsyncConnectorSelectorNumber() {
115
    return COMMON_CONFIG.getPipeAsyncConnectorSelectorNumber();
×
116
  }
117

118
  public int getPipeAsyncConnectorCoreClientNumber() {
119
    return COMMON_CONFIG.getPipeAsyncConnectorCoreClientNumber();
×
120
  }
121

122
  public int getPipeAsyncConnectorMaxClientNumber() {
123
    return COMMON_CONFIG.getPipeAsyncConnectorMaxClientNumber();
×
124
  }
125

126
  /////////////////////////////// Meta Consistency ///////////////////////////////
127

128
  public boolean isSeperatedPipeHeartbeatEnabled() {
129
    return COMMON_CONFIG.isSeperatedPipeHeartbeatEnabled();
×
130
  }
131

132
  public int getPipeHeartbeatIntervalSecondsForCollectingPipeMeta() {
133
    return COMMON_CONFIG.getPipeHeartbeatIntervalSecondsForCollectingPipeMeta();
×
134
  }
135

136
  public long getPipeMetaSyncerInitialSyncDelayMinutes() {
137
    return COMMON_CONFIG.getPipeMetaSyncerInitialSyncDelayMinutes();
×
138
  }
139

140
  public long getPipeMetaSyncerSyncIntervalMinutes() {
141
    return COMMON_CONFIG.getPipeMetaSyncerSyncIntervalMinutes();
×
142
  }
143

144
  public long getPipeMetaSyncerAutoRestartPipeCheckIntervalRound() {
145
    return COMMON_CONFIG.getPipeMetaSyncerAutoRestartPipeCheckIntervalRound();
×
146
  }
147

148
  public boolean getPipeAutoRestartEnabled() {
149
    return COMMON_CONFIG.getPipeAutoRestartEnabled();
×
150
  }
151

152
  /////////////////////////////// Utils ///////////////////////////////
153

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

156
  public void printAllConfigs() {
157
    LOGGER.info("PipeHardlinkBaseDirName: {}", getPipeHardlinkBaseDirName());
×
158
    LOGGER.info("PipeHardlinkTsFileDirName: {}", getPipeHardlinkTsFileDirName());
×
159
    LOGGER.info("PipeHardlinkWALDirName: {}", getPipeHardlinkWALDirName());
×
160
    LOGGER.info("PipeHardLinkWALEnabled: {}", getPipeHardLinkWALEnabled());
×
161

162
    LOGGER.info("PipeDataStructureTabletRowSize: {}", getPipeDataStructureTabletRowSize());
×
163

164
    LOGGER.info("PipeSubtaskExecutorMaxThreadNum: {}", getPipeSubtaskExecutorMaxThreadNum());
×
165
    LOGGER.info(
×
166
        "PipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount: {}",
167
        getPipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount());
×
168
    LOGGER.info(
×
169
        "PipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration: {}",
170
        getPipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration());
×
171
    LOGGER.info(
×
172
        "PipeSubtaskExecutorPendingQueueMaxBlockingTimeMs: {}",
173
        getPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs());
×
174

175
    LOGGER.info(
×
176
        "PipeExtractorAssignerDisruptorRingBufferSize: {}",
177
        getPipeExtractorAssignerDisruptorRingBufferSize());
×
178
    LOGGER.info("PipeExtractorMatcherCacheSize: {}", getPipeExtractorMatcherCacheSize());
×
179
    LOGGER.info("PipeExtractorPendingQueueCapacity: {}", getPipeExtractorPendingQueueCapacity());
×
180
    LOGGER.info(
×
181
        "PipeExtractorPendingQueueTabletLimit: {}", getPipeExtractorPendingQueueTabletLimit());
×
182

183
    LOGGER.info("PipeConnectorTimeoutMs: {}", getPipeConnectorTimeoutMs());
×
184
    LOGGER.info("PipeConnectorReadFileBufferSize: {}", getPipeConnectorReadFileBufferSize());
×
185
    LOGGER.info("PipeConnectorRetryIntervalMs: {}", getPipeConnectorRetryIntervalMs());
×
186
    LOGGER.info("PipeConnectorPendingQueueSize: {}", getPipeConnectorPendingQueueSize());
×
187

188
    LOGGER.info("SeperatedPipeHeartbeatEnabled: {}", isSeperatedPipeHeartbeatEnabled());
×
189
    LOGGER.info(
×
190
        "PipeHeartbeatIntervalSecondsForCollectingPipeMeta: {}",
191
        getPipeHeartbeatIntervalSecondsForCollectingPipeMeta());
×
192
    LOGGER.info(
×
193
        "PipeMetaSyncerInitialSyncDelayMinutes: {}", getPipeMetaSyncerInitialSyncDelayMinutes());
×
194
    LOGGER.info("PipeMetaSyncerSyncIntervalMinutes: {}", getPipeMetaSyncerSyncIntervalMinutes());
×
195
    LOGGER.info(
×
196
        "PipeMetaSyncerAutoRestartPipeCheckIntervalRound: {}",
197
        getPipeMetaSyncerAutoRestartPipeCheckIntervalRound());
×
198
    LOGGER.info("PipeAutoRestartEnabled: {}", getPipeAutoRestartEnabled());
×
199
  }
×
200

201
  /////////////////////////////// Singleton ///////////////////////////////
202

203
  private PipeConfig() {}
204

205
  public static PipeConfig getInstance() {
206
    return PipeConfigHolder.INSTANCE;
1✔
207
  }
208

209
  private static class PipeConfigHolder {
210
    private static final PipeConfig INSTANCE = new PipeConfig();
1✔
211
  }
212
}
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

© 2025 Coveralls, Inc