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

[ML-186]Support CDH spark versions #199

Closed
wants to merge 1 commit into from

Conversation

minmingzhu
Copy link
Collaborator

Signed-off-by: minmingzhu minming.zhu@intel.com

What changes were proposed in this pull request?

closes #186

Does this PR also require the following changes?

  • CI
  • Documentation
  • Example

No.

Signed-off-by: minmingzhu <minming.zhu@intel.com>
@github-actions
Copy link

#186

@@ -31,7 +31,16 @@ trait NaiveBayesShim extends Logging {
object NaiveBayesShim extends Logging {
def create(uid: String): NaiveBayesShim = {
logInfo(s"Loading NaiveBayes for Spark $SPARK_VERSION")
val shim = SPARK_VERSION match {
// For example: CHD spark version was 3.1.1.3.1.7290.5-2.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// For example: CHD spark version was 3.1.1.3.1.7290.5-2.
// For example: CDH spark version is 3.1.1.3.1.7290.5-2.

@@ -31,7 +31,16 @@ trait NaiveBayesShim extends Logging {
object NaiveBayesShim extends Logging {
def create(uid: String): NaiveBayesShim = {
logInfo(s"Loading NaiveBayes for Spark $SPARK_VERSION")
val shim = SPARK_VERSION match {
// For example: CHD spark version was 3.1.1.3.1.7290.5-2.
// Intercepting the third decimal point is the spark version.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Intercepting the third decimal point is the spark version.
// The string before the third dot is the spark version.

@xwu99
Copy link
Collaborator

xwu99 commented Apr 1, 2022

You just added CDH support for Naive Bayes only, other algorithms are needed as well.
I suggest change SPARK_VERSION to some utility getSparkVersion function and process version string inside the function then the rest of the code remain intact.

@xwu99
Copy link
Collaborator

xwu99 commented Apr 7, 2022

Use #197 instead

@xwu99 xwu99 closed this Apr 7, 2022
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.

[Core] Support CDH versions
2 participants