Skip to content

Commit

Permalink
PHOENIX-7442 Apply Spotless to reformat the entire codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
NihalJain committed Nov 6, 2024
1 parent 078071b commit 3ae0e76
Show file tree
Hide file tree
Showing 1,865 changed files with 270,396 additions and 270,748 deletions.
12 changes: 6 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ Building from source
On first setup, you may need to run `$ mvn install -DskipTests`
to install the local jars. This is a side-effect of multi-module maven projects

To re-generate the antlr based files:
To re-generate the antlr based files:
`$ mvn process-sources`

To build the jars and the assembly tarball:
To build the jars and the assembly tarball:
`$ mvn package`
and optionally, to just skip all the tests and build the jars:
and optionally, to just skip all the tests and build the jars:
`$ mvn package -DskipTests`

Note: javadocs are generated in target/apidocs
Expand All @@ -79,7 +79,7 @@ Phoenix, even within the same HBase minor release.
By default, Phoenix will be built for the latest known patch level of the latest HBase 2.x
minor release that Phoenix supports.

You can specify the targeted HBase minor release by setting the `hbase.profile` system property for
You can specify the targeted HBase minor release by setting the `hbase.profile` system property for
maven.

You can also specify the exact HBase release to build Phoenix with by additionally
Expand All @@ -102,7 +102,7 @@ Use the m2e eclipse plugin and do Import->Maven Project and just pick the root '
Running the tests
-----------------

All Unit Tests
All Unit Tests
`$ mvn clean test`

All Unit Tests and Integration tests (takes a few hours)
Expand Down Expand Up @@ -133,5 +133,5 @@ as well as each of the subprojects. (not every project has all reports)
Generate Apache Web Site
------------------------

checkout https://svn.apache.org/repos/asf/phoenix
checkout https://svn.apache.org/repos/asf/phoenix
`$ build.sh`
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ pipeline {
}
}
}
}
}
2 changes: 1 addition & 1 deletion Jenkinsfile.yetus
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ pipeline {
}
}
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ limitations under the License.

