lhotari commented on code in PR #22230:
URL: https://github.com/apache/pulsar/pull/22230#discussion_r1518489699


##########
docker/pulsar/build-scripts/remove-unnecessary-native-binaries.sh:
##########
@@ -0,0 +1,38 @@
+#!/usr/bin/env sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e
+
+# Retain only native libraries for the architecture of this
+# image
+ARCH=$(uname -m)
+
+# Remove extra binaries for Netty TCNative
+ls /pulsar/lib/io.netty-netty-tcnative-boringssl-static*Final-*.jar | grep -v 
linux-$ARCH | xargs rm
+
+# Prune extra libs from RocksDB JAR
+mkdir /tmp/rocksdb
+cd /tmp/rocksdb
+ROCKSDB_JAR=$(ls /pulsar/lib/org.rocksdb-rocksdbjni-*.jar)
+unzip $ROCKSDB_JAR > /dev/null
+
+ls librocksdbjni-* | grep -v librocksdbjni-linux-$ARCH-musl.so | xargs rm

Review Comment:
   Since we have full glibc in the Alpine container, does that impact the 
library version which should be used (musl or glibc)? I don't know the details, 
but what I wonder about is which malloc implementation does the JVM use and 
which one is used by the rocksdb library and does it matter if they are 
different?



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

Reply via email to