Skip to content

Conversation

@heary-cao
Copy link
Contributor

@heary-cao heary-cao commented Jul 6, 2017

What changes were proposed in this pull request?

Currently, some of the configuration parameters of spark.internal.config without adding checkValue function, which is incorrect, this PR will be add checkValue for the configuration parameters.

How was this patch tested?

existing test and add a new test case.

@heary-cao
Copy link
Contributor Author

heary-cao commented Jul 6, 2017

cc @cloud-fan , @srowen

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also check for other configs in this file and add checkValues as much as possible? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK,
please review it again.
thanks.

Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove 's'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove it.
thanks.
please review it again.

Copy link
Member

Choose a reason for hiding this comment

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

ditto.

@jiangxb1987
Copy link
Contributor

Please also update the PR description. Thanks!

@cloud-fan
Copy link
Contributor

ok to test

Copy link
Contributor

Choose a reason for hiding this comment

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

boolean conf doesn't need checkValue...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks.
please review it again.

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 also mention that, if no unit is given, e.g. 500, it means 500mb. We also need to update configuration.md for this conf.

Copy link
Contributor

Choose a reason for hiding this comment

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

nvm, we should not mention that and always ask users to add unit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK.

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

check if >= 0?

Copy link
Contributor

Choose a reason for hiding this comment

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

check if >= 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be a bit out of place.
In org.apache.spark.ExecutorAllocationManagerSuite.scala
val conf2 = conf.clone().set("spark.dynamicAllocation.maxExecutors", "-1")
Why is this value set less than zero?
Not yet understood.

Copy link
Member

Choose a reason for hiding this comment

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

This is the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

should be greater than 0

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@SparkQA
Copy link

SparkQA commented Jul 8, 2017

Test build #79361 has finished for PR 18555 at commit b19b378.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 8, 2017

Test build #79364 has finished for PR 18555 at commit 6512814.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually Configuration like spark.dynamicAllocation.minExecutors already has check validation logics in the code where honors it (ExecutorAllocationManager). So probably checking here again makes duplication.

Also one limitation here for checking validation is that it could only verify the validity of single configuration, but for some confs like spark.dynamicAllocation.minExecutors they should be verified with other confs like spark.dynamicAllocation.minExecutors <= xxxx.initialExecutors <= xxx.maxExecutors.

Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

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

I think we should create a JIRA for this issue, it is not so minor I think.

Also as I mentioned before there exists the checking duplication here and the code uses it.

Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC, Should it here be Int.MaxValue / 1024?

Copy link
Contributor Author

@heary-cao heary-cao Jul 9, 2017

Choose a reason for hiding this comment

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

sorry .
have update it.
thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it more accurate to use MiB instead of MB here? also please add WS like 0 MiB.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please unify this style to one for all the checks if possible, like _ > 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should let user to decide whether to bind to a privileged port. Taking an assumption here may potentially break some use cases.

Copy link
Member

Choose a reason for hiding this comment

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

+1 on ^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jerryshao , @HyukjinKwon
Because of the same port control at startServiceOnPort, do we need to open it here?

def startServiceOnPort[T](
startPort: Int,
startService: Int => (T, Int),
conf: SparkConf,
serviceName: String = ""): (T, Int) = {

require(startPort == 0 || (1024 <= startPort && startPort < 65536),
  "startPort should be between 1024 and 65535 (inclusive), or 0 for a random free port.")
 
 ...

}

Copy link
Member

Choose a reason for hiding this comment

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

Ah, do you mean the check was already there and the current change just brings it ahead to make it fail fast? If so, that's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, thanks!

@gatorsmile
Copy link
Member

Please open a JIRA for this PR

@jiangxb1987
Copy link
Contributor

We should also check for duplicated config check value logics in the code, but I think these could be addressed in a follow-up PR.

@heary-cao heary-cao changed the title [Minor]add checkValue in spark.internal.config about how to correctly set configurations [SPARK-21353][CORE]add checkValue in spark.internal.config about how to correctly set configurations Jul 9, 2017
@SparkQA
Copy link

SparkQA commented Jul 9, 2017

Test build #79421 has finished for PR 18555 at commit 5040998.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 1, 2017

Test build #80117 has finished for PR 18555 at commit 92d86b2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member

Thanks! @heary-cao

cc @jiangxb1987 Could you take a look to ensure no behavior change will be caused by this PR?

Copy link
Contributor

@jiangxb1987 jiangxb1987 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the effort @heary-cao !

@heary-cao
Copy link
Contributor Author

@jiangxb1987
thanks.

@heary-cao heary-cao force-pushed the driver_host branch 2 times, most recently from 46f1439 to 3135235 Compare August 11, 2017 07:51
@SparkQA
Copy link

SparkQA commented Aug 11, 2017

Test build #80540 has finished for PR 18555 at commit 3135235.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@heary-cao
Copy link
Contributor Author

cc @gatorsmile

@vanzin
Copy link
Contributor

vanzin commented Dec 12, 2017

retest this please

@SparkQA
Copy link

SparkQA commented Dec 12, 2017

Test build #84786 has finished for PR 18555 at commit 3135235.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 2, 2018

Test build #86961 has finished for PR 18555 at commit cac5c03.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 3, 2018

Test build #87024 has finished for PR 18555 at commit c213be6.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@heary-cao
Copy link
Contributor Author

retest this please

@HyukjinKwon
Copy link
Member

ok to test

@HyukjinKwon
Copy link
Member

retest this please

@HyukjinKwon
Copy link
Member

Seems #18555 (comment) is missed.

@SparkQA
Copy link

SparkQA commented Feb 4, 2018

Test build #87048 has finished for PR 18555 at commit c213be6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 5, 2018

Test build #87053 has finished for PR 18555 at commit a0efb41.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@heary-cao
Copy link
Contributor Author

cc @HyukjinKwon,@cloud-fan

@HyukjinKwon
Copy link
Member

Hmm .. why not addressing #18555 (comment)? I think that comment makes sense.

@heary-cao
Copy link
Contributor Author

cc @HyukjinKwon,

@HyukjinKwon
Copy link
Member

Seems fine.

@HyukjinKwon
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Jun 9, 2018

Test build #91602 has finished for PR 18555 at commit a0efb41.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@heary-cao heary-cao closed this Jul 24, 2018
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.

10 participants