From 5519c990c7aaeae947162b12122a4ebf810a4c39 Mon Sep 17 00:00:00 2001 From: gosonzhang Date: Mon, 10 Feb 2020 15:03:45 +0800 Subject: [PATCH 1/6] [TUBEMQ-12]Change to use Apache License V2 and enable RAT check add bin,config,checkstyle,client --- bin/broker.sh | 24 +++++++-------- bin/env.sh | 22 +++++++------- bin/groupAdmin.sh | 22 +++++++------- bin/indexReBuilder.sh | 22 +++++++------- bin/master.sh | 25 +++++++--------- codestyle/checkstyle.xml | 30 +++++++++---------- codestyle/suppressions.xml | 30 +++++++++---------- conf/broker.ini | 22 +++++++------- conf/log4j.properties | 22 +++++++------- conf/master.ini | 22 +++++++------- conf/master.log4j.properties | 22 +++++++------- conf/tools.log4j.properties | 22 +++++++------- resources/templates/control/slidebar.vm | 24 +++++++-------- resources/templates/layout/default.vm | 24 +++++++-------- resources/templates/layout/master.vm | 24 +++++++-------- resources/templates/layout/tubeweb.vm | 24 +++++++-------- resources/templates/layout/webapi.vm | 24 +++++++-------- resources/templates/macro.vm | 24 +++++++-------- .../templates/screen/cluster/clusterManage.vm | 24 +++++++-------- .../templates/screen/config/brokerDetail.vm | 24 +++++++-------- .../templates/screen/config/brokerList.vm | 24 +++++++-------- .../templates/screen/config/topicDetail.vm | 24 +++++++-------- .../templates/screen/config/topicList.vm | 24 +++++++-------- .../screen/consume/consumeGroupList.vm | 24 +++++++-------- resources/templates/screen/consume/detail.vm | 24 +++++++-------- resources/templates/screen/master.vm | 24 +++++++-------- resources/templates/screen/tubeweb.vm | 24 +++++++-------- resources/templates/screen/webapi.vm | 24 +++++++-------- resources/velocity.properties | 29 ++++++++---------- tubemq-client/pom.xml | 30 +++++++++---------- tubemq-client/src/main/assembly/assembly.xml | 30 +++++++++---------- .../client/common/TClientConstants.java | 28 ++++++++--------- .../tubemq/client/config/ConsumerConfig.java | 28 ++++++++--------- .../client/config/TubeClientConfig.java | 28 ++++++++--------- .../client/config/TubeClientConfigUtils.java | 28 ++++++++--------- .../client/consumer/BaseMessageConsumer.java | 28 ++++++++--------- .../tubemq/client/consumer/ClientSubInfo.java | 28 ++++++++--------- .../client/consumer/ConsumeOffsetInfo.java | 28 ++++++++--------- .../client/consumer/ConsumerResult.java | 28 ++++++++--------- .../client/consumer/ConsumerSamplePrint.java | 28 ++++++++--------- .../tubemq/client/consumer/FetchContext.java | 28 ++++++++--------- .../client/consumer/MessageConsumer.java | 28 ++++++++--------- .../client/consumer/MessageFetchManager.java | 28 ++++++++--------- .../client/consumer/MessageListener.java | 28 ++++++++--------- .../tubemq/client/consumer/PartitionExt.java | 28 ++++++++--------- .../consumer/PartitionSelectResult.java | 28 ++++++++--------- .../client/consumer/PullMessageConsumer.java | 28 ++++++++--------- .../client/consumer/PushMessageConsumer.java | 28 ++++++++--------- .../tubemq/client/consumer/RmtDataCache.java | 28 ++++++++--------- .../consumer/SimplePullMessageConsumer.java | 28 ++++++++--------- .../consumer/SimplePushMessageConsumer.java | 28 ++++++++--------- .../client/consumer/TopicProcessor.java | 28 ++++++++--------- .../client/exception/TubeClientException.java | 28 ++++++++--------- .../client/factory/InnerSessionFactory.java | 28 ++++++++--------- .../client/factory/MessageSessionFactory.java | 28 ++++++++--------- .../factory/TubeBaseSessionFactory.java | 28 ++++++++--------- .../factory/TubeMultiSessionFactory.java | 28 ++++++++--------- .../factory/TubeSingleSessionFactory.java | 28 ++++++++--------- .../client/producer/MessageProducer.java | 28 ++++++++--------- .../client/producer/MessageSentCallback.java | 28 ++++++++--------- .../client/producer/MessageSentResult.java | 28 ++++++++--------- .../client/producer/PartitionRouter.java | 28 ++++++++--------- .../client/producer/ProducerManager.java | 28 ++++++++--------- .../producer/RoundRobinPartitionRouter.java | 28 ++++++++--------- .../producer/SimpleMessageProducer.java | 28 ++++++++--------- .../qltystats/BrokerRcvQltyStats.java | 28 ++++++++--------- .../qltystats/BrokerStatsDltTuple.java | 28 ++++++++--------- .../qltystats/BrokerStatsItemSet.java | 28 ++++++++--------- .../qltystats/DefaultBrokerRcvQltyStats.java | 28 ++++++++--------- tubemq-client/src/saveClientVersion.cmd | 21 ++++++------- tubemq-client/src/saveClientVersion.sh | 22 +++++++------- .../consumer/MessageFetchManagerTest.java | 28 ++++++++--------- .../client/consumer/PartitionExtTest.java | 28 ++++++++--------- .../client/consumer/RmtDataCacheTest.java | 28 ++++++++--------- .../factory/TubeBaseSessionFactoryTest.java | 28 ++++++++--------- .../factory/TubeMultiSessionFactoryTest.java | 28 ++++++++--------- .../factory/TubeSingleSessionFactoryTest.java | 28 ++++++++--------- .../RoundRobinPartitionRouterTest.java | 28 ++++++++--------- .../DefaultBrokerRcvQltyStatsTest.java | 28 ++++++++--------- 79 files changed, 1041 insertions(+), 1048 deletions(-) diff --git a/bin/broker.sh b/bin/broker.sh index 3e57abe8c3f..85311f06114 100644 --- a/bin/broker.sh +++ b/bin/broker.sh @@ -1,22 +1,20 @@ #!/bin/bash # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. -# -# modified version of Metamorphosis Project +# 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 directory diff --git a/bin/env.sh b/bin/env.sh index 721f6285ca4..02e170cff75 100644 --- a/bin/env.sh +++ b/bin/env.sh @@ -1,20 +1,20 @@ #!/bin/bash # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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. # #Config your java home diff --git a/bin/groupAdmin.sh b/bin/groupAdmin.sh index cb4e0dff310..6bb0ee3fb42 100644 --- a/bin/groupAdmin.sh +++ b/bin/groupAdmin.sh @@ -1,20 +1,20 @@ #!/bin/bash # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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 directory diff --git a/bin/indexReBuilder.sh b/bin/indexReBuilder.sh index 3546619534a..a6e033e35ae 100644 --- a/bin/indexReBuilder.sh +++ b/bin/indexReBuilder.sh @@ -1,20 +1,20 @@ #!/bin/bash # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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 directory diff --git a/bin/master.sh b/bin/master.sh index ba5794dda1c..175527c88cd 100644 --- a/bin/master.sh +++ b/bin/master.sh @@ -1,24 +1,21 @@ #!/bin/bash # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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. # -# modified version of Metamorphosis Project -# - #project directory if [ -z "$BASE_DIR" ] ; then diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml index f14d82e93ba..3d30c02c498 100644 --- a/codestyle/checkstyle.xml +++ b/codestyle/checkstyle.xml @@ -1,20 +1,20 @@ +// 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. +--> diff --git a/codestyle/suppressions.xml b/codestyle/suppressions.xml index 41b0c697534..c48abb73d33 100644 --- a/codestyle/suppressions.xml +++ b/codestyle/suppressions.xml @@ -1,20 +1,20 @@ +// 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. +--> diff --git a/conf/broker.ini b/conf/broker.ini index fff94eeda90..9017597191e 100644 --- a/conf/broker.ini +++ b/conf/broker.ini @@ -1,18 +1,18 @@ ; -; Tencent is pleased to support the open source community by making TubeMQ available. +; 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 ; -; Copyright (C) 2012-2019 Tencent. All Rights Reserved. -; -; Licensed 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 -; -; https://opensource.org/licenses/Apache-2.0 +; 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 OF ANY KIND, either express or implied. See the License for the -; specific language governing permissions and limitations under the License. +; 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. ; [broker] diff --git a/conf/log4j.properties b/conf/log4j.properties index d5df129eb31..2f53338f60d 100644 --- a/conf/log4j.properties +++ b/conf/log4j.properties @@ -1,18 +1,18 @@ # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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. # log4j.rootLogger=INFO, ServerDailyRollingFile diff --git a/conf/master.ini b/conf/master.ini index f64abb21335..b4ac85925f3 100644 --- a/conf/master.ini +++ b/conf/master.ini @@ -1,18 +1,18 @@ ; -; Tencent is pleased to support the open source community by making TubeMQ available. +; 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 ; -; Copyright (C) 2012-2019 Tencent. All Rights Reserved. -; -; Licensed 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 -; -; https://opensource.org/licenses/Apache-2.0 +; 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 OF ANY KIND, either express or implied. See the License for the -; specific language governing permissions and limitations under the License. +; 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. ; [master] diff --git a/conf/master.log4j.properties b/conf/master.log4j.properties index 6977c76a857..0f21c5b3dd1 100644 --- a/conf/master.log4j.properties +++ b/conf/master.log4j.properties @@ -1,18 +1,18 @@ # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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. # log4j.rootLogger=INFO, MasterDailyRollingFile diff --git a/conf/tools.log4j.properties b/conf/tools.log4j.properties index 145b6e6441e..bb49f226438 100644 --- a/conf/tools.log4j.properties +++ b/conf/tools.log4j.properties @@ -1,18 +1,18 @@ # -# Tencent is pleased to support the open source community by making TubeMQ available. +# 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 # -# Copyright (C) 2012-2019 Tencent. All Rights Reserved. -# -# Licensed 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 -# -# https://opensource.org/licenses/Apache-2.0 +# 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 OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# 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. # log4j.rootLogger=INFO, stdout diff --git a/resources/templates/control/slidebar.vm b/resources/templates/control/slidebar.vm index 2b7e975b299..677657afe33 100644 --- a/resources/templates/control/slidebar.vm +++ b/resources/templates/control/slidebar.vm @@ -1,18 +1,18 @@ ## -## Tencent is pleased to support the open source community by making TubeMQ available. +## 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 ## -## Copyright (C) 2012-2019 Tencent. All Rights Reserved. +## http://www.apache.org/licenses/LICENSE-2.0 ## -## Licensed 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 -## -## https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the -## specific language governing permissions and limitations under the License. +## 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. ##