[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15577936#comment-15577936 ] Bruno P. Kinoshita commented on LANG-1145: -- Interesting. For Linux, the StackOverflow snippet suggests the following for identifying a 64 bits JVM in some operating system. {code} is64bit = (System.getProperty("os.arch").indexOf("64") != -1); {code} Wile Apache Spark's code uses the following. {code} val arch = System.getProperty("os.arch") is64bit = arch.contains("64") || arch.contains("s390x") {code} Which seems like is looking for the Z/OS 64 bits Linux too. Probably better to base the work on Apache Spark's existing code for the 64 bit check in SystemUtils. Also important to note that we must make it clear that the method would check 64 bit in the JVM, not in the operating system (see [this post|http://mark.koli.ch/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system] for more). Cheers Bruno > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15600011#comment-15600011 ] Pascal Schumacher commented on LANG-1145: - I'm not sure what is requested here. The StackOverflow link describes a way to check if the windows operating system is 64-bit, while the spark link checks if the JVM uses 64-bit. > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15600378#comment-15600378 ] Gabor Liptak commented on LANG-1145: The suggestion was a generic 64 check (covering Windows, *nix and zOS). Thanks > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15603301#comment-15603301 ] Pascal Schumacher commented on LANG-1145: - For the operating system, correct? > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15603456#comment-15603456 ] Gabor Liptak commented on LANG-1145: Yes for the OS. What exactly happens for a 32-bit Java installed on a 64-bit OS is a good edge case discussion. > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862719#comment-15862719 ] ASF GitHub Bot commented on LANG-1145: -- Github user PascalSchumacher commented on the issue: https://github.com/apache/commons-lang/pull/231 The discussion mentioned by @kinow is here: https://issues.apache.org/jira/browse/LANG-1145 > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (LANG-1145) 64 bit check in SystemUtils
[ https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875169#comment-15875169 ] ASF GitHub Bot commented on LANG-1145: -- Github user kinow commented on the issue: https://github.com/apache/commons-lang/pull/231 @michael-o >What is the real pupose for this actually? The client should not care about the arch at all. I think @Tomschi use case is valid, where a client could need to know the arch before loading a certain library, and we had another issue submitted LANG-1145 with similar requirement. >The regex match is brittle. This will likely fail on ARM and it fails here on Itanium with HP-UX for os.arch IA64N which is a 32 bit VM. Note taken, perhaps before merging we can try to cover more archs, like this list: * http://lopica.sourceforge.net/os.html There is another place where arch is used within Commons too: * https://github.com/apache/commons-crypto/blob/158be0644c353a617427ab190a4f09082cda42ac/src/main/java/org/apache/commons/crypto/OsInfo.java#L28 We can possibly look at how crypto is using it, and if we could maybe use a similar approach here. > 64 bit check in SystemUtils > --- > > Key: LANG-1145 > URL: https://issues.apache.org/jira/browse/LANG-1145 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Gabor Liptak >Priority: Minor > > Add is64bit method to SystemUtils.java > http://stackoverflow.com/a/2269242/304690 for Windows snippet and > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala > for zOS snippet -- This message was sent by Atlassian JIRA (v6.3.15#6346)