Skip to content

Conversation

@bharatviswa504
Copy link
Contributor

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

when maxContainer is 0 then (containerWithMinReplicas.get() / maxContainer) will throw exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In validate(), we call getCurrentContainerThreshold(),

 public double getCurrentContainerThreshold() {
    if (maxContainer == 0) {
      return 1;
    }
    return (containerWithMinReplicas.doubleValue() / maxContainer);
  }

  public boolean validate() {
    return getCurrentContainerThreshold() >= chillModeCutoff;
  }

So, if maxContainer=0, in validate() call, we get 1 from getCurrentContainerThreshold() and do >= check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Before validation we should add new report data to threshold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is added, suppose this rule is already satisfied, I don't need to process it, so that is the reason for the first check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the code with slight change.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should process data from this report before validating again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@bharatviswa504
Copy link
Contributor Author

Thank You @ajayydv for offline discussion.
Updated the code.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 26 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 _
+1 mvninstall 964 trunk passed
+1 compile 46 trunk passed
+1 checkstyle 21 trunk passed
+1 mvnsite 32 trunk passed
+1 shadedclient 703 branch has no errors when building and testing our client artifacts.
+1 findbugs 40 trunk passed
+1 javadoc 22 trunk passed
_ Patch Compile Tests _
+1 mvninstall 34 the patch passed
+1 compile 24 the patch passed
+1 javac 24 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 25 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 713 patch has no errors when building and testing our client artifacts.
+1 findbugs 47 the patch passed
+1 javadoc 21 the patch passed
_ Other Tests _
-1 unit 129 server-scm in the patch failed.
+1 asflicense 28 The patch does not generate ASF License warnings.
2974
Reason Tests
Failed junit tests hadoop.hdds.scm.chillmode.TestSCMChillModeManager
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-534/1/artifact/out/Dockerfile
GITHUB PR #534
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 29f0611fd368 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / cb0fa0c
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-534/1/artifact/out/patch-unit-hadoop-hdds_server-scm.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-534/1/testReport/
Max. process+thread count 531 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-534/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 24 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 _
+1 mvninstall 1073 trunk passed
+1 compile 43 trunk passed
+1 checkstyle 19 trunk passed
+1 mvnsite 29 trunk passed
+1 shadedclient 641 branch has no errors when building and testing our client artifacts.
+1 findbugs 42 trunk passed
+1 javadoc 24 trunk passed
_ Patch Compile Tests _
+1 mvninstall 35 the patch passed
+1 compile 24 the patch passed
+1 javac 24 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 27 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 730 patch has no errors when building and testing our client artifacts.
+1 findbugs 46 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 132 server-scm in the patch passed.
+1 asflicense 28 The patch does not generate ASF License warnings.
3049
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-534/2/artifact/out/Dockerfile
GITHUB PR #534
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux a39858692bb7 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / cb0fa0c
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-534/2/testReport/
Max. process+thread count 560 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-534/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@arp7 arp7 left a comment

Choose a reason for hiding this comment

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

The patch looks good to me. I assume we don't need new unit tests since this is just refactoring and the existing unit tests are sufficient?

@ajayydv are you okay with the latest patch?

@ajayydv
Copy link
Contributor

ajayydv commented Mar 5, 2019

LGTM. +1

@ajayydv ajayydv merged commit 313e8b9 into apache:trunk Mar 5, 2019
asfgit pushed a commit that referenced this pull request Mar 5, 2019
#534)

* HDDS-1193. Refactor ContainerChillModeRule and DatanodeChillMode rule.

(cherry picked from commit 313e8b9)
shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
Samza currently depends on httpclient 4.5.2 and httpcore 4.4.5. However, httpclient 4.5.2 also has a direct dependency on httpcore 4.4.4, which is not backwards compatible with httpcore 4.4.5 since some classes were removed (e.g. ThreadSafe/NotThreadSafe annotation classes).

Although this does not currently cause any direct build problems, there may be cases where this conflict introduces transitive dependency conflicts. In addition, this inconsistency can cause confusion in future development if those libraries need to be used.

Author: Cameron Lee <[email protected]>

Reviewers: Jagadish Venkatraman <[email protected]>, Shanthoosh Venkatraman <[email protected]>

Closes apache#534 from cameronlee314/httpcore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants