Skip to content

Commit

Permalink
Merge branch 'trunk' into possible-resource-leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Nargeshdb committed Mar 15, 2021
2 parents 484b88e + 9b2f812 commit eca37b1
Show file tree
Hide file tree
Showing 188 changed files with 3,832 additions and 666 deletions.
2 changes: 1 addition & 1 deletion BUILDING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Maven build goals:
* Compile : mvn compile [-Pnative]
* Run tests : mvn test [-Pnative] [-Pshelltest]
* Create JAR : mvn package
* Run findbugs : mvn compile findbugs:findbugs
* Run spotbugs : mvn compile spotbugs:spotbugs
* Run checkstyle : mvn compile checkstyle:checkstyle
* Install JAR in M2 cache : mvn install
* Deploy JAR to Maven repo : mvn deploy
Expand Down
8 changes: 4 additions & 4 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.9.9
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.9
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9
com.fasterxml.uuid:java-uuid-generator:3.1.4
com.fasterxml.woodstox:woodstox-core:5.0.3
com.fasterxml.woodstox:woodstox-core:5.3.0
com.github.davidmoten:rxjava-extras:0.8.0.17
com.github.stephenc.jcip:jcip-annotations:1.0-1
com.google:guice:4.0
Expand Down Expand Up @@ -366,7 +366,7 @@ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanage

com.github.luben:zstd-jni:1.4.3-1
dnsjava:dnsjava:2.1.7
org.codehaus.woodstox:stax2-api:3.1.4
org.codehaus.woodstox:stax2-api:4.2.1


BSD 3-Clause
Expand Down Expand Up @@ -468,8 +468,8 @@ com.microsoft.azure:azure-cosmosdb-gateway:2.4.5
com.microsoft.azure:azure-data-lake-store-sdk:2.3.3
com.microsoft.azure:azure-keyvault-core:1.0.0
com.microsoft.sqlserver:mssql-jdbc:6.2.1.jre7
org.bouncycastle:bcpkix-jdk15on:1.60
org.bouncycastle:bcprov-jdk15on:1.60
org.bouncycastle:bcpkix-jdk15on:1.68
org.bouncycastle:bcprov-jdk15on:1.68
org.checkerframework:checker-qual:2.5.2
org.codehaus.mojo:animal-sniffer-annotations:1.17
org.jruby.jcodings:jcodings:1.0.13
Expand Down
14 changes: 9 additions & 5 deletions dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pipeline {
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile"
YETUS='yetus'
// Branch or tag name. Yetus release tags are 'rel/X.Y.Z'
YETUS_VERSION='rel/0.13.0'
YETUS_VERSION='11eb9b09786e401fbdeaa3be83a19a4066fd7813'
}

