Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-28006 Run spotless:apply on code base #120

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.

1 change: 1 addition & 0 deletions dev-support/.scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ importSelectors = "singleLine"
optIn = {
configStyleArguments = false
}
newlines.beforeCurlyLambdaParams = true
danglingParentheses.preset = false
docstrings.style = Asterisk
# See https://github.com/scalameta/scalafmt/issues/1387
Expand Down
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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm fan of the old version, in two lines.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can fix it in HBASE-28007

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but this is how our current settings for pom formatting does (See in hbase repo: https://github.com/apache/hbase/blob/ab4b1d884f13d082a0906c3c3e9ec96bce7f3717/pom.xml#L1)

I have not tried to add any delta change in settings for java and scripts formatting and aligned the with hbase here?

Is it fine to take this as another change, across hbase project, where we tweak these settings globally?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then, just follow hbase

<!--
/**
* 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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

<!--
/**
* 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