Skip to content

Commit

Permalink
HBASE-28006 Run spotless:apply on code base
Browse files Browse the repository at this point in the history
  • Loading branch information
NihalJain committed Aug 11, 2023
1 parent c1eb13a commit 5f0a9df
Show file tree
Hide file tree
Showing 99 changed files with 4,834 additions and 4,404 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,3 @@ limitations under the License.
| [HBASE-22210](https://issues.apache.org/jira/browse/HBASE-22210) | Fix hbase-connectors-assembly to include every jar | Major | hbase-connectors |
| [HBASE-22266](https://issues.apache.org/jira/browse/HBASE-22266) | Add yetus personality to connectors to avoid scaladoc issues | Major | hbase-connectors |
| [HBASE-22257](https://issues.apache.org/jira/browse/HBASE-22257) | Remove json4s and jackson dependency from hbase spark connector | Major | hbase-connectors |


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

# hbase-connectors

Connectors for [Apache HBase™](https://hbase.apache.org)
Connectors for [Apache HBase™](https://hbase.apache.org)

* [Kafka Proxy](https://github.com/apache/hbase-connectors/tree/master/kafka)
* [Spark](https://github.com/apache/hbase-connectors/tree/master/spark)
1 change: 0 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,3 @@ New features in hbase-spark:
\* support for Dataframe writes,
\* avro support,
\* catalog can be defined in json.

2 changes: 1 addition & 1 deletion dev-support/code-coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ The project name is an optional parameter.

Here is an example command for running and publishing the coverage data:

```./dev-support/code-coverage/run-coverage.sh -l ProjectCredentials -u https://exampleserver.com -k Project_Key -n Project_Name```
```./dev-support/code-coverage/run-coverage.sh -l ProjectCredentials -u https://exampleserver.com -k Project_Key -n Project_Name```
2 changes: 1 addition & 1 deletion dev-support/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ pipeline {
}
}
}
}
}
2 changes: 1 addition & 1 deletion dev-support/jenkins/jenkins_precommit_github_yetus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ YETUS_ARGS+=("--github-repo=apache/hbase-connectors")
echo "Launching yetus with command line:"
echo "${TESTPATCHBIN} ${YETUS_ARGS[*]}"

/usr/bin/env bash "${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
/usr/bin/env bash "${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
44 changes: 17 additions & 27 deletions hbase-connectors-assembly/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<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">
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -22,17 +21,15 @@
-->
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>hbase-connectors</artifactId>
<groupId>org.apache.hbase.connectors</groupId>
<artifactId>hbase-connectors</artifactId>
<version>${revision}</version>
<relativePath>../</relativePath>
</parent>
<artifactId>hbase-connectors-assembly</artifactId>
<name>Apache HBase Connectors - Assembly</name>
<description>
Module that does project assembly and that is all that it does.
</description>
<packaging>pom</packaging>
<name>Apache HBase Connectors - Assembly</name>
<description>Module that does project assembly and that is all that it does.</description>
<properties>
<license.bundles.dependencies>true</license.bundles.dependencies>
</properties>
Expand Down Expand Up @@ -87,10 +84,10 @@
<executions>
<execution>
<id>distro-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<finalName>hbase-connectors-${revision}</finalName>
<skipAssembly>false</skipAssembly>
Expand All @@ -111,11 +108,11 @@
<execution>
<!-- generates the file that will be used by the bin/hbase script in the dev env -->
<id>create-hbase-connectors-generated-classpath</id>
<phase>test</phase>
<goals>
<goal>build-classpath</goal>
<goal>copy-dependencies</goal>
</goals>
<phase>test</phase>
<configuration>
<outputFile>${project.parent.basedir}/target/cached_classpath.txt</outputFile>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
Expand All @@ -137,8 +134,7 @@
<configuration>
<properties>
<copyright-end-year>${build.year}</copyright-end-year>
<debug-print-included-work-info>${license.debug.print.included}
</debug-print-included-work-info>
<debug-print-included-work-info>${license.debug.print.included}</debug-print-included-work-info>
<bundled-dependencies>${license.bundles.dependencies}</bundled-dependencies>
<bundled-jquery>${license.bundles.jquery}</bundled-jquery>
<bundled-logo>${license.bundles.logo}</bundled-logo>
Expand All @@ -148,8 +144,7 @@
<resourceBundle>org.apache.hbase:hbase-resource-bundle:${hbase.version}</resourceBundle>
</resourceBundles>
<supplementalModelArtifacts>
<supplementalModelArtifact>org.apache.hbase:hbase-resource-bundle:${hbase.version}
</supplementalModelArtifact>
<supplementalModelArtifact>org.apache.hbase:hbase-resource-bundle:${hbase.version}</supplementalModelArtifact>
</supplementalModelArtifacts>
<supplementalModels>
<supplementalModel>supplemental-models.xml</supplementalModel>
Expand All @@ -168,18 +163,17 @@
<executions>
<execution>
<id>concat-NOTICE-files</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>env</executable>
<arguments>
<argument>bash</argument>
<argument>-c</argument>
<argument>cat maven-shared-archive-resources/META-INF/NOTICE \
`find ${project.build.directory}/dependency -iname NOTICE -or -iname NOTICE.txt`
</argument>
`find ${project.build.directory}/dependency -iname NOTICE -or -iname NOTICE.txt`</argument>
</arguments>
<outputFile>${project.build.directory}/NOTICE.aggregate</outputFile>
<workingDirectory>${project.build.directory}</workingDirectory>
Expand All @@ -206,16 +200,15 @@
<executions>
<execution>
<id>check-aggregate-license</id>
<!-- must check after LICENSE is built at 'generate-resources' -->
<phase>process-resources</phase>
<goals>
<goal>enforce</goal>
</goals>
<!-- must check after LICENSE is built at 'generate-resources' -->
<phase>process-resources</phase>
<configuration>
<rules>
<evaluateBeanshell>
<condition>
File license = new File("${license.aggregate.path}");
<condition>File license = new File("${license.aggregate.path}");

// Beanshell does not support try-with-resources,
// so we must close this scanner manually
Expand All @@ -228,12 +221,9 @@
}
}
scanner.close();
return true;
</condition>
<message>
License errors detected, for more detail find ERROR in
${license.aggregate.path}
</message>
return true;</condition>
<message>License errors detected, for more detail find ERROR in
${license.aggregate.path}</message>
</evaluateBeanshell>
</rules>
<skip>${skip.license.check}</skip>
Expand Down
2 changes: 1 addition & 1 deletion kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

Welcome to the HBase kafka proxy. The purpose of this proxy is to act as a _fake peer_.
It receives replication events from a peer cluster and applies a set of rules (stored in
a _kafka-route-rules.xml_ file) to determine if the event should be forwarded to a
a _kafka-route-rules.xml_ file) to determine if the event should be forwarded to a
kafka topic. If the mutation matches a rule, the mutation is converted to an avro object
and the item is placed into the topic.

