This is an automated email from the ASF dual-hosted git repository. hxd pushed a commit to branch feature/metric2021 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit ec4bb940ef6bbbb5fa844b53195e4e8d9ece28fb Author: xiangdong huang <[email protected]> AuthorDate: Sat Feb 20 17:20:48 2021 +0800 add apache rat --- .../java/org/apache/iotdb/metrics/KnownMetric.java | 18 +++++++++++++++ .../org/apache/iotdb/metrics/MetricFactory.java | 18 +++++++++++++++ .../org/apache/iotdb/metrics/MetricManager.java | 18 +++++++++++++++ .../org/apache/iotdb/metrics/MetricReporter.java | 18 +++++++++++++++ .../org/apache/iotdb/metrics/MetricService.java | 26 ++++++++++++++++++++++ .../iotdb/metrics/impl/DoNothingFactory.java | 18 +++++++++++++++ .../iotdb/metrics/impl/DoNothingMetricManager.java | 18 +++++++++++++++ metrics/micrometer-metrics/pom.xml | 20 +++++++++++++++++ ...otdb.metrics.micrometer.MicrometerMetricFactory | 2 +- ...tdb.metrics.micrometer.MicrometerMetricReporter | 2 +- metrics/pom.xml | 2 +- pom.xml | 8 +++++++ 12 files changed, 165 insertions(+), 3 deletions(-) diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/KnownMetric.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/KnownMetric.java index 87fde28..e5683c5 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/KnownMetric.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/KnownMetric.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics; public enum KnownMetric { diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java index 7604418..95a3d3f 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics; import java.util.Map; diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java index 786f47b..d2329d0 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics; import org.apache.iotdb.metrics.type.Counter; diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricReporter.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricReporter.java index 68862f4..26176f7 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricReporter.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricReporter.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics; public interface MetricReporter { diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricService.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricService.java index 47adaf6..6002d7c 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricService.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricService.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics; import java.util.ArrayList; @@ -6,9 +24,17 @@ import java.util.Map; import java.util.ServiceLoader; import org.apache.iotdb.metrics.impl.DoNothingFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * MetricService is the entr + */ public class MetricService { + private static final Logger logger = LoggerFactory.getLogger(MetricService.class); + private static final List<MetricReporter> reporters = new ArrayList<>(); private static MetricFactory factory; diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java index 9f1e54e..50f12e2 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics.impl; import java.util.Collections; diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricManager.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricManager.java index 6e25d29..7abaa12 100644 --- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricManager.java +++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricManager.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.metrics.impl; import java.util.Map; diff --git a/metrics/micrometer-metrics/pom.xml b/metrics/micrometer-metrics/pom.xml index 43d1239..1c51742 100644 --- a/metrics/micrometer-metrics/pom.xml +++ b/metrics/micrometer-metrics/pom.xml @@ -1,4 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>iotdb-metrics</artifactId> diff --git a/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricFactory b/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricFactory index a17288f..6860085 100644 --- a/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricFactory +++ b/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricFactory @@ -1 +1 @@ -org.apache.iotdb.metrics.micrometer.MicrometerMetricFactory \ No newline at end of file +# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a [...] \ No newline at end of file diff --git a/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricReporter b/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricReporter index a96ed11..3138baf 100644 --- a/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricReporter +++ b/metrics/micrometer-metrics/src/main/resources/META-INF.services/org.apache.iotdb.metrics.micrometer.MicrometerMetricReporter @@ -1 +1 @@ -org.apache.iotdb.metrics.micrometer.MicrometerMetricReporter \ No newline at end of file +# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a [...] \ No newline at end of file diff --git a/metrics/pom.xml b/metrics/pom.xml index 2ac4d14..b7b9b10 100644 --- a/metrics/pom.xml +++ b/metrics/pom.xml @@ -36,5 +36,5 @@ <module>interface</module> <module>micrometer-metrics</module> </modules> - <dependencies/> + </project> diff --git a/pom.xml b/pom.xml index 4d8d0a9..8a7a10d 100644 --- a/pom.xml +++ b/pom.xml @@ -502,6 +502,14 @@ <artifactId>mockito-all</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> </dependencies> <build> <pluginManagement>
