Skip to content

Conversation

liu-zhaokun
Copy link
Contributor

https://issues.apache.org/jira/browse/SPARK-21662
As it says "If user doesn't specify the appName, we want to get [SparkSQL::localHostName]" in SparkSqlEnv.scala,line 38,appname should be SparkSQL::localHostName,but it is SparkSQL::lP in fact.So I modify the localHostName method to get localhost with getCanonicalHostName method.

@liu-zhaokun
Copy link
Contributor Author

Can one of the admins verify this patch?

@jiangxb1987
Copy link
Contributor

I'm not convinced this deserves a separated PR because it's neither bugfix nor any improvement. Further more, the method Utils.localHostName() is used in many other places, we can't change this unless we have investigated on each place it appears.

@srowen
Copy link
Member

srowen commented Aug 9, 2017

The method name is misleading internally, but we can't change this logic.

@liu-zhaokun
Copy link
Contributor Author

@srowen @jiangxb1987
If we can't change this logic,I think we should change the annotation,because it says "If user doesn't specify the appName, we want to get [SparkSQL::localHostName]" ,it isn't in line with the facts.

@liu-zhaokun
Copy link
Contributor Author

@srowen
I have modified the annotation,would you like to review it?

if (sqlContext == null) {
val sparkConf = new SparkConf(loadDefaults = true)
// If user doesn't specify the appName, we want to get [SparkSQL::localHostName] instead of
// If user doesn't specify the appName, we will get [SparkSQL::IP] instead of
Copy link
Member

Choose a reason for hiding this comment

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

What is SparkSQL::IP?
I think this is not worth a JIRA / PR relative to the time spent looking at it
What problem does this cause a user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srowen
It is not accurate,because the comment is different from the appname in web UI.

@jiangxb1987
Copy link
Contributor

I think @srowen means you should change the method name, not only the comment.

@liu-zhaokun
Copy link
Contributor Author

Thanks for your patience.Would you @srowen agree with @jiangxb1987 .

@liu-zhaokun
Copy link
Contributor Author

@jiangxb1987
BTW,how to find the release branch of Hive-0.13.1a which spark1.4.1 compiled with?

srowen added a commit to srowen/spark that referenced this pull request Sep 12, 2017
@srowen srowen mentioned this pull request Sep 12, 2017
@asfgit asfgit closed this in dd88fa3 Sep 13, 2017
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