From 2600d2de8d9d963db920ff486032482a946fe3d6 Mon Sep 17 00:00:00 2001 From: Joey Date: Mon, 18 May 2020 13:16:49 -0500 Subject: [PATCH] [MINOR] Fix apache-rat violations (#1639) * MINOR Fix apache-rat violations. Also, enabling RAT for hudi-utilities and hudi-integ-test --- .../common/util/ObjectSizeCalculator.java | 32 ++++++++++--------- hudi-integ-test/pom.xml | 4 +++ hudi-utilities/pom.xml | 4 +++ .../HoodieSnapshotExporterException.java | 18 +++++++++++ .../utilities/sources/TestInputBatch.java | 18 +++++++++++ pom.xml | 1 + 6 files changed, 62 insertions(+), 15 deletions(-) diff --git a/hudi-common/src/main/java/org/apache/hudi/common/util/ObjectSizeCalculator.java b/hudi-common/src/main/java/org/apache/hudi/common/util/ObjectSizeCalculator.java index 760931632..88587c78e 100644 --- a/hudi-common/src/main/java/org/apache/hudi/common/util/ObjectSizeCalculator.java +++ b/hudi-common/src/main/java/org/apache/hudi/common/util/ObjectSizeCalculator.java @@ -1,18 +1,20 @@ -// ================================================================================================= -// Copyright 2011 Twitter, Inc. -// ------------------------------------------------------------------------------------------------- -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this work except in compliance with the License. -// You may obtain a copy of the License in the LICENSE file, or 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. -// ================================================================================================= +/* + * 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.hudi.common.util; diff --git a/hudi-integ-test/pom.xml b/hudi-integ-test/pom.xml index 53b1233c0..a4381ac1d 100644 --- a/hudi-integ-test/pom.xml +++ b/hudi-integ-test/pom.xml @@ -231,6 +231,10 @@ + + org.apache.rat + apache-rat-plugin + diff --git a/hudi-utilities/pom.xml b/hudi-utilities/pom.xml index 9c63cad7e..0b79414ec 100644 --- a/hudi-utilities/pom.xml +++ b/hudi-utilities/pom.xml @@ -56,6 +56,10 @@ + + org.apache.rat + apache-rat-plugin + diff --git a/hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSnapshotExporterException.java b/hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSnapshotExporterException.java index 6fcb9dfa6..c94c323c0 100644 --- a/hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSnapshotExporterException.java +++ b/hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSnapshotExporterException.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.hudi.utilities.exception; import org.apache.hudi.exception.HoodieException; diff --git a/hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestInputBatch.java b/hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestInputBatch.java index 752621da5..0bfd82da5 100644 --- a/hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestInputBatch.java +++ b/hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestInputBatch.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.hudi.utilities.sources; import org.apache.hudi.common.util.Option; diff --git a/pom.xml b/pom.xml index 45b9580e8..b2792f000 100644 --- a/pom.xml +++ b/pom.xml @@ -352,6 +352,7 @@ **/test/resources/*.commit **/target/** **/generated-sources/** + .github/**