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

scala黑魔法 #84

myyyy opened this issue Dec 29, 2018 · 0 comments

scala黑魔法 #84

myyyy opened this issue Dec 29, 2018 · 0 comments


Copy link

@myyyy myyyy commented Dec 29, 2018

  1. val powerId: Int = scala.util.Try(f._2.trim.toInt).getOrElse(0) // 当f._2.trim.toInt 出现异常就会使用getOrElse中的默认值
@myyyy myyyy added the Spark label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.