<b>[Apache Phoenix](http://phoenix.apache.org/)</b> is a SQL skin over HBase delivered as a client-embedded JDBC driver targeting low latency queries over HBase data. Visit the Apache Phoenix website <b>[here](http://phoenix.apache.org/)</b>.

Copyright ©2014 [Apache Software Foundation](http://www.apache.org/). All Rights Reserved.
Copyright ©2014 [Apache Software Foundation](http://www.apache.org/). All Rights Reserved.
2 changes: 1 addition & 1 deletion bin/end2endTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# !!! PLEASE READ !!!
# !!! Do NOT run the script against a prodcution cluster because it wipes out
# !!! existing data of the cluster
# !!! existing data of the cluster

from __future__ import print_function
import os
Expand Down
2 changes: 1 addition & 1 deletion bin/pherf-standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
phoenix_utils.phoenix_pherf_jar + \
'" -Dlog4j2.configurationFile=file:' + \
os.path.join(phoenix_utils.current_dir, "log4j2.properties") + \
" org.apache.phoenix.pherf.Pherf " + args
" org.apache.phoenix.pherf.Pherf " + args

os.execl("/bin/sh", "/bin/sh", "-c", java_cmd)
4 changes: 2 additions & 2 deletions bin/phoenix_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def find(pattern, classPaths):
# remove * if it's at the end of path
if ((path is not None) and (len(path) > 0) and (path[-1] == '*')) :
path = path[:-1]

for root, dirs, files in os.walk(path):
# sort the file names so *-client always precedes *-thin-client
files.sort()
for name in files:
if fnmatch.fnmatch(name, pattern):
return os.path.join(root, name)

return ""

def tryDecode(input):
Expand Down
2 changes: 1 addition & 1 deletion bin/psql.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
os.pathsep + phoenix_utils.logging_jar + \
os.pathsep + phoenix_utils.phoenix_client_embedded_jar + '" -Dlog4j2.configurationFile=file:' + \
os.path.join(phoenix_utils.current_dir, "log4j2.properties") + \
" org.apache.phoenix.util.PhoenixRuntime " + args
" org.apache.phoenix.util.PhoenixRuntime " + args

print(java_cmd)

Expand Down
9 changes: 4 additions & 5 deletions bin/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ SqlLine
https://github.com/julianhyde/sqlline

Execute SQL from command line. Sqlline manual is available at https://julianhyde.github.io/sqlline/manual.html
Usage:
$ sqlline.py <zookeeper> <optional_sql_file>
Example:

Usage:
$ sqlline.py <zookeeper> <optional_sql_file>
Example:
$ sqlline.py localhost
$ sqlline.py localhost <examples dir>/STOCK_SYMBOL.sql

Expand Down Expand Up @@ -47,4 +47,3 @@ Usage: hadoop jar phoneix-[version]-mapreduce.jar <parameters>
-s,--schema <arg> Phoenix schema name (optional)
-t,--table <arg> Phoenix table name (mandatory)
-z,--zookeeper <arg> Zookeeper quorum to connect to (optional)

2 changes: 1 addition & 1 deletion bin/traceserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
phoenix_utils.phoenix_traceserver_jar + os.pathsep + phoenix_utils.slf4j_backend_jar + os.pathsep + \
phoenix_utils.logging_jar + os.pathsep + \
phoenix_utils.phoenix_client_embedded_jar + os.pathsep + phoenix_utils.phoenix_queryserver_jar + \

" -Dproc_phoenixtraceserver" + \
" -Dlog4j2.configurationFile=file:" + os.path.join(phoenix_utils.current_dir, "log4j2.properties") + \
" -Dpsql.root.logger=%(root_logger)s" + \
Expand Down
2 changes: 1 addition & 1 deletion dev/PhoenixCodeTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,4 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>
</profiles>
2 changes: 1 addition & 1 deletion dev/cache-apache-project-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ echo "moving artifact into place at '${target}'"
mv "${working_dir}/artifact" "${target}.copying"
# attempt atomic move
mv "${target}.copying" "${target}"
echo "all done!"
echo "all done!"
2 changes: 1 addition & 1 deletion dev/create-release/release-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -771,4 +771,4 @@ function rebuild_hbase_for_omid() {
function rebuild_hbase_locally() {
local hbase_version="$1"
MAVEN_SETTINGS_FILE="$MAVEN_SETTINGS_FILE" "$SELF"/rebuild_hbase.sh "$hbase_version"
}
}
1 change: 0 additions & 1 deletion dev/jenkinsEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin
export MAVEN_OPTS="${MAVEN_OPTS:-"-Xmx3100M -XX:-UsePerfData -XX:MaxPermSize=256m"}"

ulimit -n

6 changes: 2 additions & 4 deletions dev/misc_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ The script also requires below inputs:

Example of script execution:
```
$ python3 dev/misc_utils/git_jira_fix_version_check.py
$ python3 dev/misc_utils/git_jira_fix_version_check.py
JIRA Project Name (e.g PHOENIX / OMID / TEPHRA etc): PHOENIX
First commit hash to start excluding commits from history: a2adf5e572c5a4bcccee7f8ac43bad6b84293ec6
Fix Version: 4.16.0
Jira server url (default: https://issues.apache.org/jira):
Jira server url (default: https://issues.apache.org/jira):
Path of project's working dir with release branch checked-in: /Users/{USER}/Documents/phoenix
Check git status output and verify expected branch
Expand Down Expand Up @@ -114,5 +114,3 @@ Completed diff: ##############################################
```


1 change: 0 additions & 1 deletion dev/rebuild_hbase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ cd hbase-$HBASE_VERSION
echo mvn ${SETTINGS[@]} clean install -Dhadoop.profile=3.0 -DskipTests -B $LOCALREPO
mvn ${SETTINGS[@]} clean install -Dhadoop.profile=3.0 -DskipTests -B $LOCALREPO
cd ${STARTDIR}

2 changes: 1 addition & 1 deletion dev/smart-apply-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if $PATCH -p0 -E --dry-run < $PATCH_FILE 2>&1 > $TMP; then
# correct place to put those files.

# NOTE 2014/07/17:
# Temporarily disabling below check since our jenkins boxes seems to be not defaulting to bash
# Temporarily disabling below check since our jenkins boxes seems to be not defaulting to bash
# causing below checks to fail. Once it is fixed, we can revert the commit and enable this again.

# TMP2=/tmp/tmp.paths.2.$$
Expand Down
20 changes: 10 additions & 10 deletions dev/test-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

set -x

### Setup some variables.
### Setup some variables.
### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch process
### Read variables from properties file
bindir=$(dirname $0)
Expand Down Expand Up @@ -160,7 +160,7 @@ parseArgs() {
### Check if $PATCH_DIR exists. If it does not exist, create a new directory
if [[ ! -e "$PATCH_DIR" ]] ; then
mkdir "$PATCH_DIR"
if [[ $? == 0 ]] ; then
if [[ $? == 0 ]] ; then
echo "$PATCH_DIR has been created"
else
echo "Unable to create $PATCH_DIR"
Expand Down Expand Up @@ -296,7 +296,7 @@ setup () {
VERSION=${GIT_COMMIT}_${defect}_PATCH-${patchNum}
findBranchNameFromPatchName ${relativePatchURL}
checkoutBranch
JIRA_COMMENT="Here are the results of testing the latest attachment
JIRA_COMMENT="Here are the results of testing the latest attachment
$patchURL
against ${BRANCH_NAME} branch at commit ${GIT_COMMIT}.
ATTACHMENT ID: ${ATTACHMENT_ID}"
Expand Down Expand Up @@ -485,7 +485,7 @@ applyPatch () {
echo "======================================================================"
echo ""
echo ""

export PATCH
$BASEDIR/dev/smart-apply-patch.sh $PATCH_DIR/patch
if [[ $? != 0 ]] ; then
Expand Down Expand Up @@ -786,7 +786,7 @@ checkFindbugsWarnings () {
echo "======================================================================"
echo ""
echo ""
echo "$MVN clean package findbugs:findbugs -D${PROJECT_NAME}PatchProcess"
echo "$MVN clean package findbugs:findbugs -D${PROJECT_NAME}PatchProcess"
export MAVEN_OPTS="${MAVEN_OPTS}"
$MVN clean package findbugs:findbugs -D${PROJECT_NAME}PatchProcess -DskipTests < /dev/null

Expand All @@ -797,7 +797,7 @@ checkFindbugsWarnings () {
return 1
fi

collectFindbugsReports patch $BASEDIR $PATCH_DIR
collectFindbugsReports patch $BASEDIR $PATCH_DIR
#this files are generated by collectFindbugsReports() named with its first argument
patch_xml=$PATCH_DIR/patchFindbugsWarnings.xml
trunk_xml=$PATCH_DIR/trunkFindbugsWarnings.xml
Expand Down Expand Up @@ -884,7 +884,7 @@ runTests () {
if [[ $? != 0 ]] ; then
### Find and format names of failed tests
failed_tests=`find . -name 'TEST*.xml' | xargs $GREP -l -E "<failure|<error" | sed -e "s|.*target/surefire-reports/TEST-| |g" | sed -e "s|\.xml||g"`

JIRA_COMMENT="$JIRA_COMMENT
{color:red}-1 core tests{color}. The patch failed these unit tests:
Expand Down Expand Up @@ -962,7 +962,7 @@ checkInjectSystemFaults () {
echo "======================================================================"
echo ""
echo ""

### Kill any rogue build processes from the last attempt
$PS auxwww | $GREP ${PROJECT_NAME}PatchProcess | $AWK '{print $2}' | /usr/bin/xargs -t -I {} /bin/kill -9 {} > /dev/null

Expand Down Expand Up @@ -1004,7 +1004,7 @@ $JIRA_COMMENT_FOOTER"
$comment"
$comment"

if [[ $JENKINS == "true" ]] ; then
echo ""
Expand Down Expand Up @@ -1099,7 +1099,7 @@ checkLineLengths
(( RESULT = RESULT + $? ))
# checkSiteXml
# (( RESULT = RESULT + $?))
### Do not call these when run by a developer
### Do not call these when run by a developer
if [[ $JENKINS == "true" ]] ; then
runTests
(( RESULT = RESULT + $? ))
Expand Down
Loading

0 comments on commit 3ae0e76

Please sign in to comment.