parameters {
Expand All @@ -60,7 +60,7 @@ pipeline {
stage ('precommit-run') {
steps {
withCredentials(
[usernamePassword(credentialsId: '683f5dcf-5552-4b28-9fb1-6a6b77cf53dd',
[usernamePassword(credentialsId: 'apache-hadoop-at-github.com',
passwordVariable: 'GITHUB_TOKEN',
usernameVariable: 'GITHUB_USER'),
usernamePassword(credentialsId: 'hadoopqa-at-asf-jira',
Expand Down Expand Up @@ -120,11 +120,11 @@ pipeline {
YETUS_ARGS+=("--proclimit=5500")
YETUS_ARGS+=("--dockermemlimit=22g")
# -1 findbugs issues that show up prior to the patch being applied
YETUS_ARGS+=("--findbugs-strict-precheck")
# -1 spotbugs issues that show up prior to the patch being applied
YETUS_ARGS+=("--spotbugs-strict-precheck")
# rsync these files back into the archive dir
YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,findbugsXml.xml")
YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,spotbugsXml.xml")
# URL for user-side presentation in reports and such to our artifacts
# (needs to match the archive bits below)
Expand Down Expand Up @@ -157,6 +157,10 @@ pipeline {
# custom javadoc goals
YETUS_ARGS+=("--mvn-javadoc-goals=process-sources,javadoc:javadoc-no-fork")
# write Yetus report as GitHub comment (YETUS-1102)
YETUS_ARGS+=("--github-write-comment")
YETUS_ARGS+=("--github-use-emoji-vote")
"${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
'''
}
Expand Down
4 changes: 2 additions & 2 deletions dev-support/bin/hadoop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ function personality_file_tests
fi

if [[ ${filename} =~ \.java$ ]]; then
add_test findbugs
add_test spotbugs
fi
}

Expand Down Expand Up @@ -550,7 +550,7 @@ function shadedclient_rebuild
echo_and_redirect "${logfile}" \
"${MAVEN}" "${MAVEN_ARGS[@]}" verify -fae --batch-mode -am \
"${modules[@]}" \
-Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true
-Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true

count=$("${GREP}" -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion dev-support/bin/test-patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.

BINDIR=$(cd -P -- "$(dirname -- "${BASH_SOURCE-0}")" >/dev/null && pwd -P)
exec "${BINDIR}/yetus-wrapper" test-patch --project=hadoop --skip-dir=dev-support "$@"
exec "${BINDIR}/yetus-wrapper" test-patch --project=hadoop --skip-dirs=dev-support "$@"
12 changes: 10 additions & 2 deletions dev-support/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ RUN apt-get -q update \
cmake \
curl \
doxygen \
findbugs \
fuse \
g++ \
gcc \
Expand Down Expand Up @@ -92,7 +91,16 @@ RUN apt-get -q update \
ENV MAVEN_HOME /usr
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV FINDBUGS_HOME /usr

#######
# Install SpotBugs 4.2.2
#######
RUN mkdir -p /opt/spotbugs \
&& curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.2.2/spotbugs-4.2.2.tgz \
-o /opt/spotbugs.tgz \
&& tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \
&& chmod +x /opt/spotbugs/bin/*
ENV SPOTBUGS_HOME /opt/spotbugs

#######
# Install Boost 1.72 (1.71 ships with Focal)
Expand Down
12 changes: 10 additions & 2 deletions dev-support/docker/Dockerfile_aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apt-get -q update \
cmake \
curl \
doxygen \
findbugs \
fuse \
g++ \
gcc \
Expand Down Expand Up @@ -96,7 +95,16 @@ RUN apt-get -q update \
ENV MAVEN_HOME /usr
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
ENV FINDBUGS_HOME /usr

#######
# Install SpotBugs 4.2.2
#######
RUN mkdir -p /opt/spotbugs \
&& curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.2.2/spotbugs-4.2.2.tgz \
-o /opt/spotbugs.tgz \
&& tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \
&& chmod +x /opt/spotbugs/bin/*
ENV SPOTBUGS_HOME /opt/spotbugs

#######
# Install Boost 1.72 (1.71 ships with Focal)
Expand Down
5 changes: 2 additions & 3 deletions hadoop-cloud-storage-project/hadoop-cos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import java.util.HashMap;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListeningExecutorService;

import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
Expand Down Expand Up @@ -71,8 +71,8 @@ public class CosNFileSystem extends FileSystem {
private String owner = "Unknown";
private String group = "Unknown";

private ListeningExecutorService boundedIOThreadPool;
private ListeningExecutorService boundedCopyThreadPool;
private ExecutorService boundedIOThreadPool;
private ExecutorService boundedCopyThreadPool;

public CosNFileSystem() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.hadoop.fs.obs;

import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting;
import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListeningExecutorService;
import com.obs.services.ObsClient;
import com.obs.services.exception.ObsException;
import com.obs.services.model.AccessControlList;
Expand Down Expand Up @@ -53,6 +52,7 @@
import java.io.IOException;
import java.net.URI;
import java.util.EnumSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -169,7 +169,7 @@ public final class OBSFileSystem extends FileSystem {
/**
* Bounded thread pool for multipart upload.
*/
private ListeningExecutorService boundedMultipartUploadThreadPool;
private ExecutorService boundedMultipartUploadThreadPool;

/**
* Bounded thread pool for copy.
Expand Down
4 changes: 2 additions & 2 deletions hadoop-common-project/hadoop-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
Expand Down
4 changes: 0 additions & 4 deletions hadoop-common-project/hadoop-common/src/main/bin/hadoop
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function hadoop_usage
hadoop_add_subcommand "kerbname" client "show auth_to_local principal conversion"
hadoop_add_subcommand "key" client "manage keys via the KeyProvider"
hadoop_add_subcommand "registrydns" daemon "run the registry DNS server"
hadoop_add_subcommand "trace" client "view and modify Hadoop tracing settings"
hadoop_add_subcommand "version" client "print the version"
hadoop_add_subcommand "kdiag" client "Diagnose Kerberos Problems"
hadoop_add_subcommand "rbfbalance" client "move directories and files across router-based federation namespaces"
Expand Down Expand Up @@ -166,9 +165,6 @@ function hadoopcmd_case
HADOOP_SECURE_CLASSNAME='org.apache.hadoop.registry.server.dns.PrivilegedRegistryDNSStarter'
HADOOP_CLASSNAME='org.apache.hadoop.registry.server.dns.RegistryDNSServer'
;;
trace)
HADOOP_CLASSNAME=org.apache.hadoop.tracing.TraceAdmin
;;
version)
HADOOP_CLASSNAME=org.apache.hadoop.util.VersionInfo
;;
Expand Down
7 changes: 1 addition & 6 deletions hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ call :updatepath %HADOOP_BIN_PATH%
exit /b
)

set corecommands=fs version jar checknative conftest distch distcp daemonlog archive classpath credential kerbname key trace kdiag
set corecommands=fs version jar checknative conftest distch distcp daemonlog archive classpath credential kerbname key kdiag
for %%i in ( %corecommands% ) do (
if %hadoop-command% == %%i set corecommand=true
)
Expand Down Expand Up @@ -244,10 +244,6 @@ call :updatepath %HADOOP_BIN_PATH%
set CLASS=org.apache.hadoop.crypto.key.KeyShell
goto :eof

:trace
set CLASS=org.apache.hadoop.tracing.TraceAdmin
goto :eof

:updatepath
set path_to_add=%*
set current_path_comparable=%path%
Expand Down Expand Up @@ -318,7 +314,6 @@ call :updatepath %HADOOP_BIN_PATH%
@echo kerbname show auth_to_local principal conversion
@echo kdiag diagnose kerberos problems
@echo key manage keys via the KeyProvider
@echo trace view and modify Hadoop tracing settings
@echo daemonlog get/set the log level for each daemon
@echo or
@echo CLASSNAME run the class named CLASSNAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic {
public static final String IPC_CLIENT_RPC_TIMEOUT_KEY =
"ipc.client.rpc-timeout.ms";
/** Default value for IPC_CLIENT_RPC_TIMEOUT_KEY. */
public static final int IPC_CLIENT_RPC_TIMEOUT_DEFAULT = 0;
public static final int IPC_CLIENT_RPC_TIMEOUT_DEFAULT = 120000;
/** Responses larger than this will be logged */
public static final String IPC_SERVER_RPC_MAX_RESPONSE_SIZE_KEY =
"ipc.server.max.response.size";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public static class Touch extends TouchCommands {
public static final String NAME = "touch";
public static final String USAGE = "[-" + OPTION_CHANGE_ONLY_ACCESS_TIME
+ "] [-" + OPTION_CHANGE_ONLY_MODIFICATION_TIME + "] [-"
+ OPTION_USE_TIMESTAMP + " TIMESTAMP ] [-" + OPTION_DO_NOT_CREATE_FILE
+ "] <path> ...";
+ OPTION_USE_TIMESTAMP + " TIMESTAMP (yyyyMMdd:HHmmss) ] "
+ "[-" + OPTION_DO_NOT_CREATE_FILE + "] <path> ...";
public static final String DESCRIPTION =
"Updates the access and modification times of the file specified by the"
+ " <path> to the current time. If the file does not exist, then a zero"
Expand All @@ -114,7 +114,8 @@ public static class Touch extends TouchCommands {
+ OPTION_CHANGE_ONLY_MODIFICATION_TIME
+ " Change only the modification time \n" + "-"
+ OPTION_USE_TIMESTAMP + " TIMESTAMP"
+ " Use specified timestamp (in format yyyyMMddHHmmss) instead of current time \n"
+ " Use specified timestamp instead of current time\n"
+ " TIMESTAMP format yyyyMMdd:HHmmss\n"
+ "-" + OPTION_DO_NOT_CREATE_FILE + " Do not create any files";

private boolean changeModTime = false;
Expand Down Expand Up @@ -183,7 +184,8 @@ private void updateTime(PathData item) throws IOException {
time = dateFormat.parse(timestamp).getTime();
} catch (ParseException e) {
throw new IllegalArgumentException(
"Unable to parse the specified timestamp " + timestamp, e);
"Unable to parse the specified timestamp "+ timestamp
+ ". The expected format is " + dateFormat.toPattern(), e);
}
}
if (changeModTime ^ changeAccessTime) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.MoreExecutors;

import org.apache.hadoop.classification.InterfaceAudience;

/**
Expand Down Expand Up @@ -105,8 +103,7 @@ public Thread newThread(Runnable r) {

private BlockingThreadPoolExecutorService(int permitCount,
ThreadPoolExecutor eventProcessingExecutor) {
super(MoreExecutors.listeningDecorator(eventProcessingExecutor),
permitCount, false);
super(eventProcessingExecutor, permitCount, false);
this.eventProcessingExecutor = eventProcessingExecutor;
}

Expand Down
Loading

0 comments on commit eca37b1

Please sign in to comment.