You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Zhen Li (Jira)" <ji...@apache.org> on 2023/02/15 15:48:00 UTC

[jira] [Updated] (SPARK-42449) Fix `native-image.propertie` in Scala Client

     [ https://issues.apache.org/jira/browse/SPARK-42449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhen Li updated SPARK-42449:
----------------------------
    Description: 
The content of `native-image.propertie` file is not correct. This file is used by GraalVM see https://docs.oracle.com/en/graalvm/enterprise/20/docs/reference-manual/native-image/BuildConfiguration/.

e.g.

The content in `META-INF/native-image/io.netty` should also relocated, just as in `grpc-netty-shaded`.

Now, the content of `META-INF/native-image/io.netty/netty-codec-http2/native-image.properties` is

```
Args = --initialize-at-build-time=io.netty \
       --initialize-at-run-time=io.netty.handler.codec.http2.Http2CodecUtil,io.netty.handler.codec.http2.Http2ClientUpgradeCodec,io.netty.handler.codec.http2.Http2ConnectionHandler,io.netty.handler.codec.http2.DefaultHttp2FrameWriter
```

but it should like
```
Args = --initialize-at-build-time=org.sparkproject.connect.client.io.netty \
       --initialize-at-run-time=org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2CodecUtil,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ClientUpgradeCodec,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ConnectionHandler,org.sparkproject.connect.client.io.netty.handler.codec.http2.DefaultHttp2FrameWriter       
```
Other Transformer may need to be added

See more info in this discussion thread https://github.com/apache/spark/pull/39866#discussion_r1098833915



  was:
The content of `native-image.propertie` file is not correct. This file may be used by graal project to find the shaded contents.

e.g.

The content in `META-INF/native-image/io.netty` should also relocated, just as in `grpc-netty-shaded`.

Now, the content of `META-INF/native-image/io.netty/netty-codec-http2/native-image.properties` is

```
Args = --initialize-at-build-time=io.netty \
       --initialize-at-run-time=io.netty.handler.codec.http2.Http2CodecUtil,io.netty.handler.codec.http2.Http2ClientUpgradeCodec,io.netty.handler.codec.http2.Http2ConnectionHandler,io.netty.handler.codec.http2.DefaultHttp2FrameWriter
```

but it should like
```
Args = --initialize-at-build-time=org.sparkproject.connect.client.io.netty \
       --initialize-at-run-time=org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2CodecUtil,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ClientUpgradeCodec,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ConnectionHandler,org.sparkproject.connect.client.io.netty.handler.codec.http2.DefaultHttp2FrameWriter       
```
Other Transformer may need to be added

See more info in this discussion thread https://github.com/apache/spark/pull/39866#discussion_r1098833915




> Fix `native-image.propertie` in Scala Client
> --------------------------------------------
>
>                 Key: SPARK-42449
>                 URL: https://issues.apache.org/jira/browse/SPARK-42449
>             Project: Spark
>          Issue Type: Improvement
>          Components: Connect
>    Affects Versions: 3.4.0
>            Reporter: Zhen Li
>            Priority: Minor
>
> The content of `native-image.propertie` file is not correct. This file is used by GraalVM see https://docs.oracle.com/en/graalvm/enterprise/20/docs/reference-manual/native-image/BuildConfiguration/.
> e.g.
> The content in `META-INF/native-image/io.netty` should also relocated, just as in `grpc-netty-shaded`.
> Now, the content of `META-INF/native-image/io.netty/netty-codec-http2/native-image.properties` is
> ```
> Args = --initialize-at-build-time=io.netty \
>        --initialize-at-run-time=io.netty.handler.codec.http2.Http2CodecUtil,io.netty.handler.codec.http2.Http2ClientUpgradeCodec,io.netty.handler.codec.http2.Http2ConnectionHandler,io.netty.handler.codec.http2.DefaultHttp2FrameWriter
> ```
> but it should like
> ```
> Args = --initialize-at-build-time=org.sparkproject.connect.client.io.netty \
>        --initialize-at-run-time=org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2CodecUtil,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ClientUpgradeCodec,org.sparkproject.connect.client.io.netty.handler.codec.http2.Http2ConnectionHandler,org.sparkproject.connect.client.io.netty.handler.codec.http2.DefaultHttp2FrameWriter       
> ```
> Other Transformer may need to be added
> See more info in this discussion thread https://github.com/apache/spark/pull/39866#discussion_r1098833915



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org