ulysses-you commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004836110


   thank you @Yikun , I try to check the unaligned with armv7 using follow 
command and it works as expected:
   
   ```shell
   root@5d25e6cb0f3e:/# uname -a
   Linux 5d25e6cb0f3e 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 
armv7l GNU/Linux
   root@5d25e6cb0f3e:/# jshell
   Jan 04, 2022 1:50:10 PM java.util.prefs.FileSystemPreferences$1 run
   INFO: Created user preferences directory.
   |  Welcome to JShell -- Version 11.0.1
   |  For an introduction type: /help intro
   
   jshell> System.getProperty("os.arch", "");
   $1 ==> "arm"
   
   jshell>
   
   jshell> import java.lang.reflect.Field;
   
   jshell>
   
   jshell> Class<?> bitsClass = Class.forName("java.nio.Bits", false, 
ClassLoader.getSystemClassLoader());
   bitsClass ==> class java.nio.Bits
   
   jshell> Field unalignedField = bitsClass.getDeclaredField("UNALIGNED");
   unalignedField ==> private static boolean java.nio.Bits.UNALIGNED
   
   jshell> unalignedField.setAccessible(true);
   
   jshell> unalignedField.getBoolean(null);
   $6 ==> false
   ```
   
   It seems no easy way to check with armv5. But I think it should return 
something like `arm` or `arm32` which is also aligned. Do you have any thought 
? @srowen 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to