Skip to content

Commit ed82770

Browse files
committed
[KYUUBI #2310] Make ranger extension work with mac m1
### _Why are the changes needed?_ Update jna version to 5.7.0 Before ``` java.lang.UnsatisfiedLinkError: /Users/cathy/Library/Caches/JNA/temp/jna8371704468821938112.tmp: dlopen(/Users/cathy/Library/Caches/JNA/temp/jna8371704468821938112.tmp, 0x0001): tried: '/Users/cathy/Library/Caches/JNA/temp/jna8371704468821938112.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832) at java.lang.Runtime.load0(Runtime.java:811) at java.lang.System.load(System.java:1088) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1012) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) at com.sun.jna.Native.<clinit>(Native.java:195) at com.kstruct.gethostname4j.Hostname$UnixCLibrary.<clinit>(Hostname.java:12) at com.kstruct.gethostname4j.Hostname.getHostname(Hostname.java:30) ``` The 5.7.0 version is from mattsheppard/gethostname4j#8 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2310 from ulysses-you/m1-jna. Closes #2310 3706c87 [ulysses-you] ordering b9b4e92 [ulysses-you] fix Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: ulysses-you <ulyssesyou@apache.org>
1 parent e1e0b35 commit ed82770

File tree

1 file changed

+35
-0
lines changed
  • extensions/spark/kyuubi-spark-authz

1 file changed

+35
-0
lines changed

extensions/spark/kyuubi-spark-authz/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<packaging>jar</packaging>
3434
<url>https://kyuubi.apache.org/</url>
3535

36+
<properties>
37+
<gethostname4j.version>1.0.0</gethostname4j.version>
38+
<jna.version>5.7.0</jna.version>
39+
</properties>
40+
3641
<dependencies>
3742
<dependency>
3843
<groupId>org.apache.ranger</groupId>
@@ -79,9 +84,39 @@
7984
<groupId>org.codehaus.jackson</groupId>
8085
<artifactId>jackson-mapper-asl</artifactId>
8186
</exclusion>
87+
<exclusion>
88+
<groupId>com.kstruct</groupId>
89+
<artifactId>gethostname4j</artifactId>
90+
</exclusion>
91+
<exclusion>
92+
<groupId>net.java.dev.jna</groupId>
93+
<artifactId>jna</artifactId>
94+
</exclusion>
95+
<exclusion>
96+
<groupId>net.java.dev.jna</groupId>
97+
<artifactId>jna-platform</artifactId>
98+
</exclusion>
8299
</exclusions>
83100
</dependency>
84101

102+
<dependency>
103+
<groupId>com.kstruct</groupId>
104+
<artifactId>gethostname4j</artifactId>
105+
<version>${gethostname4j.version}</version>
106+
</dependency>
107+
108+
<dependency>
109+
<groupId>net.java.dev.jna</groupId>
110+
<artifactId>jna</artifactId>
111+
<version>${jna.version}</version>
112+
</dependency>
113+
114+
<dependency>
115+
<groupId>net.java.dev.jna</groupId>
116+
<artifactId>jna-platform</artifactId>
117+
<version>${jna.version}</version>
118+
</dependency>
119+
85120
<dependency>
86121
<groupId>org.apache.ranger</groupId>
87122
<artifactId>ranger-plugins-audit</artifactId>

0 commit comments

Comments
 (0)