viirya commented on issue #25133: [SPARK-28365][ML] Fallback locale to en_US in 
StopWordsRemover if system default locale isn't in available locales in JVM
URL: https://github.com/apache/spark/pull/25133#issuecomment-511448856
 
 
   Hmm, it is a good question. From my understanding, the default locales is 
determined by host OS preference:
   
   
https://www.oracle.com/technetwork/articles/javase/locale-140624.html?ssSourceSiteId=ocomen#using:
   
   > The default locale of your application is determined in three ways. First, 
unless you have explicitly changed the default, the getDefault() method returns 
the locale that was initially determined by the Java Virtual Machine (JVM) when 
it first loaded. That is, the JVM determines the default locale from the host 
environment. The host environment's locale is determined by the host operating 
system and the user preferences established on that system.
   
   Seems to me `getAvailableLocales`  only returns supported locales in the 
JRE. So I guess that default locale isn't always in the supported locale list?
   
   
https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#getAvailableLocales()
   
https://www.oracle.com/technetwork/articles/javase/locale-140624.html#supported
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to