Expand Down
77 changes: 38 additions & 39 deletions kafka/hbase-kafka-model/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<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">
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -38,17 +37,47 @@
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<versionRange>[1.7.7,)</versionRange>
<goals>
<goal>schema</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>
Expand All @@ -65,14 +94,14 @@
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java/</source>
</sources>
<sources>
<source>${project.build.directory}/generated-sources/java/</source>
</sources>
</configuration>
</execution>
</executions>
Expand All @@ -97,36 +126,6 @@
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<versionRange>[1.7.7,)</versionRange>
<goals>
<goal>schema</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<!-- Needs to make the profile in apache parent pom -->
Expand All @@ -140,10 +139,10 @@
<executions>
<execution>
<id>license-javadocs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
<resources>
Expand Down
51 changes: 25 additions & 26 deletions kafka/hbase-kafka-proxy/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<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">
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -37,28 +36,6 @@
<kafka-clients.version>2.0.0</kafka-clients.version>
<curator.version>4.2.0</curator.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<!--Make it so assembly:single does nothing in here-->
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -172,9 +149,9 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka-clients.version}</version>
<classifier>test</classifier>
<scope>test</scope>
<version>${kafka-clients.version}</version>
</dependency>
<!-- General dependencies -->
<dependency>
Expand All @@ -183,6 +160,28 @@
<version>${commons-lang3.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<!--Make it so assembly:single does nothing in here-->
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<!-- Needs to make the profile in apache parent pom -->
<profile>
Expand All @@ -195,10 +194,10 @@
<executions>
<execution>
<id>license-javadocs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
<resources>
Expand Down

0 comments on commit 5f0a9df

Please sign in to comment.