Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions dev-support/jenkins/hbase-personality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,54 @@ function hb_maven_modules_worker {

# } End workaround stuff caused by our need for a package phase to run
# on hbase-spark-protocol and hbase-spark-protocol-shaded

######################################
# Below plugin is copied from https://github.com/apache/hbase/blob/master/dev-support/hbase-personality.sh
######################################

add_test_type spotless

## @description spotless file filter
## @audience private
## @stability evolving
## @param filename
function spotless_filefilter
{
# always add spotless check as it can format almost all types of files
add_test spotless
}
## @description run spotless:check to check format issues
## @audience private
## @stability evolving
## @param repostatus
function spotless_rebuild
{
local repostatus=$1
local logfile="${PATCH_DIR}/${repostatus}-spotless.txt"

if ! verify_needed_test spotless; then
return 0
fi

big_console_header "Checking spotless on ${repostatus}"

start_clock

local -a maven_args=('spotless:check')

# disabled because "maven_executor" needs to return both command and args
# shellcheck disable=2046
echo_and_redirect "${logfile}" $(maven_executor) "${maven_args[@]}"

count=$(${GREP} -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then
add_vote_table -1 spotless "${repostatus} has ${count} errors when running spotless:check, run spotless:apply to fix."
add_footer_table spotless "@@BASE@@/${repostatus}-spotless.txt"
return 1
fi

add_vote_table +1 spotless "${repostatus} has no errors when running spotless:check."
return 0
}

######################################
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ public void runLoad() throws Exception {
* @throws Exception if an HBase operation or getting the test directory fails
*/
public void runLinkedListSparkJob(int iteration) throws Exception {
String jobName = IntegrationTestSparkBulkLoad.class.getSimpleName() + " _load "
String
jobName =
IntegrationTestSparkBulkLoad.class.getSimpleName() + " _load "
+ EnvironmentEdgeManager.currentTime();

LOG.info("Running iteration " + iteration + "in Spark Job");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ class UserCustomizedSampleException(message: String = null, cause: Throwable = n

@InterfaceAudience.Private
object UserCustomizedSampleException {
def message(message: String, cause: Throwable) =
if (message != null) message
def
message(message: String, cause: Throwable) =
if
(message != null) message
else if (cause != null) cause.toString()
else null
}
Expand Down