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

HADOOP-16256: HTTPFileSystem disallows users from configuring the connectionTimeout and readTimeout of HttpClient #774

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

shanthoosh
Copy link

No description provided.

…nectionTimeout and readTimeout of HttpClient.
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 25 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
0 mvndep 23 Maven dependency ordering for branch
+1 mvninstall 1139 trunk passed
+1 compile 1083 trunk passed
+1 checkstyle 142 trunk passed
+1 mvnsite 136 trunk passed
+1 shadedclient 1051 branch has no errors when building and testing our client artifacts.
+1 findbugs 192 trunk passed
+1 javadoc 115 trunk passed
_ Patch Compile Tests _
0 mvndep 23 Maven dependency ordering for patch
+1 mvninstall 93 the patch passed
+1 compile 1008 the patch passed
+1 javac 1008 the patch passed
-0 checkstyle 138 root: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0)
+1 mvnsite 121 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 727 patch has no errors when building and testing our client artifacts.
+1 findbugs 224 the patch passed
+1 javadoc 110 the patch passed
_ Other Tests _
+1 unit 531 hadoop-common in the patch passed.
+1 unit 224 hadoop-yarn-common in the patch passed.
+1 asflicense 41 The patch does not generate ASF License warnings.
7114
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-774/1/artifact/out/Dockerfile
GITHUB PR #774
JIRA Issue HADOOP-16256
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml
uname Linux 33fe84c85b1f 4.4.0-143-generic #169~14.04.2-Ubuntu SMP Wed Feb 13 15:00:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / b5dcf64
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-774/1/artifact/out/diff-checkstyle-root.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-774/1/testReport/
Max. process+thread count 1453 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-774/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@@ -57,7 +64,14 @@ public URI getUri() {

@Override
public FSDataInputStream open(Path path, int bufferSize) throws IOException {
int httpConnectTimeoutInMillis = conf.getInt(CONF_HTTP_CONNECT_TIMEOUT, DEFAULT_HTTP_CONNECT_TIMEOUT_IN_MILLIS);
int httpReadTimeoutInMillis = conf.getInt(CONF_HTTP_READ_TIMEOUT, DEFAULT_HTTP_READ_TIMEOUT_IN_MILLIS);
Preconditions.checkState(httpConnectTimeoutInMillis > 0, "Http connection timeout has to greater than zero.");
Copy link
Contributor

Choose a reason for hiding this comment

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

better:

"Invalid value of " + CONF_HTTP_CONNECT_TIMEOUT +": %d ", httpConnectTimeoutInMillis)

This lists the property name and the actual value set.

int httpConnectTimeoutInMillis = conf.getInt(CONF_HTTP_CONNECT_TIMEOUT, DEFAULT_HTTP_CONNECT_TIMEOUT_IN_MILLIS);
int httpReadTimeoutInMillis = conf.getInt(CONF_HTTP_READ_TIMEOUT, DEFAULT_HTTP_READ_TIMEOUT_IN_MILLIS);
Preconditions.checkState(httpConnectTimeoutInMillis > 0, "Http connection timeout has to greater than zero.");
Preconditions.checkState(httpReadTimeoutInMillis > 0, "Http read timeout has to greater than zero.");
Copy link
Contributor

Choose a reason for hiding this comment

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

+Same here

@@ -39,13 +40,19 @@
abstract class AbstractHttpFileSystem extends FileSystem {
private static final long DEFAULT_BLOCK_SIZE = 4096;
private static final Path WORKING_DIR = new Path("/");
private static final String CONF_HTTP_READ_TIMEOUT = "yarn.nodemanager.localizer.http.read.timeout.ms";
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. these should be somewhere where they can be referred to in code, such as a new class HttpFileSystemConstants
  2. And their name must be that of the filesystem class, not anything related to the RM.


Configuration conf = new Configuration(false);
conf.set("fs.http.impl", HttpFileSystem.class.getCanonicalName());
conf.set("yarn.nodemanager.localizer.http.connect.timeout.ms", "-1");
Copy link
Contributor

Choose a reason for hiding this comment

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

use the values set in HttpFileSystemConstants

@steveloughran
Copy link
Contributor

Code looks good, tests look great.

Key comments

  • Move the constants into their own class HttpFileSystemConstants
  • and give them relevant names
  • Then reference these in the tests
  • Then add the default values to core-default.xml with descriptions so that generated documentation lists them. We want people to use them, after all

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 38 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
0 mvndep 26 Maven dependency ordering for branch
+1 mvninstall 1017 trunk passed
+1 compile 974 trunk passed
+1 checkstyle 139 trunk passed
+1 mvnsite 143 trunk passed
+1 shadedclient 1013 branch has no errors when building and testing our client artifacts.
+1 javadoc 130 trunk passed
0 spotbugs 111 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 229 trunk passed
_ Patch Compile Tests _
0 mvndep 24 Maven dependency ordering for patch
+1 mvninstall 85 the patch passed
+1 compile 936 the patch passed
+1 javac 936 the patch passed
-0 checkstyle 144 root: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0)
+1 mvnsite 140 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 689 patch has no errors when building and testing our client artifacts.
+1 javadoc 125 the patch passed
+1 findbugs 255 the patch passed
_ Other Tests _
+1 unit 545 hadoop-common in the patch passed.
+1 unit 244 hadoop-yarn-common in the patch passed.
+1 asflicense 49 The patch does not generate ASF License warnings.
6963
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-774/11/artifact/out/Dockerfile
GITHUB PR #774
JIRA Issue HADOOP-16256
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml
uname Linux d34a2a990638 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 915cbc9
Default Java 1.8.0_222
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-774/11/artifact/out/diff-checkstyle-root.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-774/11/testReport/
Max. process+thread count 1600 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-774/11/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@apache apache deleted a comment from hadoop-yetus Sep 3, 2019
@steveloughran
Copy link
Contributor

Patch still has outstanding suggestions and checkstyle issues. Other than that I'm happy with it

shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
…sage __key__ to accept any format

Author: Aditya Toomula <atoomula@linkedin.com>

Reviewers: Srinivasulu Punuru <spunuru@linkedin.com>

Closes apache#774 from atoomula/keyformat
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 5s #774 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
GITHUB PR #774
JIRA Issue HADOOP-16256
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-774/3/console
versions git=2.17.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 5s #774 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
GITHUB PR #774
JIRA Issue HADOOP-16256
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-774/4/console
versions git=2.17.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants