Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojialin committed Mar 5, 2020
1 parent 623bfad commit 0832d0a
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 46 deletions.
3 changes: 2 additions & 1 deletion server/src/assembly/resources/conf/iotdb-engine.properties
Expand Up @@ -21,9 +21,10 @@
### Web Page Configuration
####################

metrics_port=8181
enable_metric_service=false

metrics_port=8181

query_cache_size_in_metric=200

####################
Expand Down
28 changes: 9 additions & 19 deletions server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
Expand Up @@ -486,8 +486,6 @@ public class IoTDBConfig {
//wait for 60 second by default.
private int thriftServerAwaitTimeForStopService = 60;

private boolean enableMetricsWebService = true;

private int queryCacheSizeInMetric = 200;

public IoTDBConfig() {
Expand Down Expand Up @@ -614,26 +612,26 @@ public String[] getDataDirs() {
return dataDirs;
}

public int getMetricsPort() {
return metricsPort;
}

void setMetricsPort(int metricsPort) {
this.metricsPort = metricsPort;
}

public boolean isEnableMetricService() {
return enableMetricService;
}

void setEnableMetricService(boolean enableMetricService) {
public void setEnableMetricService(boolean enableMetricService) {
this.enableMetricService = enableMetricService;
}

void setDataDirs(String[] dataDirs) {
this.dataDirs = dataDirs;
}

public int getMetricsPort() {
return metricsPort;
}

void setMetricsPort(int metricsPort) {
this.metricsPort = metricsPort;
}

public String getRpcAddress() {
return rpcAddress;
}
Expand Down Expand Up @@ -1369,14 +1367,6 @@ public void setThriftServerAwaitTimeForStopService(int thriftServerAwaitTimeForS
this.thriftServerAwaitTimeForStopService = thriftServerAwaitTimeForStopService;
}

public boolean isEnableMetricsWebService() {
return enableMetricsWebService;
}

public void setEnableMetricsWebService(boolean enableMetricsWebService) {
this.enableMetricsWebService = enableMetricsWebService;
}

public int getQueryCacheSizeInMetric() {
return queryCacheSizeInMetric;
}
Expand Down
Expand Up @@ -114,6 +114,9 @@ private void loadProps() {
+ " use default value");
}

conf.setEnableMetricService(Boolean.parseBoolean(properties
.getProperty("enable_metric_service", Boolean.toString(conf.isEnableMetricService()))));

conf.setMetricsPort(Integer.parseInt(properties.getProperty("metrics_port",
Integer.toString(conf.getMetricsPort()))));

Expand Down
Expand Up @@ -875,15 +875,17 @@ public void collectSeries(String startingPath, List<MeasurementSchema> timeserie
/**
* For a path, infer all storage groups it may belong to.
* The path can have wildcards.
*
* Consider the path into two parts: (1) the sub path which can not contain a storage group name and
* (2) the sub path which is substring that begin after the storage group name.
*
* (1) Suppose the part of the path can not contain a storage group name (e.g.,
* "root".contains("root.sg") == false), then:
* If the wildcard is not at the tail, then for each wildcard, only one level will be inferred
* and the wildcard will be removed.
* If the wildcard is at the tail, then the inference will go on until the storage groups are found
* and the wildcard will be kept.
* (2) Suppose the path of the path is a substring that begin after the storage group name. (e.g.,
* (2) Suppose the part of the path is a substring that begin after the storage group name. (e.g.,
* For "root.*.sg1.a.*.b.*" and "root.x.sg1" is a storage group, then this part is "a.*.b.*").
* For this part, keep what it is.
*
Expand All @@ -897,7 +899,6 @@ public void collectSeries(String startingPath, List<MeasurementSchema> timeserie
* Eg3:
* for input "root.area1.*", returns ("root.area1.group3", "root.area1.group3.*")
*
*
* @param path can be a prefix or a full path.
* @return StorageGroupName-FullPath pairs
*/
Expand Down
Expand Up @@ -109,7 +109,7 @@ public List<Path> getPaths() {

@Override
public void serializeTo(DataOutputStream stream) throws IOException {
stream.write(PhysicalPlanType.CREATE_TIMESERIES.ordinal());
stream.writeByte((byte) PhysicalPlanType.CREATE_TIMESERIES.ordinal());
byte[] pathBytes = path.getFullPath().getBytes();
stream.writeInt(pathBytes.length);
stream.write(pathBytes);
Expand Down
Expand Up @@ -22,16 +22,17 @@
import org.apache.iotdb.tsfile.read.common.Path;

public class ShowChildPathsPlan extends ShowPlan {
//show child paths SQL does not support path with wildcard
private Path path;

public ShowChildPathsPlan(ShowContentType showContentType, Path path) {
// the path could be a prefix path with wildcard
private Path prefixPath;

public ShowChildPathsPlan(ShowContentType showContentType, Path prefixPath) {
super(showContentType);
this.path = path;
this.prefixPath = prefixPath;
canbeSplit = false;
}

public Path getPath() {
return this.path;
return this.prefixPath;
}
}
Expand Up @@ -288,8 +288,7 @@ private PhysicalPlan transformQuery(QueryOperator queryOperator)
Path fullPath = Path.addPrefixPath(suffixPath, device);
try {
// remove stars in SELECT to get actual paths
List<String> actualPaths = getMatchedTimeseries(fullPath.getFullPath()); // remove stars in SELECT to
// get actual paths
List<String> actualPaths = getMatchedTimeseries(fullPath.getFullPath());

// for actual non exist path
if (actualPaths.isEmpty() && originAggregations.isEmpty()) {
Expand Down
Expand Up @@ -57,15 +57,15 @@ public class AggregationExecutor {

private List<Path> selectedSeries;
protected List<TSDataType> dataTypes;
protected List<String> aggregations;
private List<String> aggregations;
protected IExpression expression;

/**
* aggregation batch calculation size.
**/
private int aggregateFetchSize;

public AggregationExecutor(AggregationPlan aggregationPlan) {
AggregationExecutor(AggregationPlan aggregationPlan) {
this.selectedSeries = aggregationPlan.getDeduplicatedPaths();
this.dataTypes = aggregationPlan.getDeduplicatedDataTypes();
this.aggregations = aggregationPlan.getDeduplicatedAggregations();
Expand All @@ -78,7 +78,7 @@ public AggregationExecutor(AggregationPlan aggregationPlan) {
*
* @param context query context
*/
public QueryDataSet executeWithoutValueFilter(QueryContext context)
QueryDataSet executeWithoutValueFilter(QueryContext context)
throws StorageEngineException, IOException, QueryProcessException {

Filter timeFilter = null;
Expand Down Expand Up @@ -109,7 +109,7 @@ public QueryDataSet executeWithoutValueFilter(QueryContext context)
* @param context query context
* @return AggregateResult list
*/
protected List<AggregateResult> aggregateOneSeries(
private List<AggregateResult> aggregateOneSeries(
Map.Entry<Path, List<Integer>> pathToAggrIndexes,
Filter timeFilter, QueryContext context)
throws IOException, QueryProcessException, StorageEngineException {
Expand All @@ -128,7 +128,7 @@ protected List<AggregateResult> aggregateOneSeries(
return aggregateResultList;
}

public static void aggregateOneSeries(Path seriesPath, QueryContext context, Filter timeFilter,
private static void aggregateOneSeries(Path seriesPath, QueryContext context, Filter timeFilter,
TSDataType tsDataType, List<AggregateResult> aggregateResultList, TsFileFilter fileFilter)
throws StorageEngineException, IOException, QueryProcessException {

Expand Down Expand Up @@ -227,7 +227,7 @@ private static int aggregateOverlappedPages(IAggregateReader seriesReader,
*
* @param context query context.
*/
public QueryDataSet executeWithValueFilter(QueryContext context)
QueryDataSet executeWithValueFilter(QueryContext context)
throws StorageEngineException, IOException {

TimeGenerator timestampGenerator = getTimeGenerator(context);
Expand All @@ -249,11 +249,11 @@ public QueryDataSet executeWithValueFilter(QueryContext context)
return constructDataSet(aggregateResults);
}

protected TimeGenerator getTimeGenerator(QueryContext context) throws StorageEngineException {
private TimeGenerator getTimeGenerator(QueryContext context) throws StorageEngineException {
return new ServerTimeGenerator(expression, context);
}

protected IReaderByTimestamp getReaderByTime(Path path, TSDataType dataType,
private IReaderByTimestamp getReaderByTime(Path path, TSDataType dataType,
QueryContext context) throws StorageEngineException {
return new SeriesReaderByTimestamp(path,
dataType, context,
Expand Down
Expand Up @@ -80,7 +80,7 @@ public void stop() {

@Override
public synchronized void startService() throws StartupException {
if (!IoTDBDescriptor.getInstance().getConfig().isEnableMetricsWebService()) {
if (!IoTDBDescriptor.getInstance().getConfig().isEnableMetricService()) {
return;
}
logger.info("{}: start {}...", IoTDBConstant.GLOBAL_DB_NAME, this.getID().getName());
Expand Down
Expand Up @@ -24,7 +24,6 @@
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
Expand All @@ -40,7 +39,6 @@
import org.apache.iotdb.db.engine.StorageEngine;
import org.apache.iotdb.db.engine.cache.DeviceMetaDataCache;
import org.apache.iotdb.db.engine.cache.TsFileMetaDataCache;
import org.apache.iotdb.db.exception.StartupException;
import org.apache.iotdb.db.exception.StorageEngineException;
import org.apache.iotdb.db.metadata.MManager;
import org.apache.iotdb.db.query.context.QueryContext;
Expand Down Expand Up @@ -187,12 +185,12 @@ public static void closeStatMonitor() {
/**
* disable memory control</br> this function should be called before all code in the setup
*/
public static void envSetUp() throws StartupException {
public static void envSetUp() {
logger.warn("EnvironmentUtil setup...");
System.setProperty(IoTDBConstant.REMOTE_JMX_PORT_NAME, "31999");
IoTDBDescriptor.getInstance().getConfig().setThriftServerAwaitTimeForStopService(0);
//we do not start 8181 port in test.
IoTDBDescriptor.getInstance().getConfig().setEnableMetricsWebService(false);
IoTDBDescriptor.getInstance().getConfig().setEnableMetricService(false);
if (daemon == null) {
daemon = new IoTDB();
}
Expand Down
Expand Up @@ -79,5 +79,4 @@ public int compareTo(TimeValuePair o) {
return Long.compare(this.getTimestamp(), o.getTimestamp());
}


}
Expand Up @@ -28,7 +28,7 @@ private Murmur128Hash() {
* get hashcode of value by seed
*
* @param value value
* @param seed seend
* @param seed seed
* @return hashcode of value
*/
public static int hash(String value, int seed) {
Expand All @@ -40,7 +40,7 @@ public static int hash(String value, int seed) {
*
* @param value1 the first value
* @param value2 the second value
* @param seed seend
* @param seed seed
* @return hashcode of value
*/
public static int hash(String value1, long value2, int seed) {
Expand Down

0 comments on commit 0832d0a

Please sign in to comment.