From 6f606dacbdb077a2dfdb3a07df586d3e0923eb65 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:54:38 -0300 Subject: [PATCH 01/25] #685: Updated Bazel --- exaudfclient/base/BUILD | 2 +- exaudfclient/base/MODULE.bazel | 44 ++++++++++++ exaudfclient/base/WORKSPACE | 81 ----------------------- exaudfclient/base/java_repository.bzl | 6 +- exaudfclient/base/protobuf_repository.bzl | 4 +- exaudfclient/base/python_repository.bzl | 22 +++--- exaudfclient/base/ssl_repository.bzl | 18 +++++ exaudfclient/base/zmq_repository.bzl | 4 +- 8 files changed, 82 insertions(+), 99 deletions(-) create mode 100644 exaudfclient/base/MODULE.bazel delete mode 100644 exaudfclient/base/WORKSPACE create mode 100644 exaudfclient/base/ssl_repository.bzl diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index 43de10fe0..88756f294 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -127,7 +127,7 @@ cc_binary( srcs = ["exaudfclient.cc", "load_dynamic.cc"], linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace deps = ["//exaudflib:header", "//:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"], + ["//exaudflib:exaudflib-deps"] + [ "@libzmq//:zmq", "@protobuf//:protobuf"], defines = VM_ENABLED_DEFINES, data = [":libexaudflib_complete.so"], ) diff --git a/exaudfclient/base/MODULE.bazel b/exaudfclient/base/MODULE.bazel new file mode 100644 index 000000000..30d6ee230 --- /dev/null +++ b/exaudfclient/base/MODULE.bazel @@ -0,0 +1,44 @@ +############################################################################### +# Bazel now uses Bzlmod by default to manage external dependencies. +# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. +# +# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 +############################################################################### + +module(name="exaudfclient", version = "1.0") + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "googletest", version = "1.15.0") +bazel_dep(name = "rules_java", version = "6.1.1") +bazel_dep(name = "rules_jvm_external", version = "6.2") + +python_local_repository = use_repo_rule("//:python_repository.bzl", "python_local_repository") +python_local_repository(name = "python3", python_version="python3") + +numpy_local_repository = use_repo_rule("//:python_repository.bzl", "numpy_local_repository") + +numpy_local_repository(name = "numpy") + +zmq_local_repository = use_repo_rule("//:zmq_repository.bzl", "zmq_local_repository") +zmq_local_repository(name = "zmq") + +protobuf_local_repository = use_repo_rule("//:protobuf_repository.bzl", "protobuf_local_repository") +protobuf_local_repository(name = "protobuf") + + +ssl_local_repository = use_repo_rule("//:ssl_repository.bzl", "ssl_local_repository") +ssl_local_repository(name = "ssl") + +java_local_repository = use_repo_rule("//:java_repository.bzl", "java_local_repository") +java_local_repository(name = "java") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.install( + artifacts = [ + "com.exasol:udf-api-java:1.0.5", + ], + repositories = [ + "https://repo1.maven.org/maven2", + ], +) +use_repo(maven, "maven") \ No newline at end of file diff --git a/exaudfclient/base/WORKSPACE b/exaudfclient/base/WORKSPACE deleted file mode 100644 index a5f73eaf7..000000000 --- a/exaudfclient/base/WORKSPACE +++ /dev/null @@ -1,81 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -skylib_version = "0.8.0" - -http_archive( - name = "bazel_skylib", - sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", - type = "tar.gz", - url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format(skylib_version, skylib_version), -) - -RULES_JVM_EXTERNAL_TAG = "4.2" -RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca" - -http_archive( - name = "rules_jvm_external", - strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, - sha256 = RULES_JVM_EXTERNAL_SHA, - url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, -) - - -load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") - -rules_jvm_external_deps() - -load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") - -rules_jvm_external_setup() - -load("@rules_jvm_external//:defs.bzl", "maven_install") - -maven_install( - artifacts = [ - "com.exasol:udf-api-java:1.0.5", - ], - repositories = [ - "https://repo1.maven.org/maven2", - ], -) - -load("//:python_repository.bzl", "python_local_repository") - -python_local_repository(name = "python3") - -load("//:python_repository.bzl", "numpy_local_repository") - -numpy_local_repository(name = "numpy") - -load("//:java_repository.bzl", "java_local_repository") - -java_local_repository(name = "java") - -load("//:protobuf_repository.bzl", "protobuf_local_repository") - -protobuf_local_repository(name = "protobuf") - -load("//:zmq_repository.bzl", "zmq_local_repository") -zmq_local_repository(name = "zmq") - -new_local_repository( - name = "ssl", - build_file_content = """ -cc_library( - name = "ssl", - srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], - hdrs = glob(["usr/include/openssl/*.h"]), - includes = ["usr/include/openssl"], - visibility = ["//visibility:public"] -) - """, - path = "/", -) - -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -git_repository( - name = "googletest", - remote = "https://github.com/google/googletest", - tag = "release-1.11.0", -) diff --git a/exaudfclient/base/java_repository.bzl b/exaudfclient/base/java_repository.bzl index f4a0d34c5..0d2b44aae 100644 --- a/exaudfclient/base/java_repository.bzl +++ b/exaudfclient/base/java_repository.bzl @@ -23,7 +23,7 @@ def _find_shared_libraries(prefix,library,p_repository_ctx): return path_to_library def _java_local_repository_impl(repository_ctx): - prefix = "/usr/lib/jvm/java-11-openjdk-amd64" + prefix = "/usr/lib/jvm/java-17-openjdk-amd64" if 'JAVA_PREFIX' in repository_ctx.os.environ: prefix = repository_ctx.os.environ['JAVA_PREFIX'] print("java prefix in environment specified; %s"%prefix) @@ -33,14 +33,14 @@ def _java_local_repository_impl(repository_ctx): defines = '"ENABLE_JAVA_VM"' build_file_content = """ cc_library( - name = "{name}", + name = "java", srcs = glob(["{prefix}/include/*.h"], allow_empty=False), hdrs = glob(["{prefix}/include/*.h","{prefix}/include/linux/*.h"], allow_empty=False), includes = ["{prefix}/include","{prefix}/include/linux"], defines = [{defines}], linkopts = ["-ljvm","-L{rpath_libjvm}",'-Wl,-rpath','{rpath_libjvm}'], visibility = ["//visibility:public"] -)""".format( name=repository_ctx.name, defines=defines, prefix="java", rpath_libjvm=path_to_libjvm) +)""".format( defines=defines, prefix="java", rpath_libjvm=path_to_libjvm) print(build_file_content) repository_ctx.symlink(prefix, "./java") diff --git a/exaudfclient/base/protobuf_repository.bzl b/exaudfclient/base/protobuf_repository.bzl index 4fe685f2c..c8c8e38d9 100644 --- a/exaudfclient/base/protobuf_repository.bzl +++ b/exaudfclient/base/protobuf_repository.bzl @@ -12,12 +12,12 @@ def _protobuf_local_repository_impl(repository_ctx): print("protobuf include prefix in environment specified; %s"%include_prefix) build_file_content = """ cc_library( - name = "{name}", + name = "protobuf", srcs = glob(["protobuf/lib/**/libprotobuf*.so"]), hdrs = glob(["protobuf/include/**"]), includes = ["protobuf/include/"], visibility = ["//visibility:public"] -)""".format( name=repository_ctx.name) +)""" print(build_file_content) repository_ctx.symlink(library_prefix, "./protobuf/lib") diff --git a/exaudfclient/base/python_repository.bzl b/exaudfclient/base/python_repository.bzl index e342d16ad..549eabc89 100644 --- a/exaudfclient/base/python_repository.bzl +++ b/exaudfclient/base/python_repository.bzl @@ -31,20 +31,21 @@ def _get_lib_glob(binary, version, p_repository_ctx): return lib_glob def _python_local_repository_impl(repository_ctx): - python_prefix_env_var = repository_ctx.name.upper() + "_PREFIX" + python_version = repository_ctx.attr.python_version + python_prefix_env_var = python_version.upper() + "_PREFIX" if python_prefix_env_var in repository_ctx.os.environ: prefix = repository_ctx.os.environ[python_prefix_env_var] else: fail("Environment Variable %s not found"%python_prefix_env_var) print("python prefix in environment specified; %s"%prefix) - python_version_env_var = repository_ctx.name.upper() + "_VERSION" + python_version_env_var = python_version.upper() + "_VERSION" if python_version_env_var in repository_ctx.os.environ: version = repository_ctx.os.environ[python_version_env_var] - if repository_ctx.name == "python3" and version.startswith("2"): - fail("Wrong python version specified in environment variable %s, got binary name '%s', but version number '%s'"%(python_version_env_var,repository_ctx.name,version)) - if repository_ctx.name == "python" or version.startswith("2"): - fail("Python 2 is not supported anymore, but specified in environment variable %s, got %s, %s"%(python_version_env_var,repository_ctx.name,version)) + if python_version == "python3" and version.startswith("2"): + fail("Wrong python version specified in environment variable %s, got binary name '%s', but version number '%s'"%(python_version_env_var,python_version,version)) + if python_version == "python" or version.startswith("2"): + fail("Python 2 is not supported anymore, but specified in environment variable %s, got %s, %s"%(python_version_env_var,python_version,version)) else: fail("Environment Variable %s not found"%python_version_env_var) print("python version in environment specified; %s"%version) @@ -66,7 +67,7 @@ cc_library( includes = ["{include_dir}"], defines = [{defines}], visibility = ["//visibility:public"] -)""".format(lib_glob=lib_glob[1:], include_dir=include_dir[1:], name=repository_ctx.name, defines=defines_str) +)""".format(lib_glob=lib_glob[1:], include_dir=include_dir[1:], name=python_version, defines=defines_str) print(build_file_content) repository_ctx.symlink(prefix, "."+prefix) @@ -75,7 +76,8 @@ cc_library( python_local_repository = repository_rule( implementation=_python_local_repository_impl, local = True, - environ = ["PYTHON3_PREFIX", "PYTHON3_VERSION"]) + environ = ["PYTHON3_PREFIX", "PYTHON3_VERSION"], + attrs = {"python_version": attr.string()}) def _get_numpy_include_dir(binary,p_repository_ctx): @@ -117,13 +119,13 @@ def _numpy_local_repository_impl(repository_ctx): hdrs = numpy_include_dir + "/*/*.h" build_file_content = """ cc_library( - name = "{name}", + name = "numpy", srcs = [], hdrs = glob(["{hdrs}"]), includes = ["{includes}"], defines = [{defines}], visibility = ["//visibility:public"] -)""".format(hdrs=hdrs, includes=numpy_include_dir, name=repository_ctx.name, defines=defines_str) +)""".format(hdrs=hdrs, includes=numpy_include_dir, defines=defines_str) print(build_file_content) repository_ctx.symlink(prefix, "."+prefix) diff --git a/exaudfclient/base/ssl_repository.bzl b/exaudfclient/base/ssl_repository.bzl new file mode 100644 index 000000000..28baa3006 --- /dev/null +++ b/exaudfclient/base/ssl_repository.bzl @@ -0,0 +1,18 @@ + +def _ssl_local_repository_impl(repository_ctx): + build_file_content = """ +cc_library( + name = "ssl", + srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], + hdrs = glob(["usr/include/openssl/*.h"]), + includes = ["usr/include/openssl"], + visibility = ["//visibility:public"] + ) + """ + print(build_file_content) + repository_ctx.file("BUILD", build_file_content) + +ssl_local_repository = repository_rule( + implementation=_ssl_local_repository_impl, + local = True) + diff --git a/exaudfclient/base/zmq_repository.bzl b/exaudfclient/base/zmq_repository.bzl index 9cad5095f..64882597b 100644 --- a/exaudfclient/base/zmq_repository.bzl +++ b/exaudfclient/base/zmq_repository.bzl @@ -12,12 +12,12 @@ def _zmq_local_repository_impl(repository_ctx): print("zmq include prefix in environment specified; %s"%include_prefix) build_file_content = """ cc_library( - name = "{name}", + name = "zmq", srcs = glob(["zmq/lib/**/libzmq.so"]), hdrs = glob(["zmq/include/zmq*"]), includes = ["zmq/include/"], visibility = ["//visibility:public"] -)""".format( name=repository_ctx.name) +)""" print(build_file_content) repository_ctx.symlink(library_prefix, "./zmq/lib") From 58e90d6a73b34b1bd6dca073a6b0a587e6c32c3e Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:24:12 -0300 Subject: [PATCH 02/25] Updated Bazel version --- .github/workflows/check_bazel_tests.yml | 4 ++-- .../flavor_base/build_deps/packages/conda_packages | 2 +- .../flavor_base/build_deps/packages/conda_packages | 2 +- .../flavor_base/build_deps/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_bazel_tests.yml b/.github/workflows/check_bazel_tests.yml index fb77880dc..285d314e8 100644 --- a/.github/workflows/check_bazel_tests.yml +++ b/.github/workflows/check_bazel_tests.yml @@ -27,12 +27,12 @@ jobs: sudo apt-get install -y openjdk-11-jdk libzmq3-dev - name: Java Tests run: | - export USE_BAZEL_VERSION=6.4.0 + export USE_BAZEL_VERSION=7.2.1 bazel test //javacontainer/test/... working-directory: ./exaudfclient/base - name: ExaudfLib Tests run: | - export USE_BAZEL_VERSION=6.4.0 + export USE_BAZEL_VERSION=7.2.1 bazel test //exaudflib/test/... working-directory: ./exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages index 741e947e9..6818006c4 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages @@ -2,7 +2,7 @@ protobuf|4.25.3 pcre|8.45 chrpath|0.16 openjdk|11.0.15 -bazel|5.2.0 +bazel|7.2.1 gxx_linux-64|11.2.0 gcc_linux-64|11.2.0 make|4.3 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages index 336600f96..9bce28bd9 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages @@ -2,7 +2,7 @@ protobuf|4.25.3 pcre|8.45 chrpath|0.16 openjdk|11.0.15 -bazel|5.2.0 +bazel|7.2.1 gxx_linux-64|12.1.0 gcc_linux-64|12.1.0 make|4.3 diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_deps/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/build_deps/Dockerfile index d304fdcf9..a640cae9a 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_deps/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_deps/Dockerfile @@ -10,7 +10,7 @@ COPY scripts /scripts RUN mkdir -p /build_info/packages COPY build_deps/packages /build_info/packages/build_deps -ENV BAZEL_PACKAGE_VERSION="5.2.0" +ENV BAZEL_PACKAGE_VERSION="7.2.1" ENV BAZEL_PACKAGE_FILE="bazel_$BAZEL_PACKAGE_VERSION-linux-x86_64.deb" ENV BAZEL_PACKAGE_URL="https://github.com/bazelbuild/bazel/releases/download/$BAZEL_PACKAGE_VERSION/$BAZEL_PACKAGE_FILE" From c0710cd72e2a4b9e907d3b8cdd4dfbb3d5615a28 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:31:57 -0300 Subject: [PATCH 03/25] Revert JDK default version for java_repository.bzl --- exaudfclient/base/java_repository.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exaudfclient/base/java_repository.bzl b/exaudfclient/base/java_repository.bzl index 0d2b44aae..76cdb7436 100644 --- a/exaudfclient/base/java_repository.bzl +++ b/exaudfclient/base/java_repository.bzl @@ -23,7 +23,7 @@ def _find_shared_libraries(prefix,library,p_repository_ctx): return path_to_library def _java_local_repository_impl(repository_ctx): - prefix = "/usr/lib/jvm/java-17-openjdk-amd64" + prefix = "/usr/lib/jvm/java-11-openjdk-amd64" if 'JAVA_PREFIX' in repository_ctx.os.environ: prefix = repository_ctx.os.environ['JAVA_PREFIX'] print("java prefix in environment specified; %s"%prefix) From e955dd991512b44248cf9f0d9dbe382b88bc132c Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:10:27 -0300 Subject: [PATCH 04/25] Usse inline "new_local_repository" in MODULE.bazel --- exaudfclient/base/MODULE.bazel | 18 ++++++++++++++++-- exaudfclient/base/ssl_repository.bzl | 18 ------------------ 2 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 exaudfclient/base/ssl_repository.bzl diff --git a/exaudfclient/base/MODULE.bazel b/exaudfclient/base/MODULE.bazel index 30d6ee230..a746b8a81 100644 --- a/exaudfclient/base/MODULE.bazel +++ b/exaudfclient/base/MODULE.bazel @@ -26,8 +26,22 @@ protobuf_local_repository = use_repo_rule("//:protobuf_repository.bzl", "protobu protobuf_local_repository(name = "protobuf") -ssl_local_repository = use_repo_rule("//:ssl_repository.bzl", "ssl_local_repository") -ssl_local_repository(name = "ssl") +new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") + +new_local_repository( + name = "ssl", + build_file_content = """ +cc_library( + name = "ssl", + srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], + hdrs = glob(["usr/include/openssl/*.h"]), + includes = ["usr/include/openssl"], + visibility = ["//visibility:public"] +) + """, + path = "/", +) + java_local_repository = use_repo_rule("//:java_repository.bzl", "java_local_repository") java_local_repository(name = "java") diff --git a/exaudfclient/base/ssl_repository.bzl b/exaudfclient/base/ssl_repository.bzl deleted file mode 100644 index 28baa3006..000000000 --- a/exaudfclient/base/ssl_repository.bzl +++ /dev/null @@ -1,18 +0,0 @@ - -def _ssl_local_repository_impl(repository_ctx): - build_file_content = """ -cc_library( - name = "ssl", - srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], - hdrs = glob(["usr/include/openssl/*.h"]), - includes = ["usr/include/openssl"], - visibility = ["//visibility:public"] - ) - """ - print(build_file_content) - repository_ctx.file("BUILD", build_file_content) - -ssl_local_repository = repository_rule( - implementation=_ssl_local_repository_impl, - local = True) - From 2d17aeb2e166869084817c3cd1db5074f977a9e7 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:55:48 -0300 Subject: [PATCH 05/25] Fixed Java BUILD --- exaudfclient/base/javacontainer/BUILD | 29 ++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD index 47c15af73..38640f4b2 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -3,13 +3,19 @@ package(default_visibility = ["//visibility:public"]) genrule( name = "exascript_java_tmp_cc", cmd = """ - mkdir -p $(location java_src)/com/exasol/swig + mkdir -p java_src/com/exasol/swig mkdir -p build_exascript_java_tmp_cc/exaudflib cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_java_tmp_cc/exaudflib - cd build_exascript_java_tmp_cc - swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../$(location java_src)/com/exasol/swig" -o "../$(location exascript_java_tmp.cc)" exaudflib/exascript.i - """, - outs = ["exascript_java_tmp.cc","java_src"], + cd build_exascript_java_tmp_cc + swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../java_src/com/exasol/swig" -o "../exascript_java_tmp.cc" exaudflib/exascript.i + cd .. + tar cf java_src.tar ./java_src + cp java_src.tar $(location java_src.tar) + cp exascript_java_tmp.cc $(location exascript_java_tmp.cc) + """, + outs = ["java_src.tar", + "exascript_java_tmp.cc" + ], srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h"] ) @@ -17,24 +23,28 @@ genrule( name = "exascript_java_tmp_h", cmd = """ mkdir build_exascript_java_tmp_h + cp $(location :java_src.tar) . + tar xf java_src.tar cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_java_tmp_h - cp -r "$(location exascript_java_tmp.cc)" "$(location java_src)" build_exascript_java_tmp_h + cp -r "$(location exascript_java_tmp.cc)" java_src build_exascript_java_tmp_h cd build_exascript_java_tmp_h swig -v -DEXTERNAL_PROCESS -c++ -java -external-runtime "../$(location exascript_java_tmp.h)" """, outs = ["exascript_java_tmp.h"], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc", ":java_src"] + srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc", ":java_src.tar"] ) genrule( name = "exascript_java_int", cmd = """ - cp -r $(locations :exascript_java_tmp_cc) . + cp $(locations :java_src.tar) . + tar xf java_src.tar + ls -la java_src FILES=`ls java_src/com/exasol/swig/*.java` python3 $(location //:build_integrated.py) "$(location exascript_java_int.h)" $$FILES """, outs = ["exascript_java_int.h"], - srcs = [":exascript_java_tmp_cc"], + srcs = [":java_src.tar"], tools = ["//:build_integrated.py"] ) @@ -52,6 +62,7 @@ genrule( TMPDIR=`mktemp -d` cp -r -L $(location //:filter_swig_code.py) $(locations :exascript_java_tmp_cc) $$TMPDIR (cd $$TMPDIR && + tar xf java_src.tar python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") cp $$TMPDIR/exascript_java.cc "$(location exascript_java.cc)" cp -r $$TMPDIR/java_src/com/exasol/swig/ConnectionInformationWrapper.java "$(location ConnectionInformationWrapper.java)" From e5843ad04a013a52d48fdb722d624d44fb689b7f Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:51:38 -0300 Subject: [PATCH 06/25] Updated .gitignore --- exaudfclient/base/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exaudfclient/base/.gitignore b/exaudfclient/base/.gitignore index 3d3f25179..6d1870fde 100644 --- a/exaudfclient/base/.gitignore +++ b/exaudfclient/base/.gitignore @@ -4,4 +4,5 @@ bazel-out bazel-src bazel-testlogs graph.in -graph.png \ No newline at end of file +graph.png +MODULE.bazel.lock From 0e2b0c7e27888b028f009721320f78ee83a78898 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:54:02 -0300 Subject: [PATCH 07/25] Fixed BUID --- exaudfclient/base/BUILD | 2 +- exaudfclient/base/MODULE.bazel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index 88756f294..43de10fe0 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -127,7 +127,7 @@ cc_binary( srcs = ["exaudfclient.cc", "load_dynamic.cc"], linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace deps = ["//exaudflib:header", "//:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudflib:exaudflib-deps"] + [ "@libzmq//:zmq", "@protobuf//:protobuf"], + ["//exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"], defines = VM_ENABLED_DEFINES, data = [":libexaudflib_complete.so"], ) diff --git a/exaudfclient/base/MODULE.bazel b/exaudfclient/base/MODULE.bazel index a746b8a81..4bb1d5f0b 100644 --- a/exaudfclient/base/MODULE.bazel +++ b/exaudfclient/base/MODULE.bazel @@ -55,4 +55,4 @@ maven.install( "https://repo1.maven.org/maven2", ], ) -use_repo(maven, "maven") \ No newline at end of file +use_repo(maven, "maven") From b02d5d60c8a6e649275483b9b78a2e9856de4fbf Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:55:56 -0300 Subject: [PATCH 08/25] Use single java file names in javacontainer/BUILD --- exaudfclient/base/javacontainer/BUILD | 148 +++++++++++++++++--------- 1 file changed, 96 insertions(+), 52 deletions(-) diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD index 38640f4b2..e491eaa61 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -9,11 +9,32 @@ genrule( cd build_exascript_java_tmp_cc swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../java_src/com/exasol/swig" -o "../exascript_java_tmp.cc" exaudflib/exascript.i cd .. - tar cf java_src.tar ./java_src - cp java_src.tar $(location java_src.tar) + cp java_src/com/exasol/swig/ConnectionInformationWrapper.java $(location orig/com/exasol/swig/ConnectionInformationWrapper.java) + cp java_src/com/exasol/swig/exascript_java.java $(location orig/com/exasol/swig/exascript_java.java) + cp java_src/com/exasol/swig/exascript_javaJNI.java $(location orig/com/exasol/swig/exascript_javaJNI.java) + cp java_src/com/exasol/swig/ExportSpecificationWrapper.java $(location orig/com/exasol/swig/ExportSpecificationWrapper.java) + cp java_src/com/exasol/swig/ImportSpecificationWrapper.java $(location orig/com/exasol/swig/ImportSpecificationWrapper.java) + cp java_src/com/exasol/swig/Metadata.java $(location orig/com/exasol/swig/Metadata.java) + cp java_src/com/exasol/swig/ResultHandler.java $(location orig/com/exasol/swig/ResultHandler.java) + cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) + cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) + cp java_src/com/exasol/swig/SWIGVM_datatype_e.java $(location orig/com/exasol/swig/SWIGVM_datatype_e.java) + cp java_src/com/exasol/swig/SWIGVM_itertype_e.java $(location orig/com/exasol/swig/SWIGVM_itertype_e.java) + cp java_src/com/exasol/swig/TableIterator.java $(location orig/com/exasol/swig/TableIterator.java) cp exascript_java_tmp.cc $(location exascript_java_tmp.cc) """, - outs = ["java_src.tar", + outs = ["orig/com/exasol/swig/ConnectionInformationWrapper.java", + "orig/com/exasol/swig/exascript_java.java", + "orig/com/exasol/swig/exascript_javaJNI.java", + "orig/com/exasol/swig/ExportSpecificationWrapper.java", + "orig/com/exasol/swig/ImportSpecificationWrapper.java", + "orig/com/exasol/swig/Metadata.java", + "orig/com/exasol/swig/ResultHandler.java", + "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", + "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", + "orig/com/exasol/swig/SWIGVM_datatype_e.java", + "orig/com/exasol/swig/SWIGVM_itertype_e.java", + "orig/com/exasol/swig/TableIterator.java", "exascript_java_tmp.cc" ], srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h"] @@ -23,30 +44,15 @@ genrule( name = "exascript_java_tmp_h", cmd = """ mkdir build_exascript_java_tmp_h - cp $(location :java_src.tar) . - tar xf java_src.tar cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_java_tmp_h - cp -r "$(location exascript_java_tmp.cc)" java_src build_exascript_java_tmp_h + cp -r "$(location exascript_java_tmp.cc)" build_exascript_java_tmp_h cd build_exascript_java_tmp_h swig -v -DEXTERNAL_PROCESS -c++ -java -external-runtime "../$(location exascript_java_tmp.h)" """, outs = ["exascript_java_tmp.h"], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc", ":java_src.tar"] + srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc"] ) -genrule( - name = "exascript_java_int", - cmd = """ - cp $(locations :java_src.tar) . - tar xf java_src.tar - ls -la java_src - FILES=`ls java_src/com/exasol/swig/*.java` - python3 $(location //:build_integrated.py) "$(location exascript_java_int.h)" $$FILES - """, - outs = ["exascript_java_int.h"], - srcs = [":java_src.tar"], - tools = ["//:build_integrated.py"] -) genrule( name = "filter_swig_code_exascript_java_h", @@ -60,27 +66,52 @@ genrule( name = "filter_swig_code_exascript_java_cc", cmd = """ TMPDIR=`mktemp -d` - cp -r -L $(location //:filter_swig_code.py) $(locations :exascript_java_tmp_cc) $$TMPDIR - (cd $$TMPDIR && - tar xf java_src.tar + mkdir -p "$$TMPDIR"/java_src/com/exasol/swig + cp $(location :orig/com/exasol/swig/TableIterator.java) "$$TMPDIR"/java_src/com/exasol/swig/ + cp $(location :orig/com/exasol/swig/ResultHandler.java) "$$TMPDIR"/java_src/com/exasol/swig/ + cp $(location :orig/com/exasol/swig/exascript_javaJNI.java) "$$TMPDIR"/java_src/com/exasol/swig/ + find "$$TMPDIR"/java_src/com/exasol/swig/ -name *.java -type f -exec chmod 644 {} \\; + cp -r -L $(location //:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" + (cd "$$TMPDIR" python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") - cp $$TMPDIR/exascript_java.cc "$(location exascript_java.cc)" - cp -r $$TMPDIR/java_src/com/exasol/swig/ConnectionInformationWrapper.java "$(location ConnectionInformationWrapper.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/exascript_java.java "$(location exascript_java.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/exascript_javaJNI.java "$(location exascript_javaJNI.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/ExportSpecificationWrapper.java "$(location ExportSpecificationWrapper.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/ImportSpecificationWrapper.java "$(location ImportSpecificationWrapper.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/Metadata.java "$(location Metadata.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/ResultHandler.java "$(location ResultHandler.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java "$(location SWIGTYPE_p_ExecutionGraph__ExportSpecification.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java "$(location SWIGTYPE_p_ExecutionGraph__ImportSpecification.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/SWIGVM_datatype_e.java "$(location SWIGVM_datatype_e.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/SWIGVM_itertype_e.java "$(location SWIGVM_itertype_e.java)" - cp -r $$TMPDIR/java_src/com/exasol/swig/TableIterator.java "$(location TableIterator.java)" - rm -rf $$TMPDIR + ls -la . + pwd + echo And now... + cp "$$TMPDIR"/exascript_java.cc $(location :exascript_java.cc) + cp "$$TMPDIR"/java_src/com/exasol/swig/TableIterator.java $(location :filtered/com/exasol/swig/TableIterator.java) + cp "$$TMPDIR"/java_src/com/exasol/swig/ResultHandler.java $(location :filtered/com/exasol/swig/ResultHandler.java) + cp "$$TMPDIR"/java_src/com/exasol/swig/exascript_javaJNI.java $(location :filtered/com/exasol/swig/exascript_javaJNI.java) + rm -rf "$$TMPDIR" """, outs = [ "exascript_java.cc", + "filtered/com/exasol/swig/TableIterator.java", + "filtered/com/exasol/swig/ResultHandler.java", + "filtered/com/exasol/swig/exascript_javaJNI.java" + ], + srcs = [":exascript_java_tmp.cc", ":orig/com/exasol/swig/TableIterator.java", + ":orig/com/exasol/swig/ResultHandler.java", ":orig/com/exasol/swig/exascript_javaJNI.java"], + tools = ["//:filter_swig_code.py"] +) + + +genrule( + name = "finish_java_package", + cmd = """ + cp $(location filtered/com/exasol/swig/TableIterator.java) $(location TableIterator.java) + cp $(location filtered/com/exasol/swig/ResultHandler.java) $(location ResultHandler.java) + cp $(location filtered/com/exasol/swig/exascript_javaJNI.java) $(location exascript_javaJNI.java) + cp $(location orig/com/exasol/swig/ConnectionInformationWrapper.java) $(location ConnectionInformationWrapper.java) + cp $(location orig/com/exasol/swig/exascript_java.java) $(location exascript_java.java) + cp $(location orig/com/exasol/swig/ExportSpecificationWrapper.java) $(location ExportSpecificationWrapper.java) + cp $(location orig/com/exasol/swig/ImportSpecificationWrapper.java) $(location ImportSpecificationWrapper.java) + cp $(location orig/com/exasol/swig/Metadata.java) $(location Metadata.java) + cp $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) $(location SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) + cp $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) $(location SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) + cp $(location orig/com/exasol/swig/SWIGVM_datatype_e.java) $(location SWIGVM_datatype_e.java) + cp $(location orig/com/exasol/swig/SWIGVM_itertype_e.java) $(location SWIGVM_itertype_e.java) + """, + outs = [ "ConnectionInformationWrapper.java", "exascript_java.java", "exascript_javaJNI.java", @@ -94,13 +125,26 @@ genrule( "SWIGVM_itertype_e.java", "TableIterator.java", ], - srcs = [":exascript_java_tmp_cc"], + srcs = [ + "filtered/com/exasol/swig/TableIterator.java", + "filtered/com/exasol/swig/ResultHandler.java", + "filtered/com/exasol/swig/exascript_javaJNI.java", + "orig/com/exasol/swig/ConnectionInformationWrapper.java", + "orig/com/exasol/swig/exascript_java.java", + "orig/com/exasol/swig/ExportSpecificationWrapper.java", + "orig/com/exasol/swig/ImportSpecificationWrapper.java", + "orig/com/exasol/swig/Metadata.java", + "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", + "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", + "orig/com/exasol/swig/SWIGVM_datatype_e.java", + "orig/com/exasol/swig/SWIGVM_itertype_e.java", + ], tools = ["//:filter_swig_code.py"] ) cc_library( name = "exascript_java", - srcs = [":filter_swig_code_exascript_java_cc",], + srcs = [":exascript_java.cc",], deps = ["@java//:java","//exaudflib:exaudflib-deps","//exaudflib:header"], copts= ["-O0","-fno-lto"], # We limit this target to -O0 (no optimization) and -fno-lto. because otherwise we get compiler warnings of the sort @@ -114,7 +158,7 @@ cc_library( cc_library( name = "javacontainer", srcs = [":javacontainer.cc", ":javacontainer.h", ":javacontainer_impl.cc", ":javacontainer_impl.h", ":dummy"], - hdrs = [":exascript_java_int", ":filter_swig_code_exascript_java_h", "exascript_java_jni_decl.h"], + hdrs = [":filter_swig_code_exascript_java_h", "exascript_java_jni_decl.h"], deps = ["@ssl//:ssl","@java//:java", ":exascript_java", "//exaudflib:header", "//:debug_message_h","//exaudflib:scriptoptionlines"], # copts= ["-O0","-fno-lto"], alwayslink=True, @@ -133,18 +177,18 @@ java_binary( srcs = glob(["*.java"])+ #The following are generated classes [ - "ConnectionInformationWrapper.java", - "exascript_java.java", - "exascript_javaJNI.java", - "ExportSpecificationWrapper.java", - "ImportSpecificationWrapper.java", - "Metadata.java", - "ResultHandler.java", - "SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", - "SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", - "SWIGVM_datatype_e.java", - "SWIGVM_itertype_e.java", - "TableIterator.java" + ":ConnectionInformationWrapper.java", + ":exascript_java.java", + ":exascript_javaJNI.java", + ":ExportSpecificationWrapper.java", + ":ImportSpecificationWrapper.java", + ":Metadata.java", + ":ResultHandler.java", + ":SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", + ":SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", + ":SWIGVM_datatype_e.java", + ":SWIGVM_itertype_e.java", + ":TableIterator.java" ], deps = ["@maven//:com_exasol_udf_api_java"], create_executable=False, From 2281a432fc665ae9cd6fbabf41b320f941c41df8 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:59:00 -0300 Subject: [PATCH 09/25] Removed Debug code --- exaudfclient/base/javacontainer/BUILD | 3 --- 1 file changed, 3 deletions(-) diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD index e491eaa61..3bd7028f4 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -74,9 +74,6 @@ genrule( cp -r -L $(location //:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" (cd "$$TMPDIR" python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") - ls -la . - pwd - echo And now... cp "$$TMPDIR"/exascript_java.cc $(location :exascript_java.cc) cp "$$TMPDIR"/java_src/com/exasol/swig/TableIterator.java $(location :filtered/com/exasol/swig/TableIterator.java) cp "$$TMPDIR"/java_src/com/exasol/swig/ResultHandler.java $(location :filtered/com/exasol/swig/ResultHandler.java) From 678efedf6204e99fb65d3fa634839f20b0074d69 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:57:53 -0300 Subject: [PATCH 10/25] Fixed conda flavors --- ext/scripts/install_scripts/install_via_conda.pl | 2 +- .../flavor_base/build_deps/packages/conda_packages | 6 ++---- .../flavor_base/language_deps/packages/conda_packages | 5 ----- .../flavor_base/udfclient_deps/packages/conda_packages | 3 +-- .../flavor_base/build_deps/packages/conda_packages | 2 -- .../flavor_base/language_deps/packages/conda_packages | 5 ----- .../flavor_base/udfclient_deps/packages/conda_packages | 3 +-- 7 files changed, 5 insertions(+), 21 deletions(-) diff --git a/ext/scripts/install_scripts/install_via_conda.pl b/ext/scripts/install_scripts/install_via_conda.pl index d4e878a58..c86000d83 100755 --- a/ext/scripts/install_scripts/install_via_conda.pl +++ b/ext/scripts/install_scripts/install_via_conda.pl @@ -122,7 +122,7 @@ sub generate_channel_args{ sub run_install_command{ my ($file, $dry_run, $with_versions, $allow_no_version, $channel_args) = @_; my $element_separator = '\\|'; - my $combining_template = "$conda_binary install --yes --freeze-installed $channel_args <<<<0>>>>"; + my $combining_template = "$conda_binary install --yes $channel_args <<<<0>>>>"; my @templates=("'<<<<0>>>>==<<<<1>>>>'"); my @separators = (" "); diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages index 6818006c4..1e0bcda76 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages @@ -1,8 +1,6 @@ protobuf|4.25.3 pcre|8.45 -chrpath|0.16 -openjdk|11.0.15 bazel|7.2.1 -gxx_linux-64|11.2.0 -gcc_linux-64|11.2.0 +gxx_linux-64|12.1.0 +gcc_linux-64|12.1.0 make|4.3 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages index d18b3a297..342c71d0a 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages @@ -1,11 +1,6 @@ -libxcrypt|4.4.36 # Needed for building the udfclient and because libcrypt got removed from conda sysroot, see https://github.com/conda-forge/linux-sysroot-feedstock/issues/52 python|3.10.4 numpy|1.26.2 pandas|2.2.2 pyarrow|16.0.0 libblas|3.9.0=15_linux64_mkl mamba|1.5.1 -ld_impl_linux-64|2.36.1 -cryptography|42.0.7 -libxml2|2.10.3=hca2bb57_4 # Pinned for OpenJDK in build_deps -icu|70.1=h27087fc_0 # Pinned for OpenJDK in build_deps diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages index 30a55fd9a..13feaf0f0 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -1,7 +1,6 @@ libprotobuf|4.25.3 zeromq|4.3.5 -openssl|3.3.0 +openssl|3.3.1 nss|3.100 cppzmq|4.10.0 _openmp_mutex|4.5=2_kmp_llvm # We need this, such that we can later install libblas with mkl, which is for example needed by pytorch -libzlib|1.2.13 # We need to pin this, such that we can later install libxml2 and other libraries which are not compatible with libzlib >= 1.3.0 \ No newline at end of file diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages index 9bce28bd9..1e0bcda76 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages @@ -1,7 +1,5 @@ protobuf|4.25.3 pcre|8.45 -chrpath|0.16 -openjdk|11.0.15 bazel|7.2.1 gxx_linux-64|12.1.0 gcc_linux-64|12.1.0 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages index e12eec1a1..fba8c86fe 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages @@ -1,4 +1,3 @@ -libxcrypt|4.4.36 # Needed for building the udfclient and because libcrypt got removed from conda sysroot, see https://github.com/conda-forge/linux-sysroot-feedstock/issues/52 python|3.10.4 numpy|1.26.2 pandas|2.2.2 @@ -6,8 +5,4 @@ pyarrow|16.0.0 libarrow|16.0.0=he216f8a_1_cuda libblas|3.9.0=15_linux64_mkl mamba|1.5.1 -ld_impl_linux-64|2.36.1 -cryptography|42.0.7 -libxml2|2.10.3=hca2bb57_4 # Pinned for OpenJDK in build_deps -icu|70.1=h27087fc_0 # Pinned for OpenJDK in build_deps cuda-toolkit|11.8.0 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages index 3d8f59e03..13feaf0f0 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -1,7 +1,6 @@ libprotobuf|4.25.3 zeromq|4.3.5 -openssl|3.3.0 +openssl|3.3.1 nss|3.100 cppzmq|4.10.0 _openmp_mutex|4.5=2_kmp_llvm # We need this, such that we can later install libblas with mkl, which is for example needed by pytorch -libzlib|1.2.13 # We need to pin this, such that we can later install libxml2 and other libraries which are not compatible with libzlib >= 1.3.0 From 709c62a4be72dff78f10fce29c4d370f08b3283f Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 8 Aug 2024 07:17:40 -0300 Subject: [PATCH 11/25] Changed conda packages Removed direct dependency for: - _openmp_mutex - libblas Updated gxx_linux-64/gcc_linux-64 --- .../flavor_base/build_deps/packages/conda_packages | 4 ++-- .../flavor_base/language_deps/packages/conda_packages | 1 - .../flavor_base/udfclient_deps/packages/conda_packages | 1 - .../flavor_base/build_deps/packages/conda_packages | 4 ++-- .../flavor_base/language_deps/packages/conda_packages | 1 - .../flavor_base/udfclient_deps/packages/conda_packages | 1 - 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages index 1e0bcda76..0c3c0044b 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages @@ -1,6 +1,6 @@ protobuf|4.25.3 pcre|8.45 bazel|7.2.1 -gxx_linux-64|12.1.0 -gcc_linux-64|12.1.0 +gxx_linux-64|12.4.0 +gcc_linux-64|12.4.0 make|4.3 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages index 342c71d0a..1f4bade7c 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/language_deps/packages/conda_packages @@ -2,5 +2,4 @@ python|3.10.4 numpy|1.26.2 pandas|2.2.2 pyarrow|16.0.0 -libblas|3.9.0=15_linux64_mkl mamba|1.5.1 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages index 13feaf0f0..6010b5b73 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -3,4 +3,3 @@ zeromq|4.3.5 openssl|3.3.1 nss|3.100 cppzmq|4.10.0 -_openmp_mutex|4.5=2_kmp_llvm # We need this, such that we can later install libblas with mkl, which is for example needed by pytorch diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages index 1e0bcda76..0c3c0044b 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages @@ -1,6 +1,6 @@ protobuf|4.25.3 pcre|8.45 bazel|7.2.1 -gxx_linux-64|12.1.0 -gcc_linux-64|12.1.0 +gxx_linux-64|12.4.0 +gcc_linux-64|12.4.0 make|4.3 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages index fba8c86fe..4d6141141 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/language_deps/packages/conda_packages @@ -3,6 +3,5 @@ numpy|1.26.2 pandas|2.2.2 pyarrow|16.0.0 libarrow|16.0.0=he216f8a_1_cuda -libblas|3.9.0=15_linux64_mkl mamba|1.5.1 cuda-toolkit|11.8.0 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages index 13feaf0f0..6010b5b73 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -3,4 +3,3 @@ zeromq|4.3.5 openssl|3.3.1 nss|3.100 cppzmq|4.10.0 -_openmp_mutex|4.5=2_kmp_llvm # We need this, such that we can later install libblas with mkl, which is for example needed by pytorch From cd72d8ccf4b92393220b810c46989e31e92d1681 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:34:35 -0300 Subject: [PATCH 12/25] Fixes from review --- exaudfclient/base/javacontainer/BUILD | 3 +-- .../flavor_base/udfclient_deps/packages/conda_packages | 1 - .../flavor_base/udfclient_deps/packages/conda_packages | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD index 3bd7028f4..9641b529c 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -135,8 +135,7 @@ genrule( "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", "orig/com/exasol/swig/SWIGVM_datatype_e.java", "orig/com/exasol/swig/SWIGVM_itertype_e.java", - ], - tools = ["//:filter_swig_code.py"] + ] ) cc_library( diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages index 6010b5b73..45e2852af 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -1,5 +1,4 @@ libprotobuf|4.25.3 zeromq|4.3.5 -openssl|3.3.1 nss|3.100 cppzmq|4.10.0 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages index 6010b5b73..45e2852af 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/udfclient_deps/packages/conda_packages @@ -1,5 +1,4 @@ libprotobuf|4.25.3 zeromq|4.3.5 -openssl|3.3.1 nss|3.100 cppzmq|4.10.0 From 0d08a51a69481255ebb5245524fa53da481f34e0 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:18:57 -0300 Subject: [PATCH 13/25] Moved exaudf into a submodule which can be included in extension --- exaudfclient/base/.bazelrc | 6 +- exaudfclient/base/BUILD | 182 ------------------ exaudfclient/base/MODULE.bazel | 50 +---- exaudfclient/base/README.md | 6 +- exaudfclient/base/exaudf/BUILD | 182 ++++++++++++++++++ exaudfclient/base/exaudf/base.MODULE.bazel | 49 +++++ .../{ => exaudf}/benchmark_container/BUILD | 2 +- .../benchmark_container.cc | 2 +- .../benchmark_container/benchmark_container.h | 8 +- .../base/{ => exaudf}/build_integrated.py | 0 .../{ => exaudf}/create_binary_wrapper.sh | 0 ...reate_binary_wrapper_stdout_to_bucketfs.sh | 0 .../create_binary_wrapper_valgrind.sh | 0 .../create_binary_wrapper_valgrind_massif.sh | 0 .../base/{ => exaudf}/debug_message.h | 0 .../base/{ => exaudf}/exaudfclient.cc | 6 +- .../{ => exaudf}/exaudfclient.template.sh | 0 .../base/{ => exaudf}/exaudflib/BUILD | 12 +- .../base/{ => exaudf}/exaudflib/exascript.i | 6 +- .../base/{ => exaudf}/exaudflib/impl/check.cc | 6 +- .../base/{ => exaudf}/exaudflib/impl/check.h | 0 .../exaudflib/impl/exaudflib_main.cc | 16 +- .../{ => exaudf}/exaudflib/impl/global.cc | 2 +- .../base/{ => exaudf}/exaudflib/impl/global.h | 6 +- .../exaudflib/impl/msg_conversion.cc | 2 +- .../exaudflib/impl/msg_conversion.h | 0 .../exaudflib/impl/socket_high_level.cc | 16 +- .../exaudflib/impl/socket_high_level.h | 0 .../exaudflib/impl/socket_info.cc | 2 +- .../{ => exaudf}/exaudflib/impl/socket_info.h | 0 .../exaudflib/impl/socket_low_level.cc | 6 +- .../exaudflib/impl/socket_low_level.h | 0 .../exaudflib/impl/swig/swig_factory.cc | 6 +- .../impl/swig/swig_general_iterator.cc | 3 + .../impl/swig/swig_general_iterator.h | 4 +- .../exaudflib/impl/swig/swig_meta_data.cc | 3 + .../exaudflib/impl/swig/swig_meta_data.h | 12 +- .../impl/swig/swig_result_handler.cc | 3 + .../exaudflib/impl/swig/swig_result_handler.h | 14 +- .../impl/swig/swig_table_iterator.cc | 3 + .../exaudflib/impl/swig/swig_table_iterator.h | 12 +- .../{ => exaudf}/exaudflib/load_dynamic.h | 0 .../swig/script_data_transfer_objects.cc | 0 .../swig/script_data_transfer_objects.h | 0 .../script_data_transfer_objects_wrapper.cc | 0 .../script_data_transfer_objects_wrapper.h | 0 .../base/exaudf/exaudflib/swig/swig_common.cc | 2 + .../{ => exaudf}/exaudflib/swig/swig_common.h | 0 .../exaudf/exaudflib/swig/swig_meta_data.cc | 2 + .../exaudflib/swig/swig_meta_data.h | 6 +- .../exaudflib/swig/swig_result_handler.cc | 2 + .../exaudflib/swig/swig_result_handler.h | 4 +- .../exaudflib/swig/swig_table_iterator.cc | 2 + .../exaudflib/swig/swig_table_iterator.h | 2 +- .../base/{ => exaudf}/exaudflib/test/BUILD | 4 +- .../script_data_transfer_objects_test.cpp | 2 +- .../test/script_option_lines_test.cpp | 2 +- .../exaudflib/udf_plugin_interface.h | 0 .../exaudflib/vm/scriptoptionlines.cc | 0 .../exaudflib/vm/scriptoptionlines.h | 0 .../base/{ => exaudf}/exaudflib/vm/swig_vm.cc | 2 +- .../base/{ => exaudf}/exaudflib/vm/swig_vm.h | 4 +- .../{ => exaudf}/exaudflib/zmqcontainer.proto | 0 .../base/{ => exaudf}/filter_swig_code.py | 0 .../base/{ => exaudf}/java_repository.bzl | 0 .../base/{ => exaudf}/javacontainer/BUILD | 20 +- .../javacontainer/ExaCompiler.java | 0 .../ExaConnectionInformationImpl.java | 0 .../ExaExportSpecificationImpl.java | 0 .../ExaImportSpecificationImpl.java | 0 .../javacontainer/ExaIteratorImpl.java | 0 .../javacontainer/ExaMetadataImpl.java | 0 .../javacontainer/ExaStackTraceCleaner.java | 0 .../ExaUndefinedSingleCallException.java | 0 .../javacontainer/ExaWrapper.java | 0 .../javacontainer/exascript_java_jni_decl.h | 0 .../javacontainer/javacontainer.cc | 0 .../javacontainer/javacontainer.h | 2 +- .../javacontainer/javacontainer_impl.cc | 6 +- .../javacontainer/javacontainer_impl.h | 2 +- .../{ => exaudf}/javacontainer/test/BUILD | 0 .../javacontainer/test/cpp/exaudf_wrapper.cc | 2 +- .../test/cpp/javacontainer_test.cc | 0 .../javacontainer/test/cpp/javavm_test.cc | 0 .../javacontainer/test/cpp/javavm_test.h | 0 .../com/exasol/ExaStackTraceCleanerTest.java | 0 .../{ => exaudf}/javacontainer/test/test.jar | 0 .../base/{ => exaudf}/load_dynamic.cc | 2 +- .../base/{ => exaudf}/protobuf_repository.bzl | 0 exaudfclient/base/{ => exaudf}/python/BUILD | 0 .../python/exascript_python_preset_core.py | 0 .../python/exascript_python_wrap.py | 0 .../extend_exascript_python_preset_py.sh | 0 .../base/{ => exaudf}/python/python3/BUILD | 38 ++-- .../python/python3/python_ext_dataframe.cc | 4 +- .../{ => exaudf}/python/pythoncontainer.cc | 8 +- .../{ => exaudf}/python/pythoncontainer.h | 2 +- .../base/{ => exaudf}/python_repository.bzl | 0 .../{ => exaudf}/streaming_container/BUILD | 2 +- .../streaming_container/streamingcontainer.cc | 0 .../streaming_container/streamingcontainer.h | 0 exaudfclient/base/{ => exaudf}/variables.bzl | 8 +- .../base/{ => exaudf}/zmq_repository.bzl | 0 .../impl/swig/swig_general_iterator.cc | 3 - .../exaudflib/impl/swig/swig_meta_data.cc | 3 - .../impl/swig/swig_result_handler.cc | 3 - .../impl/swig/swig_table_iterator.cc | 3 - .../base/exaudflib/swig/swig_common.cc | 2 - .../base/exaudflib/swig/swig_meta_data.cc | 2 - .../exaudflib/swig/swig_result_handler.cc | 2 - .../exaudflib/swig/swig_table_iterator.cc | 2 - exaudfclient/base/visualize_all.sh | 2 +- 112 files changed, 390 insertions(+), 389 deletions(-) create mode 100644 exaudfclient/base/exaudf/BUILD create mode 100644 exaudfclient/base/exaudf/base.MODULE.bazel rename exaudfclient/base/{ => exaudf}/benchmark_container/BUILD (58%) rename exaudfclient/base/{ => exaudf}/benchmark_container/benchmark_container.cc (99%) rename exaudfclient/base/{ => exaudf}/benchmark_container/benchmark_container.h (78%) rename exaudfclient/base/{ => exaudf}/build_integrated.py (100%) rename exaudfclient/base/{ => exaudf}/create_binary_wrapper.sh (100%) rename exaudfclient/base/{ => exaudf}/create_binary_wrapper_stdout_to_bucketfs.sh (100%) rename exaudfclient/base/{ => exaudf}/create_binary_wrapper_valgrind.sh (100%) rename exaudfclient/base/{ => exaudf}/create_binary_wrapper_valgrind_massif.sh (100%) rename exaudfclient/base/{ => exaudf}/debug_message.h (100%) rename exaudfclient/base/{ => exaudf}/exaudfclient.cc (97%) rename exaudfclient/base/{ => exaudf}/exaudfclient.template.sh (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/BUILD (93%) rename exaudfclient/base/{ => exaudf}/exaudflib/exascript.i (96%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/check.cc (95%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/check.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/exaudflib_main.cc (97%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/global.cc (98%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/global.h (83%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/msg_conversion.cc (97%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/msg_conversion.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_high_level.cc (98%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_high_level.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_info.cc (92%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_info.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_low_level.cc (96%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/socket_low_level.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/impl/swig/swig_factory.cc (73%) create mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc rename exaudfclient/base/{ => exaudf}/exaudflib/impl/swig/swig_general_iterator.h (88%) create mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc rename exaudfclient/base/{ => exaudf}/exaudflib/impl/swig/swig_meta_data.h (97%) create mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc rename exaudfclient/base/{ => exaudf}/exaudflib/impl/swig/swig_result_handler.h (97%) create mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc rename exaudfclient/base/{ => exaudf}/exaudflib/impl/swig/swig_table_iterator.h (98%) rename exaudfclient/base/{ => exaudf}/exaudflib/load_dynamic.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/swig/script_data_transfer_objects.cc (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/swig/script_data_transfer_objects.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/swig/script_data_transfer_objects_wrapper.cc (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/swig/script_data_transfer_objects_wrapper.h (100%) create mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc rename exaudfclient/base/{ => exaudf}/exaudflib/swig/swig_common.h (100%) create mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc rename exaudfclient/base/{ => exaudf}/exaudflib/swig/swig_meta_data.h (96%) create mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc rename exaudfclient/base/{ => exaudf}/exaudflib/swig/swig_result_handler.h (96%) create mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc rename exaudfclient/base/{ => exaudf}/exaudflib/swig/swig_table_iterator.h (98%) rename exaudfclient/base/{ => exaudf}/exaudflib/test/BUILD (62%) rename exaudfclient/base/{ => exaudf}/exaudflib/test/script_data_transfer_objects_test.cpp (99%) rename exaudfclient/base/{ => exaudf}/exaudflib/test/script_option_lines_test.cpp (99%) rename exaudfclient/base/{ => exaudf}/exaudflib/udf_plugin_interface.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/vm/scriptoptionlines.cc (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/vm/scriptoptionlines.h (100%) rename exaudfclient/base/{ => exaudf}/exaudflib/vm/swig_vm.cc (50%) rename exaudfclient/base/{ => exaudf}/exaudflib/vm/swig_vm.h (92%) rename exaudfclient/base/{ => exaudf}/exaudflib/zmqcontainer.proto (100%) rename exaudfclient/base/{ => exaudf}/filter_swig_code.py (100%) rename exaudfclient/base/{ => exaudf}/java_repository.bzl (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/BUILD (90%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaCompiler.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaConnectionInformationImpl.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaExportSpecificationImpl.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaImportSpecificationImpl.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaIteratorImpl.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaMetadataImpl.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaStackTraceCleaner.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaUndefinedSingleCallException.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/ExaWrapper.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/exascript_java_jni_decl.h (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/javacontainer.cc (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/javacontainer.h (93%) rename exaudfclient/base/{ => exaudf}/javacontainer/javacontainer_impl.cc (99%) rename exaudfclient/base/{ => exaudf}/javacontainer/javacontainer_impl.h (98%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/BUILD (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/cpp/exaudf_wrapper.cc (87%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/cpp/javacontainer_test.cc (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/cpp/javavm_test.cc (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/cpp/javavm_test.h (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java (100%) rename exaudfclient/base/{ => exaudf}/javacontainer/test/test.jar (100%) rename exaudfclient/base/{ => exaudf}/load_dynamic.cc (93%) rename exaudfclient/base/{ => exaudf}/protobuf_repository.bzl (100%) rename exaudfclient/base/{ => exaudf}/python/BUILD (100%) rename exaudfclient/base/{ => exaudf}/python/exascript_python_preset_core.py (100%) rename exaudfclient/base/{ => exaudf}/python/exascript_python_wrap.py (100%) rename exaudfclient/base/{ => exaudf}/python/extend_exascript_python_preset_py.sh (100%) rename exaudfclient/base/{ => exaudf}/python/python3/BUILD (59%) rename exaudfclient/base/{ => exaudf}/python/python3/python_ext_dataframe.cc (99%) rename exaudfclient/base/{ => exaudf}/python/pythoncontainer.cc (99%) rename exaudfclient/base/{ => exaudf}/python/pythoncontainer.h (92%) rename exaudfclient/base/{ => exaudf}/python_repository.bzl (100%) rename exaudfclient/base/{ => exaudf}/streaming_container/BUILD (72%) rename exaudfclient/base/{ => exaudf}/streaming_container/streamingcontainer.cc (100%) rename exaudfclient/base/{ => exaudf}/streaming_container/streamingcontainer.h (100%) rename exaudfclient/base/{ => exaudf}/variables.bzl (68%) rename exaudfclient/base/{ => exaudf}/zmq_repository.bzl (100%) delete mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc delete mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc delete mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc delete mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc delete mode 100644 exaudfclient/base/exaudflib/swig/swig_common.cc delete mode 100644 exaudfclient/base/exaudflib/swig/swig_meta_data.cc delete mode 100644 exaudfclient/base/exaudflib/swig/swig_result_handler.cc delete mode 100644 exaudfclient/base/exaudflib/swig/swig_table_iterator.cc diff --git a/exaudfclient/base/.bazelrc b/exaudfclient/base/.bazelrc index 1607ca871..676ecf895 100644 --- a/exaudfclient/base/.bazelrc +++ b/exaudfclient/base/.bazelrc @@ -3,9 +3,9 @@ build --copt='-std=c++17' --force_pic --action_env=PROTOBUF_BIN --action_env=PRO build:benchmark --define benchmark=true build:java --define java=true --action_env=JAVA_PREFIX build:python --define python=true --action_env=PYTHON2_SYSPATH --action_env=PYTHON2_PREFIX --action_env=PYTHON2_VERSION --action_env=NUMPY_PREFIX --action_env=PYTHON3_SYSPATH --action_env=PYTHON3_PREFIX --action_env=PYTHON3_VERSION -build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient_py3 -build:slow-wrapper-py3 --define binary_type=slow_wrapper //:exaudfclient_py3 -build:static-binary-py3 //:exaudfclient_py3_static +build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //exaudf:exaudfclient_py3 +build:slow-wrapper-py3 --define binary_type=slow_wrapper //exaudf:exaudfclient_py3 +build:static-binary-py3 //exaudf:exaudfclient_py3_static build:test-binaries-py3 --config=static-binary-py3 --config=slow-wrapper-py3 build:verbose --copt='-v' --subcommands --verbose_failures --announce_rc #TODO test linkopts="-flto" diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index 43de10fe0..e69de29bb 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -1,182 +0,0 @@ -package(default_visibility = ["//visibility:public"]) -exports_files(["filter_swig_code.py", "build_integrated.py", - "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", "create_binary_wrapper_valgrind_massif.sh"]) - -load("//:variables.bzl", "VM_ENABLED_DEFINES") - -config_setting( - name = "benchmark", - define_values = {"benchmark": "true"}, -) - -config_setting( - name = "python", - define_values = {"python": "true"}, -) - -config_setting( - name = "java", - define_values = {"java": "true"}, -) - -config_setting( - name = "bash", - define_values = {"bash": "true"}, -) - -config_setting( - name = "fast_binary", - define_values = { - "binary_type": "fast_binary", - }, -) - -config_setting( - name = "slow_wrapper", - define_values = { - "binary_type": "slow_wrapper", - }, -) - -config_setting( - name = "valgrind_wrapper", - define_values = { - "wrapper_type": "valgrind_wrapper", - }, -) - -config_setting( - name = "valgrind_massif_wrapper", - define_values = { - "wrapper_type": "valgrind_massif_wrapper", - }, -) - -config_setting( - name = "stdout_to_bucketfs", - define_values = { - "wrapper_type": "stdout_to_bucketfs", - }, -) - -cc_library( - name = "debug_message_h", - hdrs = [ - "debug_message.h" - ], -) - -# Using cc_binary to build a shared library as output target is a workaround, because -# Bazel's cc_library are only intermediate stages and can be used as output target. -# It is necessary to include //exaudflib:exaudflib into deps and srcs, because -# otherwise dlmopen won't find the symbols of exaudflib and its dependencies. The target //exaudflib:exaudflib-deps -# won't work either, because it only contains the libraries as dependencies. -# Bazel builts a static library (.a) and a dynamic library (.so) out of exaudflib:exaudflib. -# In the libexaudflib_complete.so-2.params, we saw that Bazel uses both libraries to built libexaudflib_complete.so. -# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. -cc_binary( - name = "libexaudflib_complete.so", - linkshared = 1, - srcs = ["//exaudflib:exaudflib"], - deps = ["//exaudflib:exaudflib"], - defines = VM_ENABLED_DEFINES, -) - - -VM_ENABLED_DEPS=select({ - ":benchmark": ["//benchmark_container:benchmark_container"], - "//conditions:default": [] - }) + select({ - ":java": ["//javacontainer:javacontainer"], - "//conditions:default": [] - }) + select({ - ":bash": ["//streaming_container:streamingcontainer"], - "//conditions:default": [] - }) - -VM_PYTHON3_DEPS=select({ - ":python": ["//python/python3:pythoncontainer"], - "//conditions:default": [] - }) - -cc_binary( - name = "exaudfclient_py3_bin", - srcs = ["exaudfclient.cc", "load_dynamic.cc"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudflib:header", "//:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudflib:exaudflib-deps"], - defines = VM_ENABLED_DEFINES, - data = [":libexaudflib_complete.so"] -) - -## The purpose of the static binaries is to verify if the linker namespace test work correctly. -## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, -## so that the user can load it's own versions of those dependencies without any conflict. -## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, -## which then must be detected with the linker namespace tests: -## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration -## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects -## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. -## -## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//exaudflib:exaudflib) -## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) -## as dependency as it is a binary for bazel. - -cc_binary( - name = "exaudfclient_py3_static_bin", - srcs = ["exaudfclient.cc", "load_dynamic.cc"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudflib:header", "//:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"], - defines = VM_ENABLED_DEFINES, - data = [":libexaudflib_complete.so"], -) - -# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc -# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths -# - Most flexible way to provides these paths would environment variables -# - The exasol database can't provide these paths, because they depend on the container -# - A workarround to provide these paths would be wrapper bash script which set these environment variables -# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing -# and we hardcode the paths for the production container - -sh_library( - name = "wrapper_generator_bin", - srcs=select({ - "//:valgrind_wrapper": ["//:create_binary_wrapper_valgrind.sh"], - "//:valgrind_massif_wrapper": ["//:create_binary_wrapper_valgrind_massif.sh"], - "//:stdout_to_bucketfs": ["//:create_binary_wrapper_stdout_to_bucketfs.sh"], - "//conditions:default": ["//:create_binary_wrapper.sh"] - }) -) - -SLOW_WRAPPER_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ -CREATE_BINARY_PY3_SCRIPT=select({ - "//:fast_binary": FAST_BINARY_PY3, - "//:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, - "//conditions:default": FAST_BINARY_PY3 - }) -genrule( - name = "exaudfclient_py3", - cmd = CREATE_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3"], - srcs = [":exaudfclient_py3_bin", "//:libexaudflib_complete.so", "exaudfclient.template.sh", "//:wrapper_generator_bin"], - output_to_bindir = True -) - -SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ -CREATE_STATIC_BINARY_PY3_SCRIPT=select({ - "//:fast_binary": FAST_BINARY_STATIC_PY3, - "//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, - "//conditions:default": FAST_BINARY_STATIC_PY3 - }) - -genrule( - name = "exaudfclient_py3_static", - cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3_static"], - srcs = [":exaudfclient_py3_static_bin", "//:libexaudflib_complete.so", "exaudfclient.template.sh", "//:wrapper_generator_bin"], - output_to_bindir = True -) diff --git a/exaudfclient/base/MODULE.bazel b/exaudfclient/base/MODULE.bazel index 4bb1d5f0b..c36da516c 100644 --- a/exaudfclient/base/MODULE.bazel +++ b/exaudfclient/base/MODULE.bazel @@ -7,52 +7,4 @@ module(name="exaudfclient", version = "1.0") -bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep(name = "googletest", version = "1.15.0") -bazel_dep(name = "rules_java", version = "6.1.1") -bazel_dep(name = "rules_jvm_external", version = "6.2") - -python_local_repository = use_repo_rule("//:python_repository.bzl", "python_local_repository") -python_local_repository(name = "python3", python_version="python3") - -numpy_local_repository = use_repo_rule("//:python_repository.bzl", "numpy_local_repository") - -numpy_local_repository(name = "numpy") - -zmq_local_repository = use_repo_rule("//:zmq_repository.bzl", "zmq_local_repository") -zmq_local_repository(name = "zmq") - -protobuf_local_repository = use_repo_rule("//:protobuf_repository.bzl", "protobuf_local_repository") -protobuf_local_repository(name = "protobuf") - - -new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") - -new_local_repository( - name = "ssl", - build_file_content = """ -cc_library( - name = "ssl", - srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], - hdrs = glob(["usr/include/openssl/*.h"]), - includes = ["usr/include/openssl"], - visibility = ["//visibility:public"] -) - """, - path = "/", -) - - -java_local_repository = use_repo_rule("//:java_repository.bzl", "java_local_repository") -java_local_repository(name = "java") - -maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") -maven.install( - artifacts = [ - "com.exasol:udf-api-java:1.0.5", - ], - repositories = [ - "https://repo1.maven.org/maven2", - ], -) -use_repo(maven, "maven") +include("//exaudf:base.MODULE.bazel") \ No newline at end of file diff --git a/exaudfclient/base/README.md b/exaudfclient/base/README.md index 12538e4ef..ae7253f08 100644 --- a/exaudfclient/base/README.md +++ b/exaudfclient/base/README.md @@ -52,11 +52,11 @@ With Bazel defines you can specify which language support is actually compiled i --define benchmark=true # This language is only for test and development purpose and benchmarks the performance of the C++ Implementation -The main targets are //:exaudfclient and //:exaudfclient_py3. The former one compiles with Python 2 support if Python is via defines enable. The later one instead compiles with Python 3 support. +The main targets are //:exaudfclient and //exaudf:exaudfclient_py3. The former one compiles with Python 2 support if Python is via defines enable. The later one instead compiles with Python 3 support. ## Visualizing the build dependencies -Bazel allows to query the dependencies of a target. Furthermore, it can export the dependencies as .dot file. With Graphviz you can generate figures from the .dot file. The script visualize_deps.sh and visualize_all.sh wrap this process. The script visualize_all.sh visualizes the dependencies of the main targets //:exaudfclient and //:exaudfclient_py3. The script visualize_deps.sh visualizes the dependencies of given targets. +Bazel allows to query the dependencies of a target. Furthermore, it can export the dependencies as .dot file. With Graphviz you can generate figures from the .dot file. The script visualize_deps.sh and visualize_all.sh wrap this process. The script visualize_all.sh visualizes the dependencies of the main targets //:exaudfclient and //exaudf:exaudfclient_py3. The script visualize_deps.sh visualizes the dependencies of given targets. visualize_deps.sh @@ -70,7 +70,7 @@ The usage of multiple linker namespace requires some precautions in the build pr ## Precautions in the build process -In the build process you need to be cautious which libraries you link together and that no link leaks symbols from a library in one namespace to a library in the other namespace. Furthermore, you have to build a shared library with all dependency linked to it as output target. In our case, we have to main output targets //:exaudfclient and //:libexaudflib.so. Both get loaded into different linker namespaces. The language container live in the same namespace as //:exaudfclient. This namespace must not know anyhing about protobuf and zeromq, because it is possible that a language container may load protobuf or zeromq in a different version. Protobuf and zeromq are only known in the namespace of //:libexaudflib.so. The target //:libexaudflib.so depends on //exaudflib:exaudflib which contains the logic of the exaudflib. You must not depend on //exaudflib:exaudflib in //:exaudfclient or the langauge container, because this would leak zeromq and protobuf. If you need to depend on the other dependency of //exaudflib:exaudflib which not depend on protobuf or zeromq them self, such as //exaudflib:script_data_transfer_objects, //exaudflib:script_data_transfer_objects_wrapper, //exaudflib:scriptoptionlines, use either their target as self, the collection of libraries //exaudflib:exaudflib-deps or the collection of headers //exaudflib:header. +In the build process you need to be cautious which libraries you link together and that no link leaks symbols from a library in one namespace to a library in the other namespace. Furthermore, you have to build a shared library with all dependency linked to it as output target. In our case, we have to main output targets //:exaudfclient and //:libexaudflib.so. Both get loaded into different linker namespaces. The language container live in the same namespace as //:exaudfclient. This namespace must not know anyhing about protobuf and zeromq, because it is possible that a language container may load protobuf or zeromq in a different version. Protobuf and zeromq are only known in the namespace of //:libexaudflib.so. The target //:libexaudflib.so depends on //exaudf/exaudflib:exaudflib which contains the logic of the exaudflib. You must not depend on //exaudf/exaudflib:exaudflib in //:exaudfclient or the langauge container, because this would leak zeromq and protobuf. If you need to depend on the other dependency of //exaudf/exaudflib:exaudflib which not depend on protobuf or zeromq them self, such as //exaudf/exaudflib:script_data_transfer_objects, //exaudf/exaudflib:script_data_transfer_objects_wrapper, //exaudf/exaudflib:scriptoptionlines, use either their target as self, the collection of libraries //exaudf/exaudflib:exaudflib-deps or the collection of headers //exaudf/exaudflib:header. ## Precautions in the implementations diff --git a/exaudfclient/base/exaudf/BUILD b/exaudfclient/base/exaudf/BUILD new file mode 100644 index 000000000..19f4adbd1 --- /dev/null +++ b/exaudfclient/base/exaudf/BUILD @@ -0,0 +1,182 @@ +package(default_visibility = ["//visibility:public"]) +exports_files(["filter_swig_code.py", "build_integrated.py", + "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", "create_binary_wrapper_valgrind_massif.sh"]) + +load("//exaudf:variables.bzl", "VM_ENABLED_DEFINES") + +config_setting( + name = "benchmark", + define_values = {"benchmark": "true"}, +) + +config_setting( + name = "python", + define_values = {"python": "true"}, +) + +config_setting( + name = "java", + define_values = {"java": "true"}, +) + +config_setting( + name = "bash", + define_values = {"bash": "true"}, +) + +config_setting( + name = "fast_binary", + define_values = { + "binary_type": "fast_binary", + }, +) + +config_setting( + name = "slow_wrapper", + define_values = { + "binary_type": "slow_wrapper", + }, +) + +config_setting( + name = "valgrind_wrapper", + define_values = { + "wrapper_type": "valgrind_wrapper", + }, +) + +config_setting( + name = "valgrind_massif_wrapper", + define_values = { + "wrapper_type": "valgrind_massif_wrapper", + }, +) + +config_setting( + name = "stdout_to_bucketfs", + define_values = { + "wrapper_type": "stdout_to_bucketfs", + }, +) + +cc_library( + name = "debug_message_h", + hdrs = [ + "debug_message.h" + ], +) + +# Using cc_binary to build a shared library as output target is a workaround, because +# Bazel's cc_library are only intermediate stages and can be used as output target. +# It is necessary to include //exaudf/exaudflib:exaudflib into deps and srcs, because +# otherwise dlmopen won't find the symbols of exaudflib and its dependencies. The target //exaudf/exaudflib:exaudflib-deps +# won't work either, because it only contains the libraries as dependencies. +# Bazel builts a static library (.a) and a dynamic library (.so) out of exaudflib:exaudflib. +# In the libexaudflib_complete.so-2.params, we saw that Bazel uses both libraries to built libexaudflib_complete.so. +# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. +cc_binary( + name = "libexaudflib_complete.so", + linkshared = 1, + srcs = ["//exaudf/exaudflib:exaudflib"], + deps = ["//exaudf/exaudflib:exaudflib"], + defines = VM_ENABLED_DEFINES, +) + + +VM_ENABLED_DEPS=select({ + "//exaudf:benchmark": ["//exaudf/benchmark_container:benchmark_container"], + "//conditions:default": [] + }) + select({ + "//exaudf:java": ["//exaudf/javacontainer:javacontainer"], + "//conditions:default": [] + }) + select({ + "//exaudf:bash": ["//exaudf/streaming_container:streamingcontainer"], + "//conditions:default": [] + }) + +VM_PYTHON3_DEPS=select({ + "//exaudf:python": ["//exaudf/python/python3:pythoncontainer"], + "//conditions:default": [] + }) + +cc_binary( + name = "exaudfclient_py3_bin", + srcs = ["exaudfclient.cc", "load_dynamic.cc"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//exaudf/exaudflib:exaudflib-deps"], + defines = VM_ENABLED_DEFINES, + data = ["//exaudf:libexaudflib_complete.so"] +) + +## The purpose of the static binaries is to verify if the linker namespace test work correctly. +## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, +## so that the user can load it's own versions of those dependencies without any conflict. +## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, +## which then must be detected with the linker namespace tests: +## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration +## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects +## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. +## +## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//exaudf/exaudflib:exaudflib) +## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) +## as dependency as it is a binary for bazel. + +cc_binary( + name = "exaudfclient_py3_static_bin", + srcs = ["exaudfclient.cc", "load_dynamic.cc"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//exaudf/exaudflib:exaudflib-deps"] + [ "@zmq//exaudf:zmq", "@protobuf//exaudf:protobuf"], + defines = VM_ENABLED_DEFINES, + data = ["//exaudf:libexaudflib_complete.so"], +) + +# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc +# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths +# - Most flexible way to provides these paths would environment variables +# - The exasol database can't provide these paths, because they depend on the container +# - A workarround to provide these paths would be wrapper bash script which set these environment variables +# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing +# and we hardcode the paths for the production container + +sh_library( + name = "wrapper_generator_bin", + srcs=select({ + "//exaudf:valgrind_wrapper": ["//exaudf:create_binary_wrapper_valgrind.sh"], + "//exaudf:valgrind_massif_wrapper": ["//exaudf:create_binary_wrapper_valgrind_massif.sh"], + "//exaudf:stdout_to_bucketfs": ["//exaudf:create_binary_wrapper_stdout_to_bucketfs.sh"], + "//conditions:default": ["//exaudf:create_binary_wrapper.sh"] + }) +) + +SLOW_WRAPPER_BINARY_PY3="""$(location //exaudf:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location exaudfclient.template.sh)" """ +FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ +CREATE_BINARY_PY3_SCRIPT=select({ + "//exaudf:fast_binary": FAST_BINARY_PY3, + "//exaudf:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, + "//conditions:default": FAST_BINARY_PY3 + }) +genrule( + name = "exaudfclient_py3", + cmd = CREATE_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3"], + srcs = [":exaudfclient_py3_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//exaudf:wrapper_generator_bin"], + output_to_bindir = True +) + +SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //exaudf:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location exaudfclient.template.sh)" """ +FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ +CREATE_STATIC_BINARY_PY3_SCRIPT=select({ + "//exaudf:fast_binary": FAST_BINARY_STATIC_PY3, + "//exaudf:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, + "//conditions:default": FAST_BINARY_STATIC_PY3 + }) + +genrule( + name = "exaudfclient_py3_static", + cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3_static"], + srcs = [":exaudfclient_py3_static_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//exaudf:wrapper_generator_bin"], + output_to_bindir = True +) diff --git a/exaudfclient/base/exaudf/base.MODULE.bazel b/exaudfclient/base/exaudf/base.MODULE.bazel new file mode 100644 index 000000000..4a983396d --- /dev/null +++ b/exaudfclient/base/exaudf/base.MODULE.bazel @@ -0,0 +1,49 @@ +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "googletest", version = "1.15.0") +bazel_dep(name = "rules_java", version = "6.1.1") +bazel_dep(name = "rules_jvm_external", version = "6.2") + +python_local_repository = use_repo_rule("//exaudf:python_repository.bzl", "python_local_repository") +python_local_repository(name = "python3", python_version="python3") + +numpy_local_repository = use_repo_rule("//exaudf:python_repository.bzl", "numpy_local_repository") + +numpy_local_repository(name = "numpy") + +zmq_local_repository = use_repo_rule("//exaudf:zmq_repository.bzl", "zmq_local_repository") +zmq_local_repository(name = "zmq") + +protobuf_local_repository = use_repo_rule("//exaudf:protobuf_repository.bzl", "protobuf_local_repository") +protobuf_local_repository(name = "protobuf") + + +new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") + +new_local_repository( + name = "ssl", + build_file_content = """ +cc_library( + name = "ssl", + srcs = ["usr/lib/x86_64-linux-gnu/libssl.so","usr/lib/x86_64-linux-gnu/libcrypto.so"], + hdrs = glob(["usr/include/openssl/*.h"]), + includes = ["usr/include/openssl"], + visibility = ["//visibility:public"] +) + """, + path = "/", +) + + +java_local_repository = use_repo_rule("//exaudf:java_repository.bzl", "java_local_repository") +java_local_repository(name = "java") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.install( + artifacts = [ + "com.exasol:udf-api-java:1.0.5", + ], + repositories = [ + "https://repo1.maven.org/maven2", + ], +) +use_repo(maven, "maven") diff --git a/exaudfclient/base/benchmark_container/BUILD b/exaudfclient/base/exaudf/benchmark_container/BUILD similarity index 58% rename from exaudfclient/base/benchmark_container/BUILD rename to exaudfclient/base/exaudf/benchmark_container/BUILD index 7d544bdb0..1797eb98c 100644 --- a/exaudfclient/base/benchmark_container/BUILD +++ b/exaudfclient/base/exaudf/benchmark_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "benchmark_container", srcs = ["benchmark_container.cc","benchmark_container.h"], hdrs = ["benchmark_container.h"], - deps = ["//exaudflib:exaudflib-deps","//exaudflib:header", "//:debug_message_h"]+["//exaudflib:scriptoptionlines"] + deps = ["//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+["//exaudf/exaudflib:scriptoptionlines"] ) \ No newline at end of file diff --git a/exaudfclient/base/benchmark_container/benchmark_container.cc b/exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc similarity index 99% rename from exaudfclient/base/benchmark_container/benchmark_container.cc rename to exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc index bf4b5f562..52d88018d 100644 --- a/exaudfclient/base/benchmark_container/benchmark_container.cc +++ b/exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc @@ -2,7 +2,7 @@ #define ENABLE_BENCHMARK_VM #endif -#include "debug_message.h" +#include "exaudf/debug_message.h" #include "benchmark_container.h" #include #include diff --git a/exaudfclient/base/benchmark_container/benchmark_container.h b/exaudfclient/base/exaudf/benchmark_container/benchmark_container.h similarity index 78% rename from exaudfclient/base/benchmark_container/benchmark_container.h rename to exaudfclient/base/exaudf/benchmark_container/benchmark_container.h index e107f4b34..436ebd3f5 100644 --- a/exaudfclient/base/benchmark_container/benchmark_container.h +++ b/exaudfclient/base/exaudf/benchmark_container/benchmark_container.h @@ -1,7 +1,7 @@ -#include "exaudflib/vm/swig_vm.h" -#include "exaudflib/swig/swig_meta_data.h" -#include "exaudflib/swig/swig_result_handler.h" -#include "exaudflib/swig/swig_table_iterator.h" +#include "exaudf/exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/swig/swig_meta_data.h" +#include "exaudf/exaudflib/swig/swig_result_handler.h" +#include "exaudf/exaudflib/swig/swig_table_iterator.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/build_integrated.py b/exaudfclient/base/exaudf/build_integrated.py similarity index 100% rename from exaudfclient/base/build_integrated.py rename to exaudfclient/base/exaudf/build_integrated.py diff --git a/exaudfclient/base/create_binary_wrapper.sh b/exaudfclient/base/exaudf/create_binary_wrapper.sh similarity index 100% rename from exaudfclient/base/create_binary_wrapper.sh rename to exaudfclient/base/exaudf/create_binary_wrapper.sh diff --git a/exaudfclient/base/create_binary_wrapper_stdout_to_bucketfs.sh b/exaudfclient/base/exaudf/create_binary_wrapper_stdout_to_bucketfs.sh similarity index 100% rename from exaudfclient/base/create_binary_wrapper_stdout_to_bucketfs.sh rename to exaudfclient/base/exaudf/create_binary_wrapper_stdout_to_bucketfs.sh diff --git a/exaudfclient/base/create_binary_wrapper_valgrind.sh b/exaudfclient/base/exaudf/create_binary_wrapper_valgrind.sh similarity index 100% rename from exaudfclient/base/create_binary_wrapper_valgrind.sh rename to exaudfclient/base/exaudf/create_binary_wrapper_valgrind.sh diff --git a/exaudfclient/base/create_binary_wrapper_valgrind_massif.sh b/exaudfclient/base/exaudf/create_binary_wrapper_valgrind_massif.sh similarity index 100% rename from exaudfclient/base/create_binary_wrapper_valgrind_massif.sh rename to exaudfclient/base/exaudf/create_binary_wrapper_valgrind_massif.sh diff --git a/exaudfclient/base/debug_message.h b/exaudfclient/base/exaudf/debug_message.h similarity index 100% rename from exaudfclient/base/debug_message.h rename to exaudfclient/base/exaudf/debug_message.h diff --git a/exaudfclient/base/exaudfclient.cc b/exaudfclient/base/exaudf/exaudfclient.cc similarity index 97% rename from exaudfclient/base/exaudfclient.cc rename to exaudfclient/base/exaudf/exaudfclient.cc index f4269e6e2..db06f32ed 100644 --- a/exaudfclient/base/exaudfclient.cc +++ b/exaudfclient/base/exaudf/exaudfclient.cc @@ -15,8 +15,8 @@ #include //This is required for dynamic linking in new linker namespace, not required for plugins #endif #include -#include "exaudflib/vm/swig_vm.h" -#include "exaudflib/load_dynamic.h" +#include "exaudf/exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/load_dynamic.h" #ifdef ENABLE_BENCHMARK_VM #include "benchmark_container/benchmark_container.h" #endif @@ -24,7 +24,7 @@ #include "streaming_container/streamingcontainer.h" #endif #include -#include "debug_message.h" +#include "exaudf/debug_message.h" #include #include #include diff --git a/exaudfclient/base/exaudfclient.template.sh b/exaudfclient/base/exaudf/exaudfclient.template.sh similarity index 100% rename from exaudfclient/base/exaudfclient.template.sh rename to exaudfclient/base/exaudf/exaudfclient.template.sh diff --git a/exaudfclient/base/exaudflib/BUILD b/exaudfclient/base/exaudf/exaudflib/BUILD similarity index 93% rename from exaudfclient/base/exaudflib/BUILD rename to exaudfclient/base/exaudf/exaudflib/BUILD index 81dfd335e..fbff5069d 100644 --- a/exaudfclient/base/exaudflib/BUILD +++ b/exaudfclient/base/exaudf/exaudflib/BUILD @@ -1,7 +1,7 @@ package(default_visibility = ["//visibility:public"]) exports_files(["exascript.i"]) -load("//:variables.bzl", "VM_ENABLED_DEFINES") +load("//exaudf:variables.bzl", "VM_ENABLED_DEFINES") cc_library( name = "scriptoptionlines", @@ -17,7 +17,7 @@ cc_library( srcs = ["swig/script_data_transfer_objects.cc","swig/script_data_transfer_objects.h"], hdrs = ["swig/script_data_transfer_objects.h"], copts= select({ - "//:benchmark": ["-fno-lto"], + "//exaudf:benchmark": ["-fno-lto"], "//conditions:default": [] }), # We deactivate link time optimization for benchmark, @@ -31,7 +31,7 @@ cc_library( deps = [":script_data_transfer_objects"], hdrs = ["swig/script_data_transfer_objects_wrapper.h"], copts= select({ - "//:benchmark": ["-fno-lto"], + "//exaudf:benchmark": ["-fno-lto"], "//conditions:default": [] }), # We deactivate link time optimization for benchmark, @@ -82,8 +82,8 @@ cc_library( # The only target which must depend on it is //:libexaudflib-complete.so. # If you depend on this target you will load protobuf into your linker namespace # which might cause problems with tensorflow. If you need -# "//exaudflib:scriptoptionlines","//exaudflib:script_data_transfer_objects" or -# "//exaudflib:script_data_transfer_objects_wrapper" in the language container +# "//exaudf/exaudflib:scriptoptionlines","//exaudf/exaudflib:script_data_transfer_objects" or +# "//exaudf/exaudflib:script_data_transfer_objects_wrapper" in the language container # depend directly on them or depend on exaudflib-deps cc_library( name = "exaudflib", @@ -103,5 +103,5 @@ cc_library( "impl/swig/swig_general_iterator.h", "impl/swig/swig_general_iterator.cc"], defines = VM_ENABLED_DEFINES, linkstatic = False, # Needs to be false, because otherwise we might get missing symbols when loading exaudflib_complete.so - deps = [":exaudflib-deps", ":zmqcontainer", "@zmq//:zmq", ":header", "//:debug_message_h"], + deps = [":exaudflib-deps", ":zmqcontainer", "@zmq//:zmq", ":header", "//exaudf:debug_message_h"], ) diff --git a/exaudfclient/base/exaudflib/exascript.i b/exaudfclient/base/exaudf/exaudflib/exascript.i similarity index 96% rename from exaudfclient/base/exaudflib/exascript.i rename to exaudfclient/base/exaudf/exaudflib/exascript.i index bc6abf9bd..38900d3b0 100644 --- a/exaudfclient/base/exaudflib/exascript.i +++ b/exaudfclient/base/exaudf/exaudflib/exascript.i @@ -3,11 +3,11 @@ %} %{ -#include "exaudflib/swig/swig_result_handler.h" -#include "exaudflib/swig/swig_meta_data.h" +#include "exaudf/exaudflib/swig/swig_result_handler.h" +#include "exaudf/exaudflib/swig/swig_meta_data.h" using namespace SWIGVMContainers; -#include "exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" %} %ignore ExecutionGraph::ConnectionInformationWrapper::ConnectionInformationWrapper; diff --git a/exaudfclient/base/exaudflib/impl/check.cc b/exaudfclient/base/exaudf/exaudflib/impl/check.cc similarity index 95% rename from exaudfclient/base/exaudflib/impl/check.cc rename to exaudfclient/base/exaudf/exaudflib/impl/check.cc index 3dc1152f7..9b2821bf4 100644 --- a/exaudfclient/base/exaudflib/impl/check.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/check.cc @@ -1,12 +1,12 @@ -#include "exaudflib/impl/check.h" -#include "exaudflib/impl/socket_info.h" +#include "exaudf/exaudflib/impl/check.h" +#include "exaudf/exaudflib/impl/socket_info.h" #include #include #include #include -#include "debug_message.h" +#include "exaudf/debug_message.h" namespace exaudflib { namespace check { diff --git a/exaudfclient/base/exaudflib/impl/check.h b/exaudfclient/base/exaudf/exaudflib/impl/check.h similarity index 100% rename from exaudfclient/base/exaudflib/impl/check.h rename to exaudfclient/base/exaudf/exaudflib/impl/check.h diff --git a/exaudfclient/base/exaudflib/impl/exaudflib_main.cc b/exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc similarity index 97% rename from exaudfclient/base/exaudflib/impl/exaudflib_main.cc rename to exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc index 135e2445a..e04519d73 100644 --- a/exaudfclient/base/exaudflib/impl/exaudflib_main.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc @@ -10,20 +10,20 @@ #include #include -#include "debug_message.h" +#include "exaudf/debug_message.h" // swig lib #include -#include "exaudflib/impl/check.h" -#include "exaudflib/impl/socket_info.h" -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/impl/msg_conversion.h" -#include "exaudflib/impl/global.h" -#include "exaudflib/impl/socket_high_level.h" +#include "exaudf/exaudflib/impl/check.h" +#include "exaudf/exaudflib/impl/socket_info.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/impl/global.h" +#include "exaudf/exaudflib/impl/socket_high_level.h" -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/vm/swig_vm.h" #ifndef NDEBUG diff --git a/exaudfclient/base/exaudflib/impl/global.cc b/exaudfclient/base/exaudf/exaudflib/impl/global.cc similarity index 98% rename from exaudfclient/base/exaudflib/impl/global.cc rename to exaudfclient/base/exaudf/exaudflib/impl/global.cc index d5f570b1f..cbff32d47 100644 --- a/exaudfclient/base/exaudflib/impl/global.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/global.cc @@ -1,4 +1,4 @@ -#include "exaudflib/impl/global.h" +#include "exaudf/exaudflib/impl/global.h" #include namespace exaudflib { diff --git a/exaudfclient/base/exaudflib/impl/global.h b/exaudfclient/base/exaudf/exaudflib/impl/global.h similarity index 83% rename from exaudfclient/base/exaudflib/impl/global.h rename to exaudfclient/base/exaudf/exaudflib/impl/global.h index 61e0b8ccf..d7daae5ed 100644 --- a/exaudfclient/base/exaudflib/impl/global.h +++ b/exaudfclient/base/exaudf/exaudflib/impl/global.h @@ -1,9 +1,9 @@ #ifndef EXAUDFCLIENT_EXUDFLIB_GLOBAL_H #define EXAUDFCLIENT_EXUDFLIB_GLOBAL_H -#include "exaudflib/swig/script_data_transfer_objects.h" -#include "exaudflib/zmqcontainer.pb.h" -#include "exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" +#include "exaudf/exaudflib/zmqcontainer.pb.h" +#include "exaudf/exaudflib/swig/swig_common.h" #include namespace exaudflib { diff --git a/exaudfclient/base/exaudflib/impl/msg_conversion.cc b/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc similarity index 97% rename from exaudfclient/base/exaudflib/impl/msg_conversion.cc rename to exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc index c09ee024d..e71bd9ccb 100644 --- a/exaudfclient/base/exaudflib/impl/msg_conversion.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc @@ -1,4 +1,4 @@ -#include "exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" std::string exaudflib::msg_conversion::convert_message_type_to_string(int message_type){ switch (message_type) diff --git a/exaudfclient/base/exaudflib/impl/msg_conversion.h b/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.h similarity index 100% rename from exaudfclient/base/exaudflib/impl/msg_conversion.h rename to exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.h diff --git a/exaudfclient/base/exaudflib/impl/socket_high_level.cc b/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc similarity index 98% rename from exaudfclient/base/exaudflib/impl/socket_high_level.cc rename to exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc index 4f50ecbe8..a8612c915 100644 --- a/exaudfclient/base/exaudflib/impl/socket_high_level.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc @@ -1,13 +1,13 @@ -#include "exaudflib/impl/socket_high_level.h" +#include "exaudf/exaudflib/impl/socket_high_level.h" -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/zmqcontainer.pb.h" -#include "exaudflib/impl/msg_conversion.h" -#include "exaudflib/impl/global.h" -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/zmqcontainer.pb.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/impl/global.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/vm/swig_vm.h" #include -#include "debug_message.h" +#include "exaudf/debug_message.h" namespace exaudflib { namespace socket_high_level { diff --git a/exaudfclient/base/exaudflib/impl/socket_high_level.h b/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.h similarity index 100% rename from exaudfclient/base/exaudflib/impl/socket_high_level.h rename to exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.h diff --git a/exaudfclient/base/exaudflib/impl/socket_info.cc b/exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc similarity index 92% rename from exaudfclient/base/exaudflib/impl/socket_info.cc rename to exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc index 9df03c255..c515c1435 100644 --- a/exaudfclient/base/exaudflib/impl/socket_info.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc @@ -1,4 +1,4 @@ -#include "exaudflib/impl/socket_info.h" +#include "exaudf/exaudflib/impl/socket_info.h" namespace exaudflib { diff --git a/exaudfclient/base/exaudflib/impl/socket_info.h b/exaudfclient/base/exaudf/exaudflib/impl/socket_info.h similarity index 100% rename from exaudfclient/base/exaudflib/impl/socket_info.h rename to exaudfclient/base/exaudf/exaudflib/impl/socket_info.h diff --git a/exaudfclient/base/exaudflib/impl/socket_low_level.cc b/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc similarity index 96% rename from exaudfclient/base/exaudflib/impl/socket_low_level.cc rename to exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc index 26aca38ab..02b860f6c 100644 --- a/exaudfclient/base/exaudflib/impl/socket_low_level.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc @@ -1,6 +1,6 @@ -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/impl/check.h" -#include "debug_message.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/impl/check.h" +#include "exaudf/debug_message.h" #include #include #include diff --git a/exaudfclient/base/exaudflib/impl/socket_low_level.h b/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.h similarity index 100% rename from exaudfclient/base/exaudflib/impl/socket_low_level.h rename to exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.h diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_factory.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc similarity index 73% rename from exaudfclient/base/exaudflib/impl/swig/swig_factory.cc rename to exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc index 88af711db..e01302854 100644 --- a/exaudfclient/base/exaudflib/impl/swig/swig_factory.cc +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc @@ -1,6 +1,6 @@ -#include "exaudflib/impl/swig/swig_meta_data.h" -#include "exaudflib/impl/swig/swig_table_iterator.h" -#include "exaudflib/impl/swig/swig_result_handler.h" +#include "exaudf/exaudflib/impl/swig/swig_meta_data.h" +#include "exaudf/exaudflib/impl/swig/swig_table_iterator.h" +#include "exaudf/exaudflib/impl/swig/swig_result_handler.h" extern "C" { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc new file mode 100644 index 000000000..029484671 --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc @@ -0,0 +1,3 @@ +//Check that swig_generial_iterator.h is self-contained +#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" + diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h similarity index 88% rename from exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h rename to exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h index 781274c6f..bc80cc898 100644 --- a/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h @@ -1,8 +1,8 @@ #ifndef EXAUDFCLIENT_SWIGGENERALITERATOR_H #define EXAUDFCLIENT_SWIGGENERALITERATOR_H -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/impl/global.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/impl/global.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc new file mode 100644 index 000000000..72d758b66 --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc @@ -0,0 +1,3 @@ +//Check that swig_meta_data.h is self-contained +#include "exaudf/exaudflib/impl/swig/swig_meta_data.h" + diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h similarity index 97% rename from exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h rename to exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h index 23e9f7cd8..50c468995 100644 --- a/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h @@ -1,12 +1,12 @@ #ifndef EXAUDFCLIENT_SWIGMETADATA_H #define EXAUDFCLIENT_SWIGMETADATA_H -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/swig/swig_meta_data.h" -#include "exaudflib/zmqcontainer.pb.h" -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/impl/msg_conversion.h" -#include "exaudflib/impl/global.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/swig_meta_data.h" +#include "exaudf/exaudflib/zmqcontainer.pb.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/impl/global.h" #include #include #include diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc new file mode 100644 index 000000000..bed0a108a --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc @@ -0,0 +1,3 @@ +//Check that swig_result_handler.h is self-contained +#include "exaudf/exaudflib/impl/swig/swig_result_handler.h" + diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h similarity index 97% rename from exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h rename to exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h index cb143db9f..48e1dde02 100644 --- a/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h @@ -1,13 +1,13 @@ #ifndef EXAUDFCLIENT_SWIGRESULTHANDLER_H #define EXAUDFCLIENT_SWIGRESULTHANDLER_H -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/swig/swig_result_handler.h" -#include "exaudflib/impl/swig/swig_general_iterator.h" -#include "exaudflib/impl/global.h" -#include "exaudflib/impl/msg_conversion.h" -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/zmqcontainer.pb.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/swig_result_handler.h" +#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" +#include "exaudf/exaudflib/impl/global.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/zmqcontainer.pb.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc new file mode 100644 index 000000000..bd46ebd72 --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc @@ -0,0 +1,3 @@ +//Check that swig_table_iterator.h is self-contained +#include "exaudf/exaudflib/impl/swig/swig_table_iterator.h" + diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h similarity index 98% rename from exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h rename to exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h index bf5f014ba..fb9a49f29 100644 --- a/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h +++ b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h @@ -1,12 +1,12 @@ #ifndef EXAUDFCLIENT_SWIGTABLEITERATOR_H #define EXAUDFCLIENT_SWIGTABLEITERATOR_H -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/swig/swig_table_iterator.h" -#include "exaudflib/impl/swig/swig_general_iterator.h" -#include "exaudflib/impl/global.h" -#include "exaudflib/impl/socket_low_level.h" -#include "exaudflib/impl/msg_conversion.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/swig_table_iterator.h" +#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" +#include "exaudf/exaudflib/impl/global.h" +#include "exaudf/exaudflib/impl/socket_low_level.h" +#include "exaudf/exaudflib/impl/msg_conversion.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/load_dynamic.h b/exaudfclient/base/exaudf/exaudflib/load_dynamic.h similarity index 100% rename from exaudfclient/base/exaudflib/load_dynamic.h rename to exaudfclient/base/exaudf/exaudflib/load_dynamic.h diff --git a/exaudfclient/base/exaudflib/swig/script_data_transfer_objects.cc b/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.cc similarity index 100% rename from exaudfclient/base/exaudflib/swig/script_data_transfer_objects.cc rename to exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.cc diff --git a/exaudfclient/base/exaudflib/swig/script_data_transfer_objects.h b/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.h similarity index 100% rename from exaudfclient/base/exaudflib/swig/script_data_transfer_objects.h rename to exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.h diff --git a/exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.cc b/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.cc similarity index 100% rename from exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.cc rename to exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.cc diff --git a/exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.h b/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h similarity index 100% rename from exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.h rename to exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc new file mode 100644 index 000000000..93e998742 --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc @@ -0,0 +1,2 @@ +//Check that swig_common.h is self-contained +#include "exaudf/exaudflib/swig/swig_common.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_common.h b/exaudfclient/base/exaudf/exaudflib/swig/swig_common.h similarity index 100% rename from exaudfclient/base/exaudflib/swig/swig_common.h rename to exaudfclient/base/exaudf/exaudflib/swig/swig_common.h diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc new file mode 100644 index 000000000..f0abce90e --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc @@ -0,0 +1,2 @@ +//Check that swig_meta_data.h is self-contained +#include "exaudf/exaudflib/swig/swig_meta_data.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_meta_data.h b/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h similarity index 96% rename from exaudfclient/base/exaudflib/swig/swig_meta_data.h rename to exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h index 9f23f06f4..00b639207 100644 --- a/exaudfclient/base/exaudflib/swig/swig_meta_data.h +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h @@ -1,9 +1,9 @@ #ifndef SWIG_META_DATA_H #define SWIG_META_DATA_H -#include "exaudflib/load_dynamic.h" -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "exaudf/exaudflib/load_dynamic.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc new file mode 100644 index 000000000..d51824faf --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc @@ -0,0 +1,2 @@ +//Check that swig_result_handler.h is self-contained +#include "exaudf/exaudflib/swig/swig_result_handler.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_result_handler.h b/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h similarity index 96% rename from exaudfclient/base/exaudflib/swig/swig_result_handler.h rename to exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h index 546bfb25f..943068ea4 100644 --- a/exaudfclient/base/exaudflib/swig/swig_result_handler.h +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h @@ -4,8 +4,8 @@ #include #include #include -#include "exaudflib/load_dynamic.h" -#include "exaudflib/swig/swig_table_iterator.h" +#include "exaudf/exaudflib/load_dynamic.h" +#include "exaudf/exaudflib/swig/swig_table_iterator.h" #define SWIG_MAX_VAR_DATASIZE 4000000 diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc new file mode 100644 index 000000000..f4307d637 --- /dev/null +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc @@ -0,0 +1,2 @@ +//Check that swig_table_iterator.h is self-contained +#include "exaudf/exaudflib/swig/swig_table_iterator.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_table_iterator.h b/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h similarity index 98% rename from exaudfclient/base/exaudflib/swig/swig_table_iterator.h rename to exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h index 89f854296..70557d296 100644 --- a/exaudfclient/base/exaudflib/swig/swig_table_iterator.h +++ b/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h @@ -4,7 +4,7 @@ #include #include #include -#include "exaudflib/load_dynamic.h" +#include "exaudf/exaudflib/load_dynamic.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/test/BUILD b/exaudfclient/base/exaudf/exaudflib/test/BUILD similarity index 62% rename from exaudfclient/base/exaudflib/test/BUILD rename to exaudfclient/base/exaudf/exaudflib/test/BUILD index f6c58a753..cc0a46125 100644 --- a/exaudfclient/base/exaudflib/test/BUILD +++ b/exaudfclient/base/exaudf/exaudflib/test/BUILD @@ -2,8 +2,8 @@ cc_test( name = "exaudflib-test", srcs = ["script_data_transfer_objects_test.cpp", "script_option_lines_test.cpp"], deps = [ - "//exaudflib:script_data_transfer_objects", - "//exaudflib:scriptoptionlines", + "//exaudf/exaudflib:script_data_transfer_objects", + "//exaudf/exaudflib:scriptoptionlines", "@googletest//:gtest_main", ], ) \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp b/exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp similarity index 99% rename from exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp rename to exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp index 6e146c3eb..9866df4f1 100644 --- a/exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp +++ b/exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp @@ -1,4 +1,4 @@ -#include "exaudflib/swig/script_data_transfer_objects.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" #include using namespace ExecutionGraph; diff --git a/exaudfclient/base/exaudflib/test/script_option_lines_test.cpp b/exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp similarity index 99% rename from exaudfclient/base/exaudflib/test/script_option_lines_test.cpp rename to exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp index a83deb18a..9b617d00b 100644 --- a/exaudfclient/base/exaudflib/test/script_option_lines_test.cpp +++ b/exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp @@ -1,4 +1,4 @@ -#include "exaudflib/vm/scriptoptionlines.h" +#include "exaudf/exaudflib/vm/scriptoptionlines.h" #include #include #include diff --git a/exaudfclient/base/exaudflib/udf_plugin_interface.h b/exaudfclient/base/exaudf/exaudflib/udf_plugin_interface.h similarity index 100% rename from exaudfclient/base/exaudflib/udf_plugin_interface.h rename to exaudfclient/base/exaudf/exaudflib/udf_plugin_interface.h diff --git a/exaudfclient/base/exaudflib/vm/scriptoptionlines.cc b/exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.cc similarity index 100% rename from exaudfclient/base/exaudflib/vm/scriptoptionlines.cc rename to exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.cc diff --git a/exaudfclient/base/exaudflib/vm/scriptoptionlines.h b/exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.h similarity index 100% rename from exaudfclient/base/exaudflib/vm/scriptoptionlines.h rename to exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.h diff --git a/exaudfclient/base/exaudflib/vm/swig_vm.cc b/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc similarity index 50% rename from exaudfclient/base/exaudflib/vm/swig_vm.cc rename to exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc index 3e2d98f5a..cd1a8a5e4 100644 --- a/exaudfclient/base/exaudflib/vm/swig_vm.cc +++ b/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc @@ -1,2 +1,2 @@ //Check that swig_vm.h is self-contained -#include "exaudflib/vm/swig_vm.h" \ No newline at end of file +#include "exaudf/exaudflib/vm/swig_vm.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/vm/swig_vm.h b/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h similarity index 92% rename from exaudfclient/base/exaudflib/vm/swig_vm.h rename to exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h index 3f88c7a77..d048ac594 100644 --- a/exaudfclient/base/exaudflib/vm/swig_vm.h +++ b/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h @@ -5,8 +5,8 @@ #include #include #include -#include "exaudflib/swig/swig_common.h" -#include "exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/zmqcontainer.proto b/exaudfclient/base/exaudf/exaudflib/zmqcontainer.proto similarity index 100% rename from exaudfclient/base/exaudflib/zmqcontainer.proto rename to exaudfclient/base/exaudf/exaudflib/zmqcontainer.proto diff --git a/exaudfclient/base/filter_swig_code.py b/exaudfclient/base/exaudf/filter_swig_code.py similarity index 100% rename from exaudfclient/base/filter_swig_code.py rename to exaudfclient/base/exaudf/filter_swig_code.py diff --git a/exaudfclient/base/java_repository.bzl b/exaudfclient/base/exaudf/java_repository.bzl similarity index 100% rename from exaudfclient/base/java_repository.bzl rename to exaudfclient/base/exaudf/java_repository.bzl diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/exaudf/javacontainer/BUILD similarity index 90% rename from exaudfclient/base/javacontainer/BUILD rename to exaudfclient/base/exaudf/javacontainer/BUILD index 9641b529c..403c06c6e 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/exaudf/javacontainer/BUILD @@ -5,7 +5,7 @@ genrule( cmd = """ mkdir -p java_src/com/exasol/swig mkdir -p build_exascript_java_tmp_cc/exaudflib - cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_java_tmp_cc/exaudflib + cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_java_tmp_cc/exaudflib cd build_exascript_java_tmp_cc swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../java_src/com/exasol/swig" -o "../exascript_java_tmp.cc" exaudflib/exascript.i cd .. @@ -37,29 +37,29 @@ genrule( "orig/com/exasol/swig/TableIterator.java", "exascript_java_tmp.cc" ], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h"] + srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h"] ) genrule( name = "exascript_java_tmp_h", cmd = """ mkdir build_exascript_java_tmp_h - cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_java_tmp_h + cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_java_tmp_h cp -r "$(location exascript_java_tmp.cc)" build_exascript_java_tmp_h cd build_exascript_java_tmp_h swig -v -DEXTERNAL_PROCESS -c++ -java -external-runtime "../$(location exascript_java_tmp.h)" """, outs = ["exascript_java_tmp.h"], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc"] + srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc"] ) genrule( name = "filter_swig_code_exascript_java_h", - cmd = 'python3 $(location //:filter_swig_code.py) "$@" "$<"', + cmd = 'python3 $(location //exaudf:filter_swig_code.py) "$@" "$<"', outs = ["exascript_java.h"], srcs = [":exascript_java_tmp_h"], - tools = ["//:filter_swig_code.py"] + tools = ["//exaudf:filter_swig_code.py"] ) genrule( @@ -71,7 +71,7 @@ genrule( cp $(location :orig/com/exasol/swig/ResultHandler.java) "$$TMPDIR"/java_src/com/exasol/swig/ cp $(location :orig/com/exasol/swig/exascript_javaJNI.java) "$$TMPDIR"/java_src/com/exasol/swig/ find "$$TMPDIR"/java_src/com/exasol/swig/ -name *.java -type f -exec chmod 644 {} \\; - cp -r -L $(location //:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" + cp -r -L $(location //exaudf:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" (cd "$$TMPDIR" python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") cp "$$TMPDIR"/exascript_java.cc $(location :exascript_java.cc) @@ -88,7 +88,7 @@ genrule( ], srcs = [":exascript_java_tmp.cc", ":orig/com/exasol/swig/TableIterator.java", ":orig/com/exasol/swig/ResultHandler.java", ":orig/com/exasol/swig/exascript_javaJNI.java"], - tools = ["//:filter_swig_code.py"] + tools = ["//exaudf:filter_swig_code.py"] ) @@ -141,7 +141,7 @@ genrule( cc_library( name = "exascript_java", srcs = [":exascript_java.cc",], - deps = ["@java//:java","//exaudflib:exaudflib-deps","//exaudflib:header"], + deps = ["@java//:java","//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"], copts= ["-O0","-fno-lto"], # We limit this target to -O0 (no optimization) and -fno-lto. because otherwise we get compiler warnings of the sort # note: "code may be misoptimized unless -fno-strict-aliasing is used." @@ -155,7 +155,7 @@ cc_library( name = "javacontainer", srcs = [":javacontainer.cc", ":javacontainer.h", ":javacontainer_impl.cc", ":javacontainer_impl.h", ":dummy"], hdrs = [":filter_swig_code_exascript_java_h", "exascript_java_jni_decl.h"], - deps = ["@ssl//:ssl","@java//:java", ":exascript_java", "//exaudflib:header", "//:debug_message_h","//exaudflib:scriptoptionlines"], + deps = ["@ssl//:ssl","@java//:java", ":exascript_java", "//exaudf/exaudflib:header", "//exaudf:debug_message_h","//exaudf/exaudflib:scriptoptionlines"], # copts= ["-O0","-fno-lto"], alwayslink=True, ) diff --git a/exaudfclient/base/javacontainer/ExaCompiler.java b/exaudfclient/base/exaudf/javacontainer/ExaCompiler.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaCompiler.java rename to exaudfclient/base/exaudf/javacontainer/ExaCompiler.java diff --git a/exaudfclient/base/javacontainer/ExaConnectionInformationImpl.java b/exaudfclient/base/exaudf/javacontainer/ExaConnectionInformationImpl.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaConnectionInformationImpl.java rename to exaudfclient/base/exaudf/javacontainer/ExaConnectionInformationImpl.java diff --git a/exaudfclient/base/javacontainer/ExaExportSpecificationImpl.java b/exaudfclient/base/exaudf/javacontainer/ExaExportSpecificationImpl.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaExportSpecificationImpl.java rename to exaudfclient/base/exaudf/javacontainer/ExaExportSpecificationImpl.java diff --git a/exaudfclient/base/javacontainer/ExaImportSpecificationImpl.java b/exaudfclient/base/exaudf/javacontainer/ExaImportSpecificationImpl.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaImportSpecificationImpl.java rename to exaudfclient/base/exaudf/javacontainer/ExaImportSpecificationImpl.java diff --git a/exaudfclient/base/javacontainer/ExaIteratorImpl.java b/exaudfclient/base/exaudf/javacontainer/ExaIteratorImpl.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaIteratorImpl.java rename to exaudfclient/base/exaudf/javacontainer/ExaIteratorImpl.java diff --git a/exaudfclient/base/javacontainer/ExaMetadataImpl.java b/exaudfclient/base/exaudf/javacontainer/ExaMetadataImpl.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaMetadataImpl.java rename to exaudfclient/base/exaudf/javacontainer/ExaMetadataImpl.java diff --git a/exaudfclient/base/javacontainer/ExaStackTraceCleaner.java b/exaudfclient/base/exaudf/javacontainer/ExaStackTraceCleaner.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaStackTraceCleaner.java rename to exaudfclient/base/exaudf/javacontainer/ExaStackTraceCleaner.java diff --git a/exaudfclient/base/javacontainer/ExaUndefinedSingleCallException.java b/exaudfclient/base/exaudf/javacontainer/ExaUndefinedSingleCallException.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaUndefinedSingleCallException.java rename to exaudfclient/base/exaudf/javacontainer/ExaUndefinedSingleCallException.java diff --git a/exaudfclient/base/javacontainer/ExaWrapper.java b/exaudfclient/base/exaudf/javacontainer/ExaWrapper.java similarity index 100% rename from exaudfclient/base/javacontainer/ExaWrapper.java rename to exaudfclient/base/exaudf/javacontainer/ExaWrapper.java diff --git a/exaudfclient/base/javacontainer/exascript_java_jni_decl.h b/exaudfclient/base/exaudf/javacontainer/exascript_java_jni_decl.h similarity index 100% rename from exaudfclient/base/javacontainer/exascript_java_jni_decl.h rename to exaudfclient/base/exaudf/javacontainer/exascript_java_jni_decl.h diff --git a/exaudfclient/base/javacontainer/javacontainer.cc b/exaudfclient/base/exaudf/javacontainer/javacontainer.cc similarity index 100% rename from exaudfclient/base/javacontainer/javacontainer.cc rename to exaudfclient/base/exaudf/javacontainer/javacontainer.cc diff --git a/exaudfclient/base/javacontainer/javacontainer.h b/exaudfclient/base/exaudf/javacontainer/javacontainer.h similarity index 93% rename from exaudfclient/base/javacontainer/javacontainer.h rename to exaudfclient/base/exaudf/javacontainer/javacontainer.h index 38038e1df..b07cd34f8 100644 --- a/exaudfclient/base/javacontainer/javacontainer.h +++ b/exaudfclient/base/exaudf/javacontainer/javacontainer.h @@ -2,7 +2,7 @@ #define JAVACONTAINER_H -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/vm/swig_vm.h" #include #ifdef ENABLE_JAVA_VM diff --git a/exaudfclient/base/javacontainer/javacontainer_impl.cc b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc similarity index 99% rename from exaudfclient/base/javacontainer/javacontainer_impl.cc rename to exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc index 27a4e40c9..f37017124 100644 --- a/exaudfclient/base/javacontainer/javacontainer_impl.cc +++ b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc @@ -7,13 +7,13 @@ #include #include -#include "exaudflib/swig/swig_meta_data.h" +#include "exaudf/exaudflib/swig/swig_meta_data.h" #include "exascript_java_jni_decl.h" -#include "debug_message.h" +#include "exaudf/debug_message.h" #include "javacontainer/javacontainer.h" #include "javacontainer/javacontainer_impl.h" -#include "exaudflib/vm/scriptoptionlines.h" +#include "exaudf/exaudflib/vm/scriptoptionlines.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/javacontainer/javacontainer_impl.h b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h similarity index 98% rename from exaudfclient/base/javacontainer/javacontainer_impl.h rename to exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h index af7828336..79d579b1d 100644 --- a/exaudfclient/base/javacontainer/javacontainer_impl.h +++ b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h @@ -5,7 +5,7 @@ #include #include -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/vm/swig_vm.h" #include #ifdef ENABLE_JAVA_VM diff --git a/exaudfclient/base/javacontainer/test/BUILD b/exaudfclient/base/exaudf/javacontainer/test/BUILD similarity index 100% rename from exaudfclient/base/javacontainer/test/BUILD rename to exaudfclient/base/exaudf/javacontainer/test/BUILD diff --git a/exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc b/exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc similarity index 87% rename from exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc rename to exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc index 274c19b7b..6b223afcb 100644 --- a/exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc +++ b/exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc @@ -1,4 +1,4 @@ -#include "exaudflib/swig/swig_common.h" +#include "exaudf/exaudflib/swig/swig_common.h" //Dummy implementation to calm down the linker void* load_dynamic(const char* name) { diff --git a/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc b/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc similarity index 100% rename from exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc rename to exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc diff --git a/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc b/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc similarity index 100% rename from exaudfclient/base/javacontainer/test/cpp/javavm_test.cc rename to exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc diff --git a/exaudfclient/base/javacontainer/test/cpp/javavm_test.h b/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.h similarity index 100% rename from exaudfclient/base/javacontainer/test/cpp/javavm_test.h rename to exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.h diff --git a/exaudfclient/base/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java b/exaudfclient/base/exaudf/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java similarity index 100% rename from exaudfclient/base/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java rename to exaudfclient/base/exaudf/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java diff --git a/exaudfclient/base/javacontainer/test/test.jar b/exaudfclient/base/exaudf/javacontainer/test/test.jar similarity index 100% rename from exaudfclient/base/javacontainer/test/test.jar rename to exaudfclient/base/exaudf/javacontainer/test/test.jar diff --git a/exaudfclient/base/load_dynamic.cc b/exaudfclient/base/exaudf/load_dynamic.cc similarity index 93% rename from exaudfclient/base/load_dynamic.cc rename to exaudfclient/base/exaudf/load_dynamic.cc index 38a742717..d3e5d1442 100644 --- a/exaudfclient/base/load_dynamic.cc +++ b/exaudfclient/base/exaudf/load_dynamic.cc @@ -3,7 +3,7 @@ #endif #include -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/vm/swig_vm.h" void* handle; diff --git a/exaudfclient/base/protobuf_repository.bzl b/exaudfclient/base/exaudf/protobuf_repository.bzl similarity index 100% rename from exaudfclient/base/protobuf_repository.bzl rename to exaudfclient/base/exaudf/protobuf_repository.bzl diff --git a/exaudfclient/base/python/BUILD b/exaudfclient/base/exaudf/python/BUILD similarity index 100% rename from exaudfclient/base/python/BUILD rename to exaudfclient/base/exaudf/python/BUILD diff --git a/exaudfclient/base/python/exascript_python_preset_core.py b/exaudfclient/base/exaudf/python/exascript_python_preset_core.py similarity index 100% rename from exaudfclient/base/python/exascript_python_preset_core.py rename to exaudfclient/base/exaudf/python/exascript_python_preset_core.py diff --git a/exaudfclient/base/python/exascript_python_wrap.py b/exaudfclient/base/exaudf/python/exascript_python_wrap.py similarity index 100% rename from exaudfclient/base/python/exascript_python_wrap.py rename to exaudfclient/base/exaudf/python/exascript_python_wrap.py diff --git a/exaudfclient/base/python/extend_exascript_python_preset_py.sh b/exaudfclient/base/exaudf/python/extend_exascript_python_preset_py.sh similarity index 100% rename from exaudfclient/base/python/extend_exascript_python_preset_py.sh rename to exaudfclient/base/exaudf/python/extend_exascript_python_preset_py.sh diff --git a/exaudfclient/base/python/python3/BUILD b/exaudfclient/base/exaudf/python/python3/BUILD similarity index 59% rename from exaudfclient/base/python/python3/BUILD rename to exaudfclient/base/exaudf/python/python3/BUILD index 29c0defbd..93ece8f5a 100644 --- a/exaudfclient/base/python/python3/BUILD +++ b/exaudfclient/base/exaudf/python/python3/BUILD @@ -5,12 +5,12 @@ genrule( cmd = """ INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes` mkdir -p build_exascript_python_tmp_cc/exaudflib - cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_python_tmp_cc/exaudflib + cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_python_tmp_cc/exaudflib cd build_exascript_python_tmp_cc swig -v $$INCLUDES -O -DEXTERNAL_PROCESS -Wall -c++ -python -py3 -addextern -module exascript_python -o "../$(location exascript_python_tmp.cc)" exaudflib/exascript.i """, outs = ["exascript_python_tmp.cc", "exascript_python.py"], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h"] + srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h"] ) genrule( @@ -18,32 +18,32 @@ genrule( cmd = """ INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes` mkdir build_exascript_python_tmp_h - cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_python_tmp_h + cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_python_tmp_h cp "$(location exascript_python_tmp.cc)" "$(location exascript_python.py)" build_exascript_python_tmp_h cd build_exascript_python_tmp_h swig -v $$INCLUDES -DEXTERNAL_PROCESS -c++ -python -py3 -external-runtime "../$(location exascript_python_tmp.h)" """, outs = ["exascript_python_tmp.h"], - srcs = ["//exaudflib:exascript.i","//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_python_tmp.cc", "exascript_python.py"] + srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_python_tmp.cc", "exascript_python.py"] ) genrule( name = "extend_exascript_python_preset_py", - cmd = 'bash $(location //python:extend_exascript_python_preset_py.sh) "$(location //python:exascript_python_preset_core.py)" "$(location exascript_python_preset.py)" "$$PYTHON3_PREFIX" "$$PYTHON3_VERSION" ""', + cmd = 'bash $(location //exaudf/python:extend_exascript_python_preset_py.sh) "$(location //exaudf/python:exascript_python_preset_core.py)" "$(location exascript_python_preset.py)" "$$PYTHON3_PREFIX" "$$PYTHON3_VERSION" ""', outs = ["exascript_python_preset.py"], - srcs = ["//python:exascript_python_preset_core.py"], - tools = ["//python:extend_exascript_python_preset_py.sh"] + srcs = ["//exaudf/python:exascript_python_preset_core.py"], + tools = ["//exaudf/python:extend_exascript_python_preset_py.sh"] ) genrule( name = "exascript_python_int", cmd = """ cp $(SRCS) . - python3 $(location //:build_integrated.py) "$(location exascript_python_int.h)" "exascript_python.py" "exascript_python_wrap.py" "exascript_python_preset.py" + python3 $(location //exaudf:build_integrated.py) "$(location exascript_python_int.h)" "exascript_python.py" "exascript_python_wrap.py" "exascript_python_preset.py" """, outs = ["exascript_python_int.h"], - srcs = [":exascript_python_tmp_cc", "//python:exascript_python_wrap.py", ":extend_exascript_python_preset_py"], - tools = ["//:build_integrated.py"] + srcs = [":exascript_python_tmp_cc", "//exaudf/python:exascript_python_wrap.py", ":extend_exascript_python_preset_py"], + tools = ["//exaudf:build_integrated.py"] ) genrule( @@ -51,14 +51,14 @@ genrule( cmd = """ ACTUAL_PYTHON_VERSION=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'` if [[ $$ACTUAL_PYTHON_VERSION == 2* ]] ; then - python3 $(location //:filter_swig_code.py) "$@" "$<" + python3 $(location //exaudf:filter_swig_code.py) "$@" "$<" else cp "$<" "$@" fi """, outs = ["exascript_python.h"], srcs = [":exascript_python_tmp_h"], - tools = ["//:filter_swig_code.py"] + tools = ["//exaudf:filter_swig_code.py"] ) genrule( @@ -67,32 +67,32 @@ genrule( ACTUAL_PYTHON_VERSION=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'` cp $(locations exascript_python_tmp_cc) . if [[ $$ACTUAL_PYTHON_VERSION == 2* ]] ; then - python $(location //:filter_swig_code.py) "$@" exascript_python_tmp.cc + python $(location //exaudf:filter_swig_code.py) "$@" exascript_python_tmp.cc else cp exascript_python_tmp.cc "$@" fi """, outs = ["exascript_python.cc"], srcs = [":exascript_python_tmp_cc"], - tools = ["//:filter_swig_code.py"] + tools = ["//exaudf:filter_swig_code.py"] ) cc_library( name = "exascript_python", srcs = [":filter_swig_code_exascript_python_cc",":filter_swig_code_exascript_python_h"], hdrs = [":filter_swig_code_exascript_python_h"], - deps = ["@python3//:python3","//exaudflib:exaudflib-deps","//exaudflib:header"], + deps = ["@python3//:python3","//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"], alwayslink=True, ) cc_library( name = "pythoncontainer", - srcs = ["//python:pythoncontainer.cc", ":dummy.h"], + srcs = ["//exaudf/python:pythoncontainer.cc", ":dummy.h"], data = [":extend_exascript_python_preset_py"], hdrs = [":exascript_python_int", ":filter_swig_code_exascript_python_h"], include_prefix = ".", - deps = ["@python3//:python3",":exascript_python","//exaudflib:header", - "//:debug_message_h","//exaudflib:scriptoptionlines", "//python:pythoncontainer_header"], + deps = ["@python3//:python3",":exascript_python","//exaudf/exaudflib:header", + "//exaudf:debug_message_h","//exaudf/exaudflib:scriptoptionlines", "//exaudf/python:pythoncontainer_header"], alwayslink=True, ) @@ -109,5 +109,5 @@ cc_binary( linkshared = 1, srcs = [":python_ext_dataframe.cc"], deps = ["@python3//:python3","@numpy//:numpy", - "//exaudflib:header", "//:debug_message_h"], + "//exaudf/exaudflib:header", "//exaudf:debug_message_h"], ) diff --git a/exaudfclient/base/python/python3/python_ext_dataframe.cc b/exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc similarity index 99% rename from exaudfclient/base/python/python3/python_ext_dataframe.cc rename to exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc index 972560c66..bdc8b3232 100644 --- a/exaudfclient/base/python/python3/python_ext_dataframe.cc +++ b/exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc @@ -1,6 +1,6 @@ #include -#include "exaudflib/swig/swig_common.h" -#include "debug_message.h" +#include "exaudf/exaudflib/swig/swig_common.h" +#include "exaudf/debug_message.h" #include diff --git a/exaudfclient/base/python/pythoncontainer.cc b/exaudfclient/base/exaudf/python/pythoncontainer.cc similarity index 99% rename from exaudfclient/base/python/pythoncontainer.cc rename to exaudfclient/base/exaudf/python/pythoncontainer.cc index 43c6265a6..45a53e1dd 100644 --- a/exaudfclient/base/python/pythoncontainer.cc +++ b/exaudfclient/base/exaudf/python/pythoncontainer.cc @@ -1,5 +1,5 @@ #include "pythoncontainer.h" -#include "exaudflib/swig/swig_meta_data.h" +#include "exaudf/exaudflib/swig/swig_meta_data.h" #include #ifdef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE @@ -10,10 +10,10 @@ #include #include "exascript_python_int.h" #include "exascript_python.h" -#include "debug_message.h" -#include "exaudflib/vm/scriptoptionlines.h" +#include "exaudf/debug_message.h" +#include "exaudf/exaudflib/vm/scriptoptionlines.h" -#include "exaudflib/swig/script_data_transfer_objects.h" +#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" #include #include diff --git a/exaudfclient/base/python/pythoncontainer.h b/exaudfclient/base/exaudf/python/pythoncontainer.h similarity index 92% rename from exaudfclient/base/python/pythoncontainer.h rename to exaudfclient/base/exaudf/python/pythoncontainer.h index 27092a91f..0fa212cf6 100644 --- a/exaudfclient/base/python/pythoncontainer.h +++ b/exaudfclient/base/exaudf/python/pythoncontainer.h @@ -1,7 +1,7 @@ #ifndef PYTHONVM_H #define PYTHONVM_H -#include "exaudflib/vm/swig_vm.h" +#include "exaudf/exaudflib/vm/swig_vm.h" #ifdef ENABLE_PYTHON_VM diff --git a/exaudfclient/base/python_repository.bzl b/exaudfclient/base/exaudf/python_repository.bzl similarity index 100% rename from exaudfclient/base/python_repository.bzl rename to exaudfclient/base/exaudf/python_repository.bzl diff --git a/exaudfclient/base/streaming_container/BUILD b/exaudfclient/base/exaudf/streaming_container/BUILD similarity index 72% rename from exaudfclient/base/streaming_container/BUILD rename to exaudfclient/base/exaudf/streaming_container/BUILD index b57363916..a23f09b05 100644 --- a/exaudfclient/base/streaming_container/BUILD +++ b/exaudfclient/base/exaudf/streaming_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "streamingcontainer", srcs = ["streamingcontainer.cc","streamingcontainer.h"], hdrs = ["streamingcontainer.h"], - deps = ["//exaudflib:exaudflib-deps","//exaudflib:header"] + deps = ["//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"] ) \ No newline at end of file diff --git a/exaudfclient/base/streaming_container/streamingcontainer.cc b/exaudfclient/base/exaudf/streaming_container/streamingcontainer.cc similarity index 100% rename from exaudfclient/base/streaming_container/streamingcontainer.cc rename to exaudfclient/base/exaudf/streaming_container/streamingcontainer.cc diff --git a/exaudfclient/base/streaming_container/streamingcontainer.h b/exaudfclient/base/exaudf/streaming_container/streamingcontainer.h similarity index 100% rename from exaudfclient/base/streaming_container/streamingcontainer.h rename to exaudfclient/base/exaudf/streaming_container/streamingcontainer.h diff --git a/exaudfclient/base/variables.bzl b/exaudfclient/base/exaudf/variables.bzl similarity index 68% rename from exaudfclient/base/variables.bzl rename to exaudfclient/base/exaudf/variables.bzl index 9a12f3744..b1c1504c9 100644 --- a/exaudfclient/base/variables.bzl +++ b/exaudfclient/base/exaudf/variables.bzl @@ -1,17 +1,17 @@ BENCHMARK_VM_ENABLED_DEFINE=select({ - "//:benchmark": ["ENABLE_BENCHMARK_VM"], + "//exaudf:benchmark": ["ENABLE_BENCHMARK_VM"], "//conditions:default": [] }) STREAMING_VM_ENABLED_DEFINE=select({ - "//:bash": ["ENABLE_STREAMING_VM"], + "//exaudf:bash": ["ENABLE_STREAMING_VM"], "//conditions:default": [] }) PYTHON_VM_ENABLED_DEFINE=select({ - "//:python": ["ENABLE_PYTHON_VM"], + "//exaudf:python": ["ENABLE_PYTHON_VM"], "//conditions:default": [] }) JAVA_VM_ENABLED_DEFINE=select({ - "//:java": ["ENABLE_JAVA_VM"], + "//exaudf:java": ["ENABLE_JAVA_VM"], "//conditions:default": [] }) diff --git a/exaudfclient/base/zmq_repository.bzl b/exaudfclient/base/exaudf/zmq_repository.bzl similarity index 100% rename from exaudfclient/base/zmq_repository.bzl rename to exaudfclient/base/exaudf/zmq_repository.bzl diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc b/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc deleted file mode 100644 index ec1ffcf3b..000000000 --- a/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_generial_iterator.h is self-contained -#include "exaudflib/impl/swig/swig_general_iterator.h" - diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc b/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc deleted file mode 100644 index 0a100b72d..000000000 --- a/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_meta_data.h is self-contained -#include "exaudflib/impl/swig/swig_meta_data.h" - diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc b/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc deleted file mode 100644 index 987b5e3ec..000000000 --- a/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_result_handler.h is self-contained -#include "exaudflib/impl/swig/swig_result_handler.h" - diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc b/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc deleted file mode 100644 index 853e79e82..000000000 --- a/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_table_iterator.h is self-contained -#include "exaudflib/impl/swig/swig_table_iterator.h" - diff --git a/exaudfclient/base/exaudflib/swig/swig_common.cc b/exaudfclient/base/exaudflib/swig/swig_common.cc deleted file mode 100644 index ac2f69f2b..000000000 --- a/exaudfclient/base/exaudflib/swig/swig_common.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_common.h is self-contained -#include "exaudflib/swig/swig_common.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_meta_data.cc b/exaudfclient/base/exaudflib/swig/swig_meta_data.cc deleted file mode 100644 index 1b1c6c76f..000000000 --- a/exaudfclient/base/exaudflib/swig/swig_meta_data.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_meta_data.h is self-contained -#include "exaudflib/swig/swig_meta_data.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_result_handler.cc b/exaudfclient/base/exaudflib/swig/swig_result_handler.cc deleted file mode 100644 index 72365f498..000000000 --- a/exaudfclient/base/exaudflib/swig/swig_result_handler.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_result_handler.h is self-contained -#include "exaudflib/swig/swig_result_handler.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc b/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc deleted file mode 100644 index 2e30676c0..000000000 --- a/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_table_iterator.h is self-contained -#include "exaudflib/swig/swig_table_iterator.h" \ No newline at end of file diff --git a/exaudfclient/base/visualize_all.sh b/exaudfclient/base/visualize_all.sh index f72691bf6..c87277486 100644 --- a/exaudfclient/base/visualize_all.sh +++ b/exaudfclient/base/visualize_all.sh @@ -1,3 +1,3 @@ #!/bin/bash -bash visualize_deps.sh "//:exaudfclient //:exaudfclient_py3" "$@" \ No newline at end of file +bash visualize_deps.sh "//:exaudfclient //exaudf:exaudfclient_py3" "$@" \ No newline at end of file From d42cd2e9b45853c0182bfeb3fa2cf6a80f861e09 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 09:26:24 -0300 Subject: [PATCH 14/25] Separated BUILD and exaudf/BUILD --- exaudfclient/base/.bazelrc | 6 +- exaudfclient/base/BUILD | 156 ++++++++++++++++ exaudfclient/base/README.md | 4 +- exaudfclient/base/exaudf/BUILD | 172 ++---------------- exaudfclient/base/exaudf/exaudflib/BUILD | 6 +- .../exaudf/javacontainer/javacontainer.cc | 4 +- .../javacontainer/javacontainer_impl.cc | 4 +- .../test/cpp/javacontainer_test.cc | 2 +- .../javacontainer/test/cpp/javavm_test.cc | 4 +- .../base/{exaudf => }/exaudfclient.cc | 4 +- exaudfclient/base/{exaudf => }/variables.bzl | 8 +- exaudfclient/base/visualize_all.sh | 2 +- 12 files changed, 193 insertions(+), 179 deletions(-) rename exaudfclient/base/{exaudf => }/exaudfclient.cc (98%) rename exaudfclient/base/{exaudf => }/variables.bzl (68%) diff --git a/exaudfclient/base/.bazelrc b/exaudfclient/base/.bazelrc index 676ecf895..1607ca871 100644 --- a/exaudfclient/base/.bazelrc +++ b/exaudfclient/base/.bazelrc @@ -3,9 +3,9 @@ build --copt='-std=c++17' --force_pic --action_env=PROTOBUF_BIN --action_env=PRO build:benchmark --define benchmark=true build:java --define java=true --action_env=JAVA_PREFIX build:python --define python=true --action_env=PYTHON2_SYSPATH --action_env=PYTHON2_PREFIX --action_env=PYTHON2_VERSION --action_env=NUMPY_PREFIX --action_env=PYTHON3_SYSPATH --action_env=PYTHON3_PREFIX --action_env=PYTHON3_VERSION -build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //exaudf:exaudfclient_py3 -build:slow-wrapper-py3 --define binary_type=slow_wrapper //exaudf:exaudfclient_py3 -build:static-binary-py3 //exaudf:exaudfclient_py3_static +build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient_py3 +build:slow-wrapper-py3 --define binary_type=slow_wrapper //:exaudfclient_py3 +build:static-binary-py3 //:exaudfclient_py3_static build:test-binaries-py3 --config=static-binary-py3 --config=slow-wrapper-py3 build:verbose --copt='-v' --subcommands --verbose_failures --announce_rc #TODO test linkopts="-flto" diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index e69de29bb..bbeae5c97 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -0,0 +1,156 @@ + +load("//:variables.bzl", "VM_ENABLED_DEFINES") + +config_setting( + name = "benchmark", + define_values = {"benchmark": "true"}, +) + +config_setting( + name = "python", + define_values = {"python": "true"}, +) + +config_setting( + name = "java", + define_values = {"java": "true"}, +) + +config_setting( + name = "bash", + define_values = {"bash": "true"}, +) + +config_setting( + name = "fast_binary", + define_values = { + "binary_type": "fast_binary", + }, +) + +config_setting( + name = "slow_wrapper", + define_values = { + "binary_type": "slow_wrapper", + }, +) + +config_setting( + name = "valgrind_wrapper", + define_values = { + "wrapper_type": "valgrind_wrapper", + }, +) + +config_setting( + name = "valgrind_massif_wrapper", + define_values = { + "wrapper_type": "valgrind_massif_wrapper", + }, +) + +config_setting( + name = "stdout_to_bucketfs", + define_values = { + "wrapper_type": "stdout_to_bucketfs", + }, +) + + +VM_ENABLED_DEPS=select({ + "//:benchmark": ["//exaudf/benchmark_container:benchmark_container"], + "//conditions:default": [] + }) + select({ + "//:java": ["//exaudf/javacontainer:javacontainer"], + "//conditions:default": [] + }) + select({ + "//:bash": ["//exaudf/streaming_container:streamingcontainer"], + "//conditions:default": [] + }) + +VM_PYTHON3_DEPS=select({ + "//:python": ["//exaudf/python/python3:pythoncontainer"], + "//conditions:default": [] + }) + +cc_binary( + name = "exaudfclient_py3_bin", + srcs = ["exaudfclient.cc", "//exaudf:load_dynamic"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//exaudf/exaudflib:exaudflib-deps"], + defines = VM_ENABLED_DEFINES, + data = ["//exaudf:libexaudflib_complete.so"] +) + +## The purpose of the static binaries is to verify if the linker namespace test work correctly. +## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, +## so that the user can load it's own versions of those dependencies without any conflict. +## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, +## which then must be detected with the linker namespace tests: +## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration +## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects +## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. +## +## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//exaudf/exaudflib:exaudflib) +## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) +## as dependency as it is a binary for bazel. + +cc_binary( + name = "exaudfclient_py3_static_bin", + srcs = ["exaudfclient.cc", "load_dynamic.cc"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//exaudf/exaudflib:exaudflib-deps"] + [ "@zmq//exaudf:zmq", "@protobuf//exaudf:protobuf"], + defines = VM_ENABLED_DEFINES, + data = ["//exaudf:libexaudflib_complete.so"], +) + +# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc +# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths +# - Most flexible way to provides these paths would environment variables +# - The exasol database can't provide these paths, because they depend on the container +# - A workarround to provide these paths would be wrapper bash script which set these environment variables +# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing +# and we hardcode the paths for the production container + +sh_library( + name = "wrapper_generator_bin", + srcs=select({ + "//:valgrind_wrapper": ["//exaudf:create_binary_wrapper_valgrind.sh"], + "//:valgrind_massif_wrapper": ["//exaudf:create_binary_wrapper_valgrind_massif.sh"], + "//:stdout_to_bucketfs": ["//exaudf:create_binary_wrapper_stdout_to_bucketfs.sh"], + "//conditions:default": ["//exaudf:create_binary_wrapper.sh"] + }) +) + +SLOW_WRAPPER_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location exaudfclient.template.sh)" """ +FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ +CREATE_BINARY_PY3_SCRIPT=select({ + "//:fast_binary": FAST_BINARY_PY3, + "//:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, + "//conditions:default": FAST_BINARY_PY3 + }) +genrule( + name = "exaudfclient_py3", + cmd = CREATE_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3"], + srcs = [":exaudfclient_py3_bin", "//exaudf:libexaudflib_complete.so", "//exaudf:exaudfclient.template.sh", "//:wrapper_generator_bin"], + output_to_bindir = True +) + +SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location exaudfclient.template.sh)" """ +FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ +CREATE_STATIC_BINARY_PY3_SCRIPT=select({ + "//:fast_binary": FAST_BINARY_STATIC_PY3, + "//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, + "//conditions:default": FAST_BINARY_STATIC_PY3 + }) + +genrule( + name = "exaudfclient_py3_static", + cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3_static"], + srcs = [":exaudfclient_py3_static_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//:wrapper_generator_bin"], + output_to_bindir = True +) diff --git a/exaudfclient/base/README.md b/exaudfclient/base/README.md index ae7253f08..aba090156 100644 --- a/exaudfclient/base/README.md +++ b/exaudfclient/base/README.md @@ -52,11 +52,11 @@ With Bazel defines you can specify which language support is actually compiled i --define benchmark=true # This language is only for test and development purpose and benchmarks the performance of the C++ Implementation -The main targets are //:exaudfclient and //exaudf:exaudfclient_py3. The former one compiles with Python 2 support if Python is via defines enable. The later one instead compiles with Python 3 support. +The main targets are //:exaudfclient and //:exaudfclient_py3. The former one compiles with Python 2 support if Python is via defines enable. The later one instead compiles with Python 3 support. ## Visualizing the build dependencies -Bazel allows to query the dependencies of a target. Furthermore, it can export the dependencies as .dot file. With Graphviz you can generate figures from the .dot file. The script visualize_deps.sh and visualize_all.sh wrap this process. The script visualize_all.sh visualizes the dependencies of the main targets //:exaudfclient and //exaudf:exaudfclient_py3. The script visualize_deps.sh visualizes the dependencies of given targets. +Bazel allows to query the dependencies of a target. Furthermore, it can export the dependencies as .dot file. With Graphviz you can generate figures from the .dot file. The script visualize_deps.sh and visualize_all.sh wrap this process. The script visualize_all.sh visualizes the dependencies of the main targets //:exaudfclient and //:exaudfclient_py3. The script visualize_deps.sh visualizes the dependencies of given targets. visualize_deps.sh diff --git a/exaudfclient/base/exaudf/BUILD b/exaudfclient/base/exaudf/BUILD index 19f4adbd1..8c650787a 100644 --- a/exaudfclient/base/exaudf/BUILD +++ b/exaudfclient/base/exaudf/BUILD @@ -1,63 +1,10 @@ + package(default_visibility = ["//visibility:public"]) exports_files(["filter_swig_code.py", "build_integrated.py", - "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", "create_binary_wrapper_valgrind_massif.sh"]) - -load("//exaudf:variables.bzl", "VM_ENABLED_DEFINES") - -config_setting( - name = "benchmark", - define_values = {"benchmark": "true"}, -) - -config_setting( - name = "python", - define_values = {"python": "true"}, -) + "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", + "create_binary_wrapper_valgrind_massif.sh", "exaudfclient.template.sh"]) -config_setting( - name = "java", - define_values = {"java": "true"}, -) - -config_setting( - name = "bash", - define_values = {"bash": "true"}, -) - -config_setting( - name = "fast_binary", - define_values = { - "binary_type": "fast_binary", - }, -) - -config_setting( - name = "slow_wrapper", - define_values = { - "binary_type": "slow_wrapper", - }, -) - -config_setting( - name = "valgrind_wrapper", - define_values = { - "wrapper_type": "valgrind_wrapper", - }, -) - -config_setting( - name = "valgrind_massif_wrapper", - define_values = { - "wrapper_type": "valgrind_massif_wrapper", - }, -) - -config_setting( - name = "stdout_to_bucketfs", - define_values = { - "wrapper_type": "stdout_to_bucketfs", - }, -) +load("//:variables.bzl", "VM_ENABLED_DEFINES") cc_library( name = "debug_message_h", @@ -66,6 +13,16 @@ cc_library( ], ) +cc_library( + name = "load_dynamic", + srcs = [ + "load_dynamic.cc" + ], + deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h", "//exaudf/exaudflib:exaudflib-deps"], + defines = VM_ENABLED_DEFINES, +) + + # Using cc_binary to build a shared library as output target is a workaround, because # Bazel's cc_library are only intermediate stages and can be used as output target. # It is necessary to include //exaudf/exaudflib:exaudflib into deps and srcs, because @@ -73,7 +30,7 @@ cc_library( # won't work either, because it only contains the libraries as dependencies. # Bazel builts a static library (.a) and a dynamic library (.so) out of exaudflib:exaudflib. # In the libexaudflib_complete.so-2.params, we saw that Bazel uses both libraries to built libexaudflib_complete.so. -# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. +# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. cc_binary( name = "libexaudflib_complete.so", linkshared = 1, @@ -81,102 +38,3 @@ cc_binary( deps = ["//exaudf/exaudflib:exaudflib"], defines = VM_ENABLED_DEFINES, ) - - -VM_ENABLED_DEPS=select({ - "//exaudf:benchmark": ["//exaudf/benchmark_container:benchmark_container"], - "//conditions:default": [] - }) + select({ - "//exaudf:java": ["//exaudf/javacontainer:javacontainer"], - "//conditions:default": [] - }) + select({ - "//exaudf:bash": ["//exaudf/streaming_container:streamingcontainer"], - "//conditions:default": [] - }) - -VM_PYTHON3_DEPS=select({ - "//exaudf:python": ["//exaudf/python/python3:pythoncontainer"], - "//conditions:default": [] - }) - -cc_binary( - name = "exaudfclient_py3_bin", - srcs = ["exaudfclient.cc", "load_dynamic.cc"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudf/exaudflib:exaudflib-deps"], - defines = VM_ENABLED_DEFINES, - data = ["//exaudf:libexaudflib_complete.so"] -) - -## The purpose of the static binaries is to verify if the linker namespace test work correctly. -## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, -## so that the user can load it's own versions of those dependencies without any conflict. -## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, -## which then must be detected with the linker namespace tests: -## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration -## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects -## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. -## -## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//exaudf/exaudflib:exaudflib) -## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) -## as dependency as it is a binary for bazel. - -cc_binary( - name = "exaudfclient_py3_static_bin", - srcs = ["exaudfclient.cc", "load_dynamic.cc"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudf/exaudflib:exaudflib-deps"] + [ "@zmq//exaudf:zmq", "@protobuf//exaudf:protobuf"], - defines = VM_ENABLED_DEFINES, - data = ["//exaudf:libexaudflib_complete.so"], -) - -# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc -# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths -# - Most flexible way to provides these paths would environment variables -# - The exasol database can't provide these paths, because they depend on the container -# - A workarround to provide these paths would be wrapper bash script which set these environment variables -# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing -# and we hardcode the paths for the production container - -sh_library( - name = "wrapper_generator_bin", - srcs=select({ - "//exaudf:valgrind_wrapper": ["//exaudf:create_binary_wrapper_valgrind.sh"], - "//exaudf:valgrind_massif_wrapper": ["//exaudf:create_binary_wrapper_valgrind_massif.sh"], - "//exaudf:stdout_to_bucketfs": ["//exaudf:create_binary_wrapper_stdout_to_bucketfs.sh"], - "//conditions:default": ["//exaudf:create_binary_wrapper.sh"] - }) -) - -SLOW_WRAPPER_BINARY_PY3="""$(location //exaudf:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ -CREATE_BINARY_PY3_SCRIPT=select({ - "//exaudf:fast_binary": FAST_BINARY_PY3, - "//exaudf:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, - "//conditions:default": FAST_BINARY_PY3 - }) -genrule( - name = "exaudfclient_py3", - cmd = CREATE_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3"], - srcs = [":exaudfclient_py3_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//exaudf:wrapper_generator_bin"], - output_to_bindir = True -) - -SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //exaudf:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ -CREATE_STATIC_BINARY_PY3_SCRIPT=select({ - "//exaudf:fast_binary": FAST_BINARY_STATIC_PY3, - "//exaudf:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, - "//conditions:default": FAST_BINARY_STATIC_PY3 - }) - -genrule( - name = "exaudfclient_py3_static", - cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3_static"], - srcs = [":exaudfclient_py3_static_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//exaudf:wrapper_generator_bin"], - output_to_bindir = True -) diff --git a/exaudfclient/base/exaudf/exaudflib/BUILD b/exaudfclient/base/exaudf/exaudflib/BUILD index fbff5069d..33929fd23 100644 --- a/exaudfclient/base/exaudf/exaudflib/BUILD +++ b/exaudfclient/base/exaudf/exaudflib/BUILD @@ -1,7 +1,7 @@ package(default_visibility = ["//visibility:public"]) exports_files(["exascript.i"]) -load("//exaudf:variables.bzl", "VM_ENABLED_DEFINES") +load("//:variables.bzl", "VM_ENABLED_DEFINES") cc_library( name = "scriptoptionlines", @@ -17,7 +17,7 @@ cc_library( srcs = ["swig/script_data_transfer_objects.cc","swig/script_data_transfer_objects.h"], hdrs = ["swig/script_data_transfer_objects.h"], copts= select({ - "//exaudf:benchmark": ["-fno-lto"], + "//:benchmark": ["-fno-lto"], "//conditions:default": [] }), # We deactivate link time optimization for benchmark, @@ -31,7 +31,7 @@ cc_library( deps = [":script_data_transfer_objects"], hdrs = ["swig/script_data_transfer_objects_wrapper.h"], copts= select({ - "//exaudf:benchmark": ["-fno-lto"], + "//:benchmark": ["-fno-lto"], "//conditions:default": [] }), # We deactivate link time optimization for benchmark, diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer.cc b/exaudfclient/base/exaudf/javacontainer/javacontainer.cc index 66a126d06..578ac83d0 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer.cc +++ b/exaudfclient/base/exaudf/javacontainer/javacontainer.cc @@ -1,5 +1,5 @@ -#include "javacontainer/javacontainer.h" -#include "javacontainer/javacontainer_impl.h" +#include "exaudf/javacontainer/javacontainer.h" +#include "exaudf/javacontainer/javacontainer_impl.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc index f37017124..c3e0d25f4 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc +++ b/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc @@ -11,8 +11,8 @@ #include "exascript_java_jni_decl.h" #include "exaudf/debug_message.h" -#include "javacontainer/javacontainer.h" -#include "javacontainer/javacontainer_impl.h" +#include "exaudf/javacontainer/javacontainer.h" +#include "exaudf/javacontainer/javacontainer_impl.h" #include "exaudf/exaudflib/vm/scriptoptionlines.h" using namespace SWIGVMContainers; diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc b/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc index 5ddfd23d9..0f54c085f 100644 --- a/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc +++ b/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc @@ -1,7 +1,7 @@ #include "include/gtest/gtest.h" #include "gmock/gmock.h" -#include "javacontainer/test/cpp/javavm_test.h" +#include "exaudf/javacontainer/test/cpp/javavm_test.h" #include TEST(JavaContainer, basic_jar) { diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc b/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc index 59e873f0b..aa2210222 100644 --- a/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc +++ b/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc @@ -1,5 +1,5 @@ -#include "javacontainer/test/cpp/javavm_test.h" -#include "javacontainer/javacontainer_impl.h" +#include "exaudf/javacontainer/test/cpp/javavm_test.h" +#include "exaudf/javacontainer/javacontainer_impl.h" #include diff --git a/exaudfclient/base/exaudf/exaudfclient.cc b/exaudfclient/base/exaudfclient.cc similarity index 98% rename from exaudfclient/base/exaudf/exaudfclient.cc rename to exaudfclient/base/exaudfclient.cc index db06f32ed..567bee530 100644 --- a/exaudfclient/base/exaudf/exaudfclient.cc +++ b/exaudfclient/base/exaudfclient.cc @@ -38,11 +38,11 @@ #ifdef ENABLE_JAVA_VM -#include "javacontainer/javacontainer.h" +#include "exaudf/javacontainer/javacontainer.h" #endif //ENABLE_JAVA_VM #ifdef ENABLE_PYTHON_VM -#include "python/pythoncontainer.h" +#include "exaudf/python/pythoncontainer.h" #endif //ENABLE_PYTHON_VM #ifdef UDF_PLUGIN_CLIENT diff --git a/exaudfclient/base/exaudf/variables.bzl b/exaudfclient/base/variables.bzl similarity index 68% rename from exaudfclient/base/exaudf/variables.bzl rename to exaudfclient/base/variables.bzl index b1c1504c9..9a12f3744 100644 --- a/exaudfclient/base/exaudf/variables.bzl +++ b/exaudfclient/base/variables.bzl @@ -1,17 +1,17 @@ BENCHMARK_VM_ENABLED_DEFINE=select({ - "//exaudf:benchmark": ["ENABLE_BENCHMARK_VM"], + "//:benchmark": ["ENABLE_BENCHMARK_VM"], "//conditions:default": [] }) STREAMING_VM_ENABLED_DEFINE=select({ - "//exaudf:bash": ["ENABLE_STREAMING_VM"], + "//:bash": ["ENABLE_STREAMING_VM"], "//conditions:default": [] }) PYTHON_VM_ENABLED_DEFINE=select({ - "//exaudf:python": ["ENABLE_PYTHON_VM"], + "//:python": ["ENABLE_PYTHON_VM"], "//conditions:default": [] }) JAVA_VM_ENABLED_DEFINE=select({ - "//exaudf:java": ["ENABLE_JAVA_VM"], + "//:java": ["ENABLE_JAVA_VM"], "//conditions:default": [] }) diff --git a/exaudfclient/base/visualize_all.sh b/exaudfclient/base/visualize_all.sh index c87277486..f72691bf6 100644 --- a/exaudfclient/base/visualize_all.sh +++ b/exaudfclient/base/visualize_all.sh @@ -1,3 +1,3 @@ #!/bin/bash -bash visualize_deps.sh "//:exaudfclient //exaudf:exaudfclient_py3" "$@" \ No newline at end of file +bash visualize_deps.sh "//:exaudfclient //:exaudfclient_py3" "$@" \ No newline at end of file From 77c3f3117cad89db4bcae9c23795960d55e536bc Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:05:44 -0300 Subject: [PATCH 15/25] Moved exaudf directory into base and base one up --- exaudfclient/{base => }/.bazelrc | 2 +- exaudfclient/{base => }/.env.template | 0 exaudfclient/{base => }/.gitignore | 0 exaudfclient/BUILD | 156 ++++++++++++++++ exaudfclient/MODULE.bazel | 3 + exaudfclient/{base => }/README.md | 2 +- exaudfclient/base/BUILD | 172 +++--------------- exaudfclient/base/MODULE.bazel | 10 - .../base/{exaudf => }/base.MODULE.bazel | 10 +- .../{exaudf => }/benchmark_container/BUILD | 2 +- .../benchmark_container.cc | 2 +- .../benchmark_container/benchmark_container.h | 8 +- .../base/{exaudf => }/build_integrated.py | 0 exaudfclient/base/build_local_all.sh | 3 - .../{exaudf => }/create_binary_wrapper.sh | 0 ...reate_binary_wrapper_stdout_to_bucketfs.sh | 0 .../create_binary_wrapper_valgrind.sh | 0 .../create_binary_wrapper_valgrind_massif.sh | 0 .../base/{exaudf => }/debug_message.h | 0 exaudfclient/base/exaudf/BUILD | 40 ---- .../impl/swig/swig_general_iterator.cc | 3 - .../exaudflib/impl/swig/swig_meta_data.cc | 3 - .../impl/swig/swig_result_handler.cc | 3 - .../impl/swig/swig_table_iterator.cc | 3 - .../base/exaudf/exaudflib/swig/swig_common.cc | 2 - .../exaudf/exaudflib/swig/swig_meta_data.cc | 2 - .../exaudflib/swig/swig_result_handler.cc | 2 - .../exaudflib/swig/swig_table_iterator.cc | 2 - .../{exaudf => }/exaudfclient.template.sh | 2 +- .../base/{exaudf => }/exaudflib/BUILD | 6 +- .../base/{exaudf => }/exaudflib/exascript.i | 6 +- .../base/{exaudf => }/exaudflib/impl/check.cc | 6 +- .../base/{exaudf => }/exaudflib/impl/check.h | 0 .../exaudflib/impl/exaudflib_main.cc | 16 +- .../{exaudf => }/exaudflib/impl/global.cc | 2 +- .../base/{exaudf => }/exaudflib/impl/global.h | 6 +- .../exaudflib/impl/msg_conversion.cc | 2 +- .../exaudflib/impl/msg_conversion.h | 0 .../exaudflib/impl/socket_high_level.cc | 16 +- .../exaudflib/impl/socket_high_level.h | 0 .../exaudflib/impl/socket_info.cc | 2 +- .../{exaudf => }/exaudflib/impl/socket_info.h | 0 .../exaudflib/impl/socket_low_level.cc | 6 +- .../exaudflib/impl/socket_low_level.h | 0 .../exaudflib/impl/swig/swig_factory.cc | 6 +- .../impl/swig/swig_general_iterator.cc | 3 + .../impl/swig/swig_general_iterator.h | 4 +- .../exaudflib/impl/swig/swig_meta_data.cc | 3 + .../exaudflib/impl/swig/swig_meta_data.h | 12 +- .../impl/swig/swig_result_handler.cc | 3 + .../exaudflib/impl/swig/swig_result_handler.h | 14 +- .../impl/swig/swig_table_iterator.cc | 3 + .../exaudflib/impl/swig/swig_table_iterator.h | 12 +- .../{exaudf => }/exaudflib/load_dynamic.h | 0 .../swig/script_data_transfer_objects.cc | 0 .../swig/script_data_transfer_objects.h | 0 .../script_data_transfer_objects_wrapper.cc | 0 .../script_data_transfer_objects_wrapper.h | 0 .../base/exaudflib/swig/swig_common.cc | 2 + .../{exaudf => }/exaudflib/swig/swig_common.h | 0 .../base/exaudflib/swig/swig_meta_data.cc | 2 + .../exaudflib/swig/swig_meta_data.h | 6 +- .../exaudflib/swig/swig_result_handler.cc | 2 + .../exaudflib/swig/swig_result_handler.h | 4 +- .../exaudflib/swig/swig_table_iterator.cc | 2 + .../exaudflib/swig/swig_table_iterator.h | 2 +- .../base/{exaudf => }/exaudflib/test/BUILD | 4 +- .../script_data_transfer_objects_test.cpp | 2 +- .../test/script_option_lines_test.cpp | 2 +- .../exaudflib/udf_plugin_interface.h | 0 .../exaudflib/vm/scriptoptionlines.cc | 0 .../exaudflib/vm/scriptoptionlines.h | 0 .../base/{exaudf => }/exaudflib/vm/swig_vm.cc | 2 +- .../base/{exaudf => }/exaudflib/vm/swig_vm.h | 4 +- .../{exaudf => }/exaudflib/zmqcontainer.proto | 0 .../base/{exaudf => }/filter_swig_code.py | 0 .../base/{exaudf => }/java_repository.bzl | 0 .../base/{exaudf => }/javacontainer/BUILD | 20 +- .../javacontainer/ExaCompiler.java | 0 .../ExaConnectionInformationImpl.java | 0 .../ExaExportSpecificationImpl.java | 0 .../ExaImportSpecificationImpl.java | 0 .../javacontainer/ExaIteratorImpl.java | 0 .../javacontainer/ExaMetadataImpl.java | 0 .../javacontainer/ExaStackTraceCleaner.java | 0 .../ExaUndefinedSingleCallException.java | 0 .../javacontainer/ExaWrapper.java | 0 .../javacontainer/exascript_java_jni_decl.h | 0 .../javacontainer/javacontainer.cc | 4 +- .../javacontainer/javacontainer.h | 2 +- .../javacontainer/javacontainer_impl.cc | 10 +- .../javacontainer/javacontainer_impl.h | 2 +- .../{exaudf => }/javacontainer/test/BUILD | 0 .../javacontainer/test/cpp/exaudf_wrapper.cc | 2 +- .../test/cpp/javacontainer_test.cc | 2 +- .../javacontainer/test/cpp/javavm_test.cc | 4 +- .../javacontainer/test/cpp/javavm_test.h | 0 .../com/exasol/ExaStackTraceCleanerTest.java | 0 .../{exaudf => }/javacontainer/test/test.jar | 0 .../base/{exaudf => }/load_dynamic.cc | 2 +- .../base/{exaudf => }/protobuf_repository.bzl | 0 exaudfclient/base/{exaudf => }/python/BUILD | 0 .../python/exascript_python_preset_core.py | 0 .../python/exascript_python_wrap.py | 2 +- .../extend_exascript_python_preset_py.sh | 0 .../base/{exaudf => }/python/python3/BUILD | 38 ++-- .../python/python3/python_ext_dataframe.cc | 4 +- .../{exaudf => }/python/pythoncontainer.cc | 8 +- .../{exaudf => }/python/pythoncontainer.h | 2 +- .../base/{exaudf => }/python_repository.bzl | 0 .../{exaudf => }/streaming_container/BUILD | 2 +- .../streaming_container/streamingcontainer.cc | 0 .../streaming_container/streamingcontainer.h | 0 .../base/{exaudf => }/zmq_repository.bzl | 0 exaudfclient/{base => }/build.sh | 0 exaudfclient/{base => }/build_local.sh | 0 exaudfclient/build_local_all.sh | 3 + .../{base => }/docs/exaudfclient.drawio | 0 exaudfclient/{base => }/docs/exaudfclient.png | Bin exaudfclient/{base => }/exaudfclient.cc | 10 +- exaudfclient/{base => }/run.sh | 0 exaudfclient/{base => }/run_local.sh | 0 exaudfclient/{base => }/test_udfclient.sh | 0 exaudfclient/{base => }/variables.bzl | 0 exaudfclient/{base => }/visualize_all.sh | 0 exaudfclient/{base => }/visualize_deps.sh | 0 .../base_test_build_run/Dockerfile | 6 +- .../flavor_base/build_run/Dockerfile | 6 +- .../flavor_base/build_steps.py | 4 +- .../base_test_build_run/Dockerfile | 6 +- .../flavor_base/build_run/Dockerfile | 6 +- .../flavor_base/build_steps.py | 4 +- .../base_test_build_run/Dockerfile | 6 +- .../flavor_base/build_run/Dockerfile | 6 +- .../flavor_base/build_steps.py | 4 +- 135 files changed, 376 insertions(+), 383 deletions(-) rename exaudfclient/{base => }/.bazelrc (93%) rename exaudfclient/{base => }/.env.template (100%) rename exaudfclient/{base => }/.gitignore (100%) create mode 100644 exaudfclient/BUILD create mode 100644 exaudfclient/MODULE.bazel rename exaudfclient/{base => }/README.md (89%) delete mode 100644 exaudfclient/base/MODULE.bazel rename exaudfclient/base/{exaudf => }/base.MODULE.bazel (69%) rename exaudfclient/base/{exaudf => }/benchmark_container/BUILD (58%) rename exaudfclient/base/{exaudf => }/benchmark_container/benchmark_container.cc (99%) rename exaudfclient/base/{exaudf => }/benchmark_container/benchmark_container.h (78%) rename exaudfclient/base/{exaudf => }/build_integrated.py (100%) delete mode 100755 exaudfclient/base/build_local_all.sh rename exaudfclient/base/{exaudf => }/create_binary_wrapper.sh (100%) rename exaudfclient/base/{exaudf => }/create_binary_wrapper_stdout_to_bucketfs.sh (100%) rename exaudfclient/base/{exaudf => }/create_binary_wrapper_valgrind.sh (100%) rename exaudfclient/base/{exaudf => }/create_binary_wrapper_valgrind_massif.sh (100%) rename exaudfclient/base/{exaudf => }/debug_message.h (100%) delete mode 100644 exaudfclient/base/exaudf/BUILD delete mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc delete mode 100644 exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc rename exaudfclient/base/{exaudf => }/exaudfclient.template.sh (75%) rename exaudfclient/base/{exaudf => }/exaudflib/BUILD (96%) rename exaudfclient/base/{exaudf => }/exaudflib/exascript.i (96%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/check.cc (95%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/check.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/exaudflib_main.cc (97%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/global.cc (98%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/global.h (83%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/msg_conversion.cc (97%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/msg_conversion.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_high_level.cc (98%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_high_level.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_info.cc (92%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_info.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_low_level.cc (96%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/socket_low_level.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/impl/swig/swig_factory.cc (73%) create mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc rename exaudfclient/base/{exaudf => }/exaudflib/impl/swig/swig_general_iterator.h (88%) create mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc rename exaudfclient/base/{exaudf => }/exaudflib/impl/swig/swig_meta_data.h (97%) create mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc rename exaudfclient/base/{exaudf => }/exaudflib/impl/swig/swig_result_handler.h (97%) create mode 100644 exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc rename exaudfclient/base/{exaudf => }/exaudflib/impl/swig/swig_table_iterator.h (98%) rename exaudfclient/base/{exaudf => }/exaudflib/load_dynamic.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/swig/script_data_transfer_objects.cc (100%) rename exaudfclient/base/{exaudf => }/exaudflib/swig/script_data_transfer_objects.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/swig/script_data_transfer_objects_wrapper.cc (100%) rename exaudfclient/base/{exaudf => }/exaudflib/swig/script_data_transfer_objects_wrapper.h (100%) create mode 100644 exaudfclient/base/exaudflib/swig/swig_common.cc rename exaudfclient/base/{exaudf => }/exaudflib/swig/swig_common.h (100%) create mode 100644 exaudfclient/base/exaudflib/swig/swig_meta_data.cc rename exaudfclient/base/{exaudf => }/exaudflib/swig/swig_meta_data.h (96%) create mode 100644 exaudfclient/base/exaudflib/swig/swig_result_handler.cc rename exaudfclient/base/{exaudf => }/exaudflib/swig/swig_result_handler.h (96%) create mode 100644 exaudfclient/base/exaudflib/swig/swig_table_iterator.cc rename exaudfclient/base/{exaudf => }/exaudflib/swig/swig_table_iterator.h (98%) rename exaudfclient/base/{exaudf => }/exaudflib/test/BUILD (62%) rename exaudfclient/base/{exaudf => }/exaudflib/test/script_data_transfer_objects_test.cpp (99%) rename exaudfclient/base/{exaudf => }/exaudflib/test/script_option_lines_test.cpp (99%) rename exaudfclient/base/{exaudf => }/exaudflib/udf_plugin_interface.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/vm/scriptoptionlines.cc (100%) rename exaudfclient/base/{exaudf => }/exaudflib/vm/scriptoptionlines.h (100%) rename exaudfclient/base/{exaudf => }/exaudflib/vm/swig_vm.cc (50%) rename exaudfclient/base/{exaudf => }/exaudflib/vm/swig_vm.h (92%) rename exaudfclient/base/{exaudf => }/exaudflib/zmqcontainer.proto (100%) rename exaudfclient/base/{exaudf => }/filter_swig_code.py (100%) rename exaudfclient/base/{exaudf => }/java_repository.bzl (100%) rename exaudfclient/base/{exaudf => }/javacontainer/BUILD (90%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaCompiler.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaConnectionInformationImpl.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaExportSpecificationImpl.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaImportSpecificationImpl.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaIteratorImpl.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaMetadataImpl.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaStackTraceCleaner.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaUndefinedSingleCallException.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/ExaWrapper.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/exascript_java_jni_decl.h (100%) rename exaudfclient/base/{exaudf => }/javacontainer/javacontainer.cc (94%) rename exaudfclient/base/{exaudf => }/javacontainer/javacontainer.h (93%) rename exaudfclient/base/{exaudf => }/javacontainer/javacontainer_impl.cc (99%) rename exaudfclient/base/{exaudf => }/javacontainer/javacontainer_impl.h (98%) rename exaudfclient/base/{exaudf => }/javacontainer/test/BUILD (100%) rename exaudfclient/base/{exaudf => }/javacontainer/test/cpp/exaudf_wrapper.cc (87%) rename exaudfclient/base/{exaudf => }/javacontainer/test/cpp/javacontainer_test.cc (99%) rename exaudfclient/base/{exaudf => }/javacontainer/test/cpp/javavm_test.cc (89%) rename exaudfclient/base/{exaudf => }/javacontainer/test/cpp/javavm_test.h (100%) rename exaudfclient/base/{exaudf => }/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java (100%) rename exaudfclient/base/{exaudf => }/javacontainer/test/test.jar (100%) rename exaudfclient/base/{exaudf => }/load_dynamic.cc (93%) rename exaudfclient/base/{exaudf => }/protobuf_repository.bzl (100%) rename exaudfclient/base/{exaudf => }/python/BUILD (100%) rename exaudfclient/base/{exaudf => }/python/exascript_python_preset_core.py (100%) rename exaudfclient/base/{exaudf => }/python/exascript_python_wrap.py (99%) rename exaudfclient/base/{exaudf => }/python/extend_exascript_python_preset_py.sh (100%) rename exaudfclient/base/{exaudf => }/python/python3/BUILD (59%) rename exaudfclient/base/{exaudf => }/python/python3/python_ext_dataframe.cc (99%) rename exaudfclient/base/{exaudf => }/python/pythoncontainer.cc (99%) rename exaudfclient/base/{exaudf => }/python/pythoncontainer.h (92%) rename exaudfclient/base/{exaudf => }/python_repository.bzl (100%) rename exaudfclient/base/{exaudf => }/streaming_container/BUILD (72%) rename exaudfclient/base/{exaudf => }/streaming_container/streamingcontainer.cc (100%) rename exaudfclient/base/{exaudf => }/streaming_container/streamingcontainer.h (100%) rename exaudfclient/base/{exaudf => }/zmq_repository.bzl (100%) rename exaudfclient/{base => }/build.sh (100%) rename exaudfclient/{base => }/build_local.sh (100%) create mode 100755 exaudfclient/build_local_all.sh rename exaudfclient/{base => }/docs/exaudfclient.drawio (100%) rename exaudfclient/{base => }/docs/exaudfclient.png (100%) rename exaudfclient/{base => }/exaudfclient.cc (96%) rename exaudfclient/{base => }/run.sh (100%) rename exaudfclient/{base => }/run_local.sh (100%) rename exaudfclient/{base => }/test_udfclient.sh (100%) rename exaudfclient/{base => }/variables.bzl (100%) rename exaudfclient/{base => }/visualize_all.sh (100%) rename exaudfclient/{base => }/visualize_deps.sh (100%) diff --git a/exaudfclient/base/.bazelrc b/exaudfclient/.bazelrc similarity index 93% rename from exaudfclient/base/.bazelrc rename to exaudfclient/.bazelrc index 1607ca871..128807709 100644 --- a/exaudfclient/base/.bazelrc +++ b/exaudfclient/.bazelrc @@ -3,7 +3,7 @@ build --copt='-std=c++17' --force_pic --action_env=PROTOBUF_BIN --action_env=PRO build:benchmark --define benchmark=true build:java --define java=true --action_env=JAVA_PREFIX build:python --define python=true --action_env=PYTHON2_SYSPATH --action_env=PYTHON2_PREFIX --action_env=PYTHON2_VERSION --action_env=NUMPY_PREFIX --action_env=PYTHON3_SYSPATH --action_env=PYTHON3_PREFIX --action_env=PYTHON3_VERSION -build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient_py3 +build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/base/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient_py3 build:slow-wrapper-py3 --define binary_type=slow_wrapper //:exaudfclient_py3 build:static-binary-py3 //:exaudfclient_py3_static build:test-binaries-py3 --config=static-binary-py3 --config=slow-wrapper-py3 diff --git a/exaudfclient/base/.env.template b/exaudfclient/.env.template similarity index 100% rename from exaudfclient/base/.env.template rename to exaudfclient/.env.template diff --git a/exaudfclient/base/.gitignore b/exaudfclient/.gitignore similarity index 100% rename from exaudfclient/base/.gitignore rename to exaudfclient/.gitignore diff --git a/exaudfclient/BUILD b/exaudfclient/BUILD new file mode 100644 index 000000000..bc72b2f91 --- /dev/null +++ b/exaudfclient/BUILD @@ -0,0 +1,156 @@ + +load("//:variables.bzl", "VM_ENABLED_DEFINES") + +config_setting( + name = "benchmark", + define_values = {"benchmark": "true"}, +) + +config_setting( + name = "python", + define_values = {"python": "true"}, +) + +config_setting( + name = "java", + define_values = {"java": "true"}, +) + +config_setting( + name = "bash", + define_values = {"bash": "true"}, +) + +config_setting( + name = "fast_binary", + define_values = { + "binary_type": "fast_binary", + }, +) + +config_setting( + name = "slow_wrapper", + define_values = { + "binary_type": "slow_wrapper", + }, +) + +config_setting( + name = "valgrind_wrapper", + define_values = { + "wrapper_type": "valgrind_wrapper", + }, +) + +config_setting( + name = "valgrind_massif_wrapper", + define_values = { + "wrapper_type": "valgrind_massif_wrapper", + }, +) + +config_setting( + name = "stdout_to_bucketfs", + define_values = { + "wrapper_type": "stdout_to_bucketfs", + }, +) + + +VM_ENABLED_DEPS=select({ + "//:benchmark": ["//base/benchmark_container:benchmark_container"], + "//conditions:default": [] + }) + select({ + "//:java": ["//base/javacontainer:javacontainer"], + "//conditions:default": [] + }) + select({ + "//:bash": ["//base/streaming_container:streamingcontainer"], + "//conditions:default": [] + }) + +VM_PYTHON3_DEPS=select({ + "//:python": ["//base/python/python3:pythoncontainer"], + "//conditions:default": [] + }) + +cc_binary( + name = "exaudfclient_py3_bin", + srcs = ["exaudfclient.cc", "//base:load_dynamic"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//base/exaudflib:header", "//base:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//base/exaudflib:exaudflib-deps"], + defines = VM_ENABLED_DEFINES, + data = ["//base:libexaudflib_complete.so"] +) + +## The purpose of the static binaries is to verify if the linker namespace test work correctly. +## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, +## so that the user can load it's own versions of those dependencies without any conflict. +## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, +## which then must be detected with the linker namespace tests: +## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration +## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects +## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. +## +## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//base/exaudflib:exaudflib) +## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) +## as dependency as it is a binary for bazel. + +cc_binary( + name = "exaudfclient_py3_static_bin", + srcs = ["exaudfclient.cc", "//base:load_dynamic"], + linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace + deps = ["//base/exaudflib:header", "//base:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ + ["//base/exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"], + defines = VM_ENABLED_DEFINES, + data = ["//base:libexaudflib_complete.so"], +) + +# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc +# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths +# - Most flexible way to provides these paths would environment variables +# - The exasol database can't provide these paths, because they depend on the container +# - A workarround to provide these paths would be wrapper bash script which set these environment variables +# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing +# and we hardcode the paths for the production container + +sh_library( + name = "wrapper_generator_bin", + srcs=select({ + "//:valgrind_wrapper": ["//base:create_binary_wrapper_valgrind.sh"], + "//:valgrind_massif_wrapper": ["//base:create_binary_wrapper_valgrind_massif.sh"], + "//:stdout_to_bucketfs": ["//base:create_binary_wrapper_stdout_to_bucketfs.sh"], + "//conditions:default": ["//base:create_binary_wrapper.sh"] + }) +) + +SLOW_WRAPPER_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location //base:exaudfclient.template.sh)" """ +FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ +CREATE_BINARY_PY3_SCRIPT=select({ + "//:fast_binary": FAST_BINARY_PY3, + "//:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, + "//conditions:default": FAST_BINARY_PY3 + }) +genrule( + name = "exaudfclient_py3", + cmd = CREATE_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3"], + srcs = [":exaudfclient_py3_bin", "//base:libexaudflib_complete.so", "//base:exaudfclient.template.sh", "//:wrapper_generator_bin"], + output_to_bindir = True +) + +SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location //base:exaudfclient.template.sh)" """ +FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ +CREATE_STATIC_BINARY_PY3_SCRIPT=select({ + "//:fast_binary": FAST_BINARY_STATIC_PY3, + "//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, + "//conditions:default": FAST_BINARY_STATIC_PY3 + }) + +genrule( + name = "exaudfclient_py3_static", + cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, + outs = ["exaudfclient_py3_static"], + srcs = [":exaudfclient_py3_static_bin", "//base:libexaudflib_complete.so", "//base:exaudfclient.template.sh", "//:wrapper_generator_bin"], + output_to_bindir = True +) diff --git a/exaudfclient/MODULE.bazel b/exaudfclient/MODULE.bazel new file mode 100644 index 000000000..3c7561918 --- /dev/null +++ b/exaudfclient/MODULE.bazel @@ -0,0 +1,3 @@ +module(name="exaudfclient", version = "1.0") + +include("//base:base.MODULE.bazel") \ No newline at end of file diff --git a/exaudfclient/base/README.md b/exaudfclient/README.md similarity index 89% rename from exaudfclient/base/README.md rename to exaudfclient/README.md index aba090156..848c6212a 100644 --- a/exaudfclient/base/README.md +++ b/exaudfclient/README.md @@ -70,7 +70,7 @@ The usage of multiple linker namespace requires some precautions in the build pr ## Precautions in the build process -In the build process you need to be cautious which libraries you link together and that no link leaks symbols from a library in one namespace to a library in the other namespace. Furthermore, you have to build a shared library with all dependency linked to it as output target. In our case, we have to main output targets //:exaudfclient and //:libexaudflib.so. Both get loaded into different linker namespaces. The language container live in the same namespace as //:exaudfclient. This namespace must not know anyhing about protobuf and zeromq, because it is possible that a language container may load protobuf or zeromq in a different version. Protobuf and zeromq are only known in the namespace of //:libexaudflib.so. The target //:libexaudflib.so depends on //exaudf/exaudflib:exaudflib which contains the logic of the exaudflib. You must not depend on //exaudf/exaudflib:exaudflib in //:exaudfclient or the langauge container, because this would leak zeromq and protobuf. If you need to depend on the other dependency of //exaudf/exaudflib:exaudflib which not depend on protobuf or zeromq them self, such as //exaudf/exaudflib:script_data_transfer_objects, //exaudf/exaudflib:script_data_transfer_objects_wrapper, //exaudf/exaudflib:scriptoptionlines, use either their target as self, the collection of libraries //exaudf/exaudflib:exaudflib-deps or the collection of headers //exaudf/exaudflib:header. +In the build process you need to be cautious which libraries you link together and that no link leaks symbols from a library in one namespace to a library in the other namespace. Furthermore, you have to build a shared library with all dependency linked to it as output target. In our case, we have to main output targets //:exaudfclient and //:libexaudflib.so. Both get loaded into different linker namespaces. The language container live in the same namespace as //:exaudfclient. This namespace must not know anyhing about protobuf and zeromq, because it is possible that a language container may load protobuf or zeromq in a different version. Protobuf and zeromq are only known in the namespace of //:libexaudflib.so. The target //:libexaudflib.so depends on //base/exaudflib:exaudflib which contains the logic of the exaudflib. You must not depend on //base/exaudflib:exaudflib in //:exaudfclient or the langauge container, because this would leak zeromq and protobuf. If you need to depend on the other dependency of //base/exaudflib:exaudflib which not depend on protobuf or zeromq them self, such as //base/exaudflib:script_data_transfer_objects, //base/exaudflib:script_data_transfer_objects_wrapper, //base/exaudflib:scriptoptionlines, use either their target as self, the collection of libraries //base/exaudflib:exaudflib-deps or the collection of headers //base/exaudflib:header. ## Precautions in the implementations diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index bbeae5c97..02515f7aa 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -1,156 +1,40 @@ -load("//:variables.bzl", "VM_ENABLED_DEFINES") - -config_setting( - name = "benchmark", - define_values = {"benchmark": "true"}, -) - -config_setting( - name = "python", - define_values = {"python": "true"}, -) - -config_setting( - name = "java", - define_values = {"java": "true"}, -) - -config_setting( - name = "bash", - define_values = {"bash": "true"}, -) - -config_setting( - name = "fast_binary", - define_values = { - "binary_type": "fast_binary", - }, -) - -config_setting( - name = "slow_wrapper", - define_values = { - "binary_type": "slow_wrapper", - }, -) - -config_setting( - name = "valgrind_wrapper", - define_values = { - "wrapper_type": "valgrind_wrapper", - }, -) +package(default_visibility = ["//visibility:public"]) +exports_files(["filter_swig_code.py", "build_integrated.py", + "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", + "create_binary_wrapper_valgrind_massif.sh", "exaudfclient.template.sh"]) -config_setting( - name = "valgrind_massif_wrapper", - define_values = { - "wrapper_type": "valgrind_massif_wrapper", - }, -) +load("//:variables.bzl", "VM_ENABLED_DEFINES") -config_setting( - name = "stdout_to_bucketfs", - define_values = { - "wrapper_type": "stdout_to_bucketfs", - }, +cc_library( + name = "debug_message_h", + hdrs = [ + "debug_message.h" + ], ) - -VM_ENABLED_DEPS=select({ - "//:benchmark": ["//exaudf/benchmark_container:benchmark_container"], - "//conditions:default": [] - }) + select({ - "//:java": ["//exaudf/javacontainer:javacontainer"], - "//conditions:default": [] - }) + select({ - "//:bash": ["//exaudf/streaming_container:streamingcontainer"], - "//conditions:default": [] - }) - -VM_PYTHON3_DEPS=select({ - "//:python": ["//exaudf/python/python3:pythoncontainer"], - "//conditions:default": [] - }) - -cc_binary( - name = "exaudfclient_py3_bin", - srcs = ["exaudfclient.cc", "//exaudf:load_dynamic"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudf/exaudflib:exaudflib-deps"], +cc_library( + name = "load_dynamic", + srcs = [ + "load_dynamic.cc" + ], + deps = ["//base/exaudflib:header", "//base:debug_message_h", "//base/exaudflib:exaudflib-deps"], defines = VM_ENABLED_DEFINES, - data = ["//exaudf:libexaudflib_complete.so"] ) -## The purpose of the static binaries is to verify if the linker namespace test work correctly. -## It is crucial that all linker symbols of exaudflib and all it's dependency are loaded into a new linker namespace, -## so that the user can load it's own versions of those dependencies without any conflict. -## With this binary we simulate an error in our build system, that is a direct depedency to protobuf/zmq, -## which then must be detected with the linker namespace tests: -## test/linker_namespace_sanity/linker_namespace_sanity.py checks the wrong configuration -## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects -## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace. -## -## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (//exaudf/exaudflib:exaudflib) -## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so) -## as dependency as it is a binary for bazel. +# Using cc_binary to build a shared library as output target is a workaround, because +# Bazel's cc_library are only intermediate stages and can be used as output target. +# It is necessary to include //base/exaudflib:exaudflib into deps and srcs, because +# otherwise dlmopen won't find the symbols of exaudflib and its dependencies. The target //base/exaudflib:exaudflib-deps +# won't work either, because it only contains the libraries as dependencies. +# Bazel builts a static library (.a) and a dynamic library (.so) out of exaudflib:exaudflib. +# In the libexaudflib_complete.so-2.params, we saw that Bazel uses both libraries to built libexaudflib_complete.so. +# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. cc_binary( - name = "exaudfclient_py3_static_bin", - srcs = ["exaudfclient.cc", "load_dynamic.cc"], - linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace - deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+ - ["//exaudf/exaudflib:exaudflib-deps"] + [ "@zmq//exaudf:zmq", "@protobuf//exaudf:protobuf"], + name = "libexaudflib_complete.so", + linkshared = 1, + srcs = ["//base/exaudflib:exaudflib"], + deps = ["//base/exaudflib:exaudflib"], defines = VM_ENABLED_DEFINES, - data = ["//exaudf:libexaudflib_complete.so"], -) - -# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc -# - libexaudflib_complete.so and python_ext_dataframe.cc get dynamically loaded, therefore the exaudfclient needs to know their paths -# - Most flexible way to provides these paths would environment variables -# - The exasol database can't provide these paths, because they depend on the container -# - A workarround to provide these paths would be wrapper bash script which set these environment variables -# - For performance reason, we can not wrap the binary into a shell script, as such this is only for local debugging and testing -# and we hardcode the paths for the production container - -sh_library( - name = "wrapper_generator_bin", - srcs=select({ - "//:valgrind_wrapper": ["//exaudf:create_binary_wrapper_valgrind.sh"], - "//:valgrind_massif_wrapper": ["//exaudf:create_binary_wrapper_valgrind_massif.sh"], - "//:stdout_to_bucketfs": ["//exaudf:create_binary_wrapper_stdout_to_bucketfs.sh"], - "//conditions:default": ["//exaudf:create_binary_wrapper.sh"] - }) -) - -SLOW_WRAPPER_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_PY3="""cp "$(location exaudfclient_py3_bin)" "$(location exaudfclient_py3)" """ -CREATE_BINARY_PY3_SCRIPT=select({ - "//:fast_binary": FAST_BINARY_PY3, - "//:slow_wrapper": SLOW_WRAPPER_BINARY_PY3, - "//conditions:default": FAST_BINARY_PY3 - }) -genrule( - name = "exaudfclient_py3", - cmd = CREATE_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3"], - srcs = [":exaudfclient_py3_bin", "//exaudf:libexaudflib_complete.so", "//exaudf:exaudfclient.template.sh", "//:wrapper_generator_bin"], - output_to_bindir = True -) - -SLOW_WRAPPER_STATIC_BINARY_PY3="""$(location //:wrapper_generator_bin) "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" "$(location exaudfclient.template.sh)" """ -FAST_BINARY_STATIC_PY3="""cp "$(location exaudfclient_py3_static_bin)" "$(location exaudfclient_py3_static)" """ -CREATE_STATIC_BINARY_PY3_SCRIPT=select({ - "//:fast_binary": FAST_BINARY_STATIC_PY3, - "//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY_PY3, - "//conditions:default": FAST_BINARY_STATIC_PY3 - }) - -genrule( - name = "exaudfclient_py3_static", - cmd = CREATE_STATIC_BINARY_PY3_SCRIPT, - outs = ["exaudfclient_py3_static"], - srcs = [":exaudfclient_py3_static_bin", "//exaudf:libexaudflib_complete.so", "exaudfclient.template.sh", "//:wrapper_generator_bin"], - output_to_bindir = True ) diff --git a/exaudfclient/base/MODULE.bazel b/exaudfclient/base/MODULE.bazel deleted file mode 100644 index c36da516c..000000000 --- a/exaudfclient/base/MODULE.bazel +++ /dev/null @@ -1,10 +0,0 @@ -############################################################################### -# Bazel now uses Bzlmod by default to manage external dependencies. -# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. -# -# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 -############################################################################### - -module(name="exaudfclient", version = "1.0") - -include("//exaudf:base.MODULE.bazel") \ No newline at end of file diff --git a/exaudfclient/base/exaudf/base.MODULE.bazel b/exaudfclient/base/base.MODULE.bazel similarity index 69% rename from exaudfclient/base/exaudf/base.MODULE.bazel rename to exaudfclient/base/base.MODULE.bazel index 4a983396d..0dc34e5df 100644 --- a/exaudfclient/base/exaudf/base.MODULE.bazel +++ b/exaudfclient/base/base.MODULE.bazel @@ -3,17 +3,17 @@ bazel_dep(name = "googletest", version = "1.15.0") bazel_dep(name = "rules_java", version = "6.1.1") bazel_dep(name = "rules_jvm_external", version = "6.2") -python_local_repository = use_repo_rule("//exaudf:python_repository.bzl", "python_local_repository") +python_local_repository = use_repo_rule("//base:python_repository.bzl", "python_local_repository") python_local_repository(name = "python3", python_version="python3") -numpy_local_repository = use_repo_rule("//exaudf:python_repository.bzl", "numpy_local_repository") +numpy_local_repository = use_repo_rule("//base:python_repository.bzl", "numpy_local_repository") numpy_local_repository(name = "numpy") -zmq_local_repository = use_repo_rule("//exaudf:zmq_repository.bzl", "zmq_local_repository") +zmq_local_repository = use_repo_rule("//base:zmq_repository.bzl", "zmq_local_repository") zmq_local_repository(name = "zmq") -protobuf_local_repository = use_repo_rule("//exaudf:protobuf_repository.bzl", "protobuf_local_repository") +protobuf_local_repository = use_repo_rule("//base:protobuf_repository.bzl", "protobuf_local_repository") protobuf_local_repository(name = "protobuf") @@ -34,7 +34,7 @@ cc_library( ) -java_local_repository = use_repo_rule("//exaudf:java_repository.bzl", "java_local_repository") +java_local_repository = use_repo_rule("//base:java_repository.bzl", "java_local_repository") java_local_repository(name = "java") maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") diff --git a/exaudfclient/base/exaudf/benchmark_container/BUILD b/exaudfclient/base/benchmark_container/BUILD similarity index 58% rename from exaudfclient/base/exaudf/benchmark_container/BUILD rename to exaudfclient/base/benchmark_container/BUILD index 1797eb98c..dcdffdcdd 100644 --- a/exaudfclient/base/exaudf/benchmark_container/BUILD +++ b/exaudfclient/base/benchmark_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "benchmark_container", srcs = ["benchmark_container.cc","benchmark_container.h"], hdrs = ["benchmark_container.h"], - deps = ["//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header", "//exaudf:debug_message_h"]+["//exaudf/exaudflib:scriptoptionlines"] + deps = ["//base/exaudflib:exaudflib-deps","//base/exaudflib:header", "//base:debug_message_h"]+["//base/exaudflib:scriptoptionlines"] ) \ No newline at end of file diff --git a/exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc b/exaudfclient/base/benchmark_container/benchmark_container.cc similarity index 99% rename from exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc rename to exaudfclient/base/benchmark_container/benchmark_container.cc index 52d88018d..3efa97cd0 100644 --- a/exaudfclient/base/exaudf/benchmark_container/benchmark_container.cc +++ b/exaudfclient/base/benchmark_container/benchmark_container.cc @@ -2,7 +2,7 @@ #define ENABLE_BENCHMARK_VM #endif -#include "exaudf/debug_message.h" +#include "base/debug_message.h" #include "benchmark_container.h" #include #include diff --git a/exaudfclient/base/exaudf/benchmark_container/benchmark_container.h b/exaudfclient/base/benchmark_container/benchmark_container.h similarity index 78% rename from exaudfclient/base/exaudf/benchmark_container/benchmark_container.h rename to exaudfclient/base/benchmark_container/benchmark_container.h index 436ebd3f5..eacf1f153 100644 --- a/exaudfclient/base/exaudf/benchmark_container/benchmark_container.h +++ b/exaudfclient/base/benchmark_container/benchmark_container.h @@ -1,7 +1,7 @@ -#include "exaudf/exaudflib/vm/swig_vm.h" -#include "exaudf/exaudflib/swig/swig_meta_data.h" -#include "exaudf/exaudflib/swig/swig_result_handler.h" -#include "exaudf/exaudflib/swig/swig_table_iterator.h" +#include "base/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/swig/swig_meta_data.h" +#include "base/exaudflib/swig/swig_result_handler.h" +#include "base/exaudflib/swig/swig_table_iterator.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/exaudf/build_integrated.py b/exaudfclient/base/build_integrated.py similarity index 100% rename from exaudfclient/base/exaudf/build_integrated.py rename to exaudfclient/base/build_integrated.py diff --git a/exaudfclient/base/build_local_all.sh b/exaudfclient/base/build_local_all.sh deleted file mode 100755 index bc8033b6c..000000000 --- a/exaudfclient/base/build_local_all.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -bash build_local.sh "$@" --config no-tty --config python --config java --config slow-wrapper-py3 diff --git a/exaudfclient/base/exaudf/create_binary_wrapper.sh b/exaudfclient/base/create_binary_wrapper.sh similarity index 100% rename from exaudfclient/base/exaudf/create_binary_wrapper.sh rename to exaudfclient/base/create_binary_wrapper.sh diff --git a/exaudfclient/base/exaudf/create_binary_wrapper_stdout_to_bucketfs.sh b/exaudfclient/base/create_binary_wrapper_stdout_to_bucketfs.sh similarity index 100% rename from exaudfclient/base/exaudf/create_binary_wrapper_stdout_to_bucketfs.sh rename to exaudfclient/base/create_binary_wrapper_stdout_to_bucketfs.sh diff --git a/exaudfclient/base/exaudf/create_binary_wrapper_valgrind.sh b/exaudfclient/base/create_binary_wrapper_valgrind.sh similarity index 100% rename from exaudfclient/base/exaudf/create_binary_wrapper_valgrind.sh rename to exaudfclient/base/create_binary_wrapper_valgrind.sh diff --git a/exaudfclient/base/exaudf/create_binary_wrapper_valgrind_massif.sh b/exaudfclient/base/create_binary_wrapper_valgrind_massif.sh similarity index 100% rename from exaudfclient/base/exaudf/create_binary_wrapper_valgrind_massif.sh rename to exaudfclient/base/create_binary_wrapper_valgrind_massif.sh diff --git a/exaudfclient/base/exaudf/debug_message.h b/exaudfclient/base/debug_message.h similarity index 100% rename from exaudfclient/base/exaudf/debug_message.h rename to exaudfclient/base/debug_message.h diff --git a/exaudfclient/base/exaudf/BUILD b/exaudfclient/base/exaudf/BUILD deleted file mode 100644 index 8c650787a..000000000 --- a/exaudfclient/base/exaudf/BUILD +++ /dev/null @@ -1,40 +0,0 @@ - -package(default_visibility = ["//visibility:public"]) -exports_files(["filter_swig_code.py", "build_integrated.py", - "create_binary_wrapper.sh", "create_binary_wrapper_valgrind.sh", - "create_binary_wrapper_valgrind_massif.sh", "exaudfclient.template.sh"]) - -load("//:variables.bzl", "VM_ENABLED_DEFINES") - -cc_library( - name = "debug_message_h", - hdrs = [ - "debug_message.h" - ], -) - -cc_library( - name = "load_dynamic", - srcs = [ - "load_dynamic.cc" - ], - deps = ["//exaudf/exaudflib:header", "//exaudf:debug_message_h", "//exaudf/exaudflib:exaudflib-deps"], - defines = VM_ENABLED_DEFINES, -) - - -# Using cc_binary to build a shared library as output target is a workaround, because -# Bazel's cc_library are only intermediate stages and can be used as output target. -# It is necessary to include //exaudf/exaudflib:exaudflib into deps and srcs, because -# otherwise dlmopen won't find the symbols of exaudflib and its dependencies. The target //exaudf/exaudflib:exaudflib-deps -# won't work either, because it only contains the libraries as dependencies. -# Bazel builts a static library (.a) and a dynamic library (.so) out of exaudflib:exaudflib. -# In the libexaudflib_complete.so-2.params, we saw that Bazel uses both libraries to built libexaudflib_complete.so. -# Experiments have shown that we get missing symbols during loading libexaudflib_complete.so, if we only built the static library. -cc_binary( - name = "libexaudflib_complete.so", - linkshared = 1, - srcs = ["//exaudf/exaudflib:exaudflib"], - deps = ["//exaudf/exaudflib:exaudflib"], - defines = VM_ENABLED_DEFINES, -) diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc deleted file mode 100644 index 029484671..000000000 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_generial_iterator.h is self-contained -#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" - diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc deleted file mode 100644 index 72d758b66..000000000 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_meta_data.h is self-contained -#include "exaudf/exaudflib/impl/swig/swig_meta_data.h" - diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc deleted file mode 100644 index bed0a108a..000000000 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_result_handler.h is self-contained -#include "exaudf/exaudflib/impl/swig/swig_result_handler.h" - diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc b/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc deleted file mode 100644 index bd46ebd72..000000000 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.cc +++ /dev/null @@ -1,3 +0,0 @@ -//Check that swig_table_iterator.h is self-contained -#include "exaudf/exaudflib/impl/swig/swig_table_iterator.h" - diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc deleted file mode 100644 index 93e998742..000000000 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_common.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_common.h is self-contained -#include "exaudf/exaudflib/swig/swig_common.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc deleted file mode 100644 index f0abce90e..000000000 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_meta_data.h is self-contained -#include "exaudf/exaudflib/swig/swig_meta_data.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc deleted file mode 100644 index d51824faf..000000000 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_result_handler.h is self-contained -#include "exaudf/exaudflib/swig/swig_result_handler.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc b/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc deleted file mode 100644 index f4307d637..000000000 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.cc +++ /dev/null @@ -1,2 +0,0 @@ -//Check that swig_table_iterator.h is self-contained -#include "exaudf/exaudflib/swig/swig_table_iterator.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudfclient.template.sh b/exaudfclient/base/exaudfclient.template.sh similarity index 75% rename from exaudfclient/base/exaudf/exaudfclient.template.sh rename to exaudfclient/base/exaudfclient.template.sh index edd33c565..5e93af145 100644 --- a/exaudfclient/base/exaudf/exaudfclient.template.sh +++ b/exaudfclient/base/exaudfclient.template.sh @@ -3,5 +3,5 @@ SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" echo "Changing to script directory $SCRIPT_DIR" cd "$SCRIPT_DIR" || return 1 -export LIBEXAUDFLIB_PATH="$SCRIPT_DIR/libexaudflib_complete.so" +export LIBEXAUDFLIB_PATH="$SCRIPT_DIR/base/libexaudflib_complete.so" export LIBPYEXADATAFRAME_DIR="$SCRIPT_DIR/python/python3" diff --git a/exaudfclient/base/exaudf/exaudflib/BUILD b/exaudfclient/base/exaudflib/BUILD similarity index 96% rename from exaudfclient/base/exaudf/exaudflib/BUILD rename to exaudfclient/base/exaudflib/BUILD index 33929fd23..d82726c02 100644 --- a/exaudfclient/base/exaudf/exaudflib/BUILD +++ b/exaudfclient/base/exaudflib/BUILD @@ -82,8 +82,8 @@ cc_library( # The only target which must depend on it is //:libexaudflib-complete.so. # If you depend on this target you will load protobuf into your linker namespace # which might cause problems with tensorflow. If you need -# "//exaudf/exaudflib:scriptoptionlines","//exaudf/exaudflib:script_data_transfer_objects" or -# "//exaudf/exaudflib:script_data_transfer_objects_wrapper" in the language container +# "//base/exaudflib:scriptoptionlines","//base/exaudflib:script_data_transfer_objects" or +# "//base/exaudflib:script_data_transfer_objects_wrapper" in the language container # depend directly on them or depend on exaudflib-deps cc_library( name = "exaudflib", @@ -103,5 +103,5 @@ cc_library( "impl/swig/swig_general_iterator.h", "impl/swig/swig_general_iterator.cc"], defines = VM_ENABLED_DEFINES, linkstatic = False, # Needs to be false, because otherwise we might get missing symbols when loading exaudflib_complete.so - deps = [":exaudflib-deps", ":zmqcontainer", "@zmq//:zmq", ":header", "//exaudf:debug_message_h"], + deps = [":exaudflib-deps", ":zmqcontainer", "@zmq//:zmq", ":header", "//base:debug_message_h"], ) diff --git a/exaudfclient/base/exaudf/exaudflib/exascript.i b/exaudfclient/base/exaudflib/exascript.i similarity index 96% rename from exaudfclient/base/exaudf/exaudflib/exascript.i rename to exaudfclient/base/exaudflib/exascript.i index 38900d3b0..9838e88a5 100644 --- a/exaudfclient/base/exaudf/exaudflib/exascript.i +++ b/exaudfclient/base/exaudflib/exascript.i @@ -3,11 +3,11 @@ %} %{ -#include "exaudf/exaudflib/swig/swig_result_handler.h" -#include "exaudf/exaudflib/swig/swig_meta_data.h" +#include "base/exaudflib/swig/swig_result_handler.h" +#include "base/exaudflib/swig/swig_meta_data.h" using namespace SWIGVMContainers; -#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "base/exaudflib/swig/script_data_transfer_objects_wrapper.h" %} %ignore ExecutionGraph::ConnectionInformationWrapper::ConnectionInformationWrapper; diff --git a/exaudfclient/base/exaudf/exaudflib/impl/check.cc b/exaudfclient/base/exaudflib/impl/check.cc similarity index 95% rename from exaudfclient/base/exaudf/exaudflib/impl/check.cc rename to exaudfclient/base/exaudflib/impl/check.cc index 9b2821bf4..44ca9345b 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/check.cc +++ b/exaudfclient/base/exaudflib/impl/check.cc @@ -1,12 +1,12 @@ -#include "exaudf/exaudflib/impl/check.h" -#include "exaudf/exaudflib/impl/socket_info.h" +#include "base/exaudflib/impl/check.h" +#include "base/exaudflib/impl/socket_info.h" #include #include #include #include -#include "exaudf/debug_message.h" +#include "base/debug_message.h" namespace exaudflib { namespace check { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/check.h b/exaudfclient/base/exaudflib/impl/check.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/impl/check.h rename to exaudfclient/base/exaudflib/impl/check.h diff --git a/exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc b/exaudfclient/base/exaudflib/impl/exaudflib_main.cc similarity index 97% rename from exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc rename to exaudfclient/base/exaudflib/impl/exaudflib_main.cc index e04519d73..cd74f2405 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/exaudflib_main.cc +++ b/exaudfclient/base/exaudflib/impl/exaudflib_main.cc @@ -10,20 +10,20 @@ #include #include -#include "exaudf/debug_message.h" +#include "base/debug_message.h" // swig lib #include -#include "exaudf/exaudflib/impl/check.h" -#include "exaudf/exaudflib/impl/socket_info.h" -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/impl/msg_conversion.h" -#include "exaudf/exaudflib/impl/global.h" -#include "exaudf/exaudflib/impl/socket_high_level.h" +#include "base/exaudflib/impl/check.h" +#include "base/exaudflib/impl/socket_info.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/impl/global.h" +#include "base/exaudflib/impl/socket_high_level.h" -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/vm/swig_vm.h" #ifndef NDEBUG diff --git a/exaudfclient/base/exaudf/exaudflib/impl/global.cc b/exaudfclient/base/exaudflib/impl/global.cc similarity index 98% rename from exaudfclient/base/exaudf/exaudflib/impl/global.cc rename to exaudfclient/base/exaudflib/impl/global.cc index cbff32d47..d29100bef 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/global.cc +++ b/exaudfclient/base/exaudflib/impl/global.cc @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/impl/global.h" +#include "base/exaudflib/impl/global.h" #include namespace exaudflib { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/global.h b/exaudfclient/base/exaudflib/impl/global.h similarity index 83% rename from exaudfclient/base/exaudf/exaudflib/impl/global.h rename to exaudfclient/base/exaudflib/impl/global.h index d7daae5ed..09402eb1b 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/global.h +++ b/exaudfclient/base/exaudflib/impl/global.h @@ -1,9 +1,9 @@ #ifndef EXAUDFCLIENT_EXUDFLIB_GLOBAL_H #define EXAUDFCLIENT_EXUDFLIB_GLOBAL_H -#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" -#include "exaudf/exaudflib/zmqcontainer.pb.h" -#include "exaudf/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/script_data_transfer_objects.h" +#include "base/exaudflib/zmqcontainer.pb.h" +#include "base/exaudflib/swig/swig_common.h" #include namespace exaudflib { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc b/exaudfclient/base/exaudflib/impl/msg_conversion.cc similarity index 97% rename from exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc rename to exaudfclient/base/exaudflib/impl/msg_conversion.cc index e71bd9ccb..654ac0f50 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.cc +++ b/exaudfclient/base/exaudflib/impl/msg_conversion.cc @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/impl/msg_conversion.h" std::string exaudflib::msg_conversion::convert_message_type_to_string(int message_type){ switch (message_type) diff --git a/exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.h b/exaudfclient/base/exaudflib/impl/msg_conversion.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/impl/msg_conversion.h rename to exaudfclient/base/exaudflib/impl/msg_conversion.h diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc b/exaudfclient/base/exaudflib/impl/socket_high_level.cc similarity index 98% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc rename to exaudfclient/base/exaudflib/impl/socket_high_level.cc index a8612c915..64721cef2 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.cc +++ b/exaudfclient/base/exaudflib/impl/socket_high_level.cc @@ -1,13 +1,13 @@ -#include "exaudf/exaudflib/impl/socket_high_level.h" +#include "base/exaudflib/impl/socket_high_level.h" -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/zmqcontainer.pb.h" -#include "exaudf/exaudflib/impl/msg_conversion.h" -#include "exaudf/exaudflib/impl/global.h" -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/zmqcontainer.pb.h" +#include "base/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/impl/global.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/vm/swig_vm.h" #include -#include "exaudf/debug_message.h" +#include "base/debug_message.h" namespace exaudflib { namespace socket_high_level { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.h b/exaudfclient/base/exaudflib/impl/socket_high_level.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_high_level.h rename to exaudfclient/base/exaudflib/impl/socket_high_level.h diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc b/exaudfclient/base/exaudflib/impl/socket_info.cc similarity index 92% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc rename to exaudfclient/base/exaudflib/impl/socket_info.cc index c515c1435..1c94ff637 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/socket_info.cc +++ b/exaudfclient/base/exaudflib/impl/socket_info.cc @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/impl/socket_info.h" +#include "base/exaudflib/impl/socket_info.h" namespace exaudflib { diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_info.h b/exaudfclient/base/exaudflib/impl/socket_info.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_info.h rename to exaudfclient/base/exaudflib/impl/socket_info.h diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc b/exaudfclient/base/exaudflib/impl/socket_low_level.cc similarity index 96% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc rename to exaudfclient/base/exaudflib/impl/socket_low_level.cc index 02b860f6c..5bd14a30a 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.cc +++ b/exaudfclient/base/exaudflib/impl/socket_low_level.cc @@ -1,6 +1,6 @@ -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/impl/check.h" -#include "exaudf/debug_message.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/impl/check.h" +#include "base/debug_message.h" #include #include #include diff --git a/exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.h b/exaudfclient/base/exaudflib/impl/socket_low_level.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/impl/socket_low_level.h rename to exaudfclient/base/exaudflib/impl/socket_low_level.h diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc b/exaudfclient/base/exaudflib/impl/swig/swig_factory.cc similarity index 73% rename from exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc rename to exaudfclient/base/exaudflib/impl/swig/swig_factory.cc index e01302854..67f6d3744 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_factory.cc +++ b/exaudfclient/base/exaudflib/impl/swig/swig_factory.cc @@ -1,6 +1,6 @@ -#include "exaudf/exaudflib/impl/swig/swig_meta_data.h" -#include "exaudf/exaudflib/impl/swig/swig_table_iterator.h" -#include "exaudf/exaudflib/impl/swig/swig_result_handler.h" +#include "base/exaudflib/impl/swig/swig_meta_data.h" +#include "base/exaudflib/impl/swig/swig_table_iterator.h" +#include "base/exaudflib/impl/swig/swig_result_handler.h" extern "C" { diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc b/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc new file mode 100644 index 000000000..d5e51689e --- /dev/null +++ b/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.cc @@ -0,0 +1,3 @@ +//Check that swig_generial_iterator.h is self-contained +#include "base/exaudflib/impl/swig/swig_general_iterator.h" + diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h b/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h similarity index 88% rename from exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h rename to exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h index bc80cc898..7521955f9 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_general_iterator.h +++ b/exaudfclient/base/exaudflib/impl/swig/swig_general_iterator.h @@ -1,8 +1,8 @@ #ifndef EXAUDFCLIENT_SWIGGENERALITERATOR_H #define EXAUDFCLIENT_SWIGGENERALITERATOR_H -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/impl/global.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/impl/global.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc b/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc new file mode 100644 index 000000000..016dbca7e --- /dev/null +++ b/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.cc @@ -0,0 +1,3 @@ +//Check that swig_meta_data.h is self-contained +#include "base/exaudflib/impl/swig/swig_meta_data.h" + diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h b/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h similarity index 97% rename from exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h rename to exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h index 50c468995..bebb5612f 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_meta_data.h +++ b/exaudfclient/base/exaudflib/impl/swig/swig_meta_data.h @@ -1,12 +1,12 @@ #ifndef EXAUDFCLIENT_SWIGMETADATA_H #define EXAUDFCLIENT_SWIGMETADATA_H -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/swig/swig_meta_data.h" -#include "exaudf/exaudflib/zmqcontainer.pb.h" -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/impl/msg_conversion.h" -#include "exaudf/exaudflib/impl/global.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/swig_meta_data.h" +#include "base/exaudflib/zmqcontainer.pb.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/impl/global.h" #include #include #include diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc b/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc new file mode 100644 index 000000000..8a16c0221 --- /dev/null +++ b/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.cc @@ -0,0 +1,3 @@ +//Check that swig_result_handler.h is self-contained +#include "base/exaudflib/impl/swig/swig_result_handler.h" + diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h b/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h similarity index 97% rename from exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h rename to exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h index 48e1dde02..9fd2c2c85 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_result_handler.h +++ b/exaudfclient/base/exaudflib/impl/swig/swig_result_handler.h @@ -1,13 +1,13 @@ #ifndef EXAUDFCLIENT_SWIGRESULTHANDLER_H #define EXAUDFCLIENT_SWIGRESULTHANDLER_H -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/swig/swig_result_handler.h" -#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" -#include "exaudf/exaudflib/impl/global.h" -#include "exaudf/exaudflib/impl/msg_conversion.h" -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/zmqcontainer.pb.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/swig_result_handler.h" +#include "base/exaudflib/impl/swig/swig_general_iterator.h" +#include "base/exaudflib/impl/global.h" +#include "base/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/zmqcontainer.pb.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc b/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc new file mode 100644 index 000000000..d45ee4711 --- /dev/null +++ b/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.cc @@ -0,0 +1,3 @@ +//Check that swig_table_iterator.h is self-contained +#include "base/exaudflib/impl/swig/swig_table_iterator.h" + diff --git a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h b/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h similarity index 98% rename from exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h rename to exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h index fb9a49f29..3ebddecc9 100644 --- a/exaudfclient/base/exaudf/exaudflib/impl/swig/swig_table_iterator.h +++ b/exaudfclient/base/exaudflib/impl/swig/swig_table_iterator.h @@ -1,12 +1,12 @@ #ifndef EXAUDFCLIENT_SWIGTABLEITERATOR_H #define EXAUDFCLIENT_SWIGTABLEITERATOR_H -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/swig/swig_table_iterator.h" -#include "exaudf/exaudflib/impl/swig/swig_general_iterator.h" -#include "exaudf/exaudflib/impl/global.h" -#include "exaudf/exaudflib/impl/socket_low_level.h" -#include "exaudf/exaudflib/impl/msg_conversion.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/swig_table_iterator.h" +#include "base/exaudflib/impl/swig/swig_general_iterator.h" +#include "base/exaudflib/impl/global.h" +#include "base/exaudflib/impl/socket_low_level.h" +#include "base/exaudflib/impl/msg_conversion.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/load_dynamic.h b/exaudfclient/base/exaudflib/load_dynamic.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/load_dynamic.h rename to exaudfclient/base/exaudflib/load_dynamic.h diff --git a/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.cc b/exaudfclient/base/exaudflib/swig/script_data_transfer_objects.cc similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.cc rename to exaudfclient/base/exaudflib/swig/script_data_transfer_objects.cc diff --git a/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.h b/exaudfclient/base/exaudflib/swig/script_data_transfer_objects.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects.h rename to exaudfclient/base/exaudflib/swig/script_data_transfer_objects.h diff --git a/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.cc b/exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.cc similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.cc rename to exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.cc diff --git a/exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h b/exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h rename to exaudfclient/base/exaudflib/swig/script_data_transfer_objects_wrapper.h diff --git a/exaudfclient/base/exaudflib/swig/swig_common.cc b/exaudfclient/base/exaudflib/swig/swig_common.cc new file mode 100644 index 000000000..c65009b8f --- /dev/null +++ b/exaudfclient/base/exaudflib/swig/swig_common.cc @@ -0,0 +1,2 @@ +//Check that swig_common.h is self-contained +#include "base/exaudflib/swig/swig_common.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_common.h b/exaudfclient/base/exaudflib/swig/swig_common.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/swig/swig_common.h rename to exaudfclient/base/exaudflib/swig/swig_common.h diff --git a/exaudfclient/base/exaudflib/swig/swig_meta_data.cc b/exaudfclient/base/exaudflib/swig/swig_meta_data.cc new file mode 100644 index 000000000..a85ea9ff9 --- /dev/null +++ b/exaudfclient/base/exaudflib/swig/swig_meta_data.cc @@ -0,0 +1,2 @@ +//Check that swig_meta_data.h is self-contained +#include "base/exaudflib/swig/swig_meta_data.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h b/exaudfclient/base/exaudflib/swig/swig_meta_data.h similarity index 96% rename from exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h rename to exaudfclient/base/exaudflib/swig/swig_meta_data.h index 00b639207..cad380dc2 100644 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_meta_data.h +++ b/exaudfclient/base/exaudflib/swig/swig_meta_data.h @@ -1,9 +1,9 @@ #ifndef SWIG_META_DATA_H #define SWIG_META_DATA_H -#include "exaudf/exaudflib/load_dynamic.h" -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "base/exaudflib/load_dynamic.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/script_data_transfer_objects_wrapper.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudflib/swig/swig_result_handler.cc b/exaudfclient/base/exaudflib/swig/swig_result_handler.cc new file mode 100644 index 000000000..952b32557 --- /dev/null +++ b/exaudfclient/base/exaudflib/swig/swig_result_handler.cc @@ -0,0 +1,2 @@ +//Check that swig_result_handler.h is self-contained +#include "base/exaudflib/swig/swig_result_handler.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h b/exaudfclient/base/exaudflib/swig/swig_result_handler.h similarity index 96% rename from exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h rename to exaudfclient/base/exaudflib/swig/swig_result_handler.h index 943068ea4..7140a59a6 100644 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_result_handler.h +++ b/exaudfclient/base/exaudflib/swig/swig_result_handler.h @@ -4,8 +4,8 @@ #include #include #include -#include "exaudf/exaudflib/load_dynamic.h" -#include "exaudf/exaudflib/swig/swig_table_iterator.h" +#include "base/exaudflib/load_dynamic.h" +#include "base/exaudflib/swig/swig_table_iterator.h" #define SWIG_MAX_VAR_DATASIZE 4000000 diff --git a/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc b/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc new file mode 100644 index 000000000..9bb159ca7 --- /dev/null +++ b/exaudfclient/base/exaudflib/swig/swig_table_iterator.cc @@ -0,0 +1,2 @@ +//Check that swig_table_iterator.h is self-contained +#include "base/exaudflib/swig/swig_table_iterator.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h b/exaudfclient/base/exaudflib/swig/swig_table_iterator.h similarity index 98% rename from exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h rename to exaudfclient/base/exaudflib/swig/swig_table_iterator.h index 70557d296..95a31cbac 100644 --- a/exaudfclient/base/exaudf/exaudflib/swig/swig_table_iterator.h +++ b/exaudfclient/base/exaudflib/swig/swig_table_iterator.h @@ -4,7 +4,7 @@ #include #include #include -#include "exaudf/exaudflib/load_dynamic.h" +#include "base/exaudflib/load_dynamic.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/test/BUILD b/exaudfclient/base/exaudflib/test/BUILD similarity index 62% rename from exaudfclient/base/exaudf/exaudflib/test/BUILD rename to exaudfclient/base/exaudflib/test/BUILD index cc0a46125..231096441 100644 --- a/exaudfclient/base/exaudf/exaudflib/test/BUILD +++ b/exaudfclient/base/exaudflib/test/BUILD @@ -2,8 +2,8 @@ cc_test( name = "exaudflib-test", srcs = ["script_data_transfer_objects_test.cpp", "script_option_lines_test.cpp"], deps = [ - "//exaudf/exaudflib:script_data_transfer_objects", - "//exaudf/exaudflib:scriptoptionlines", + "//base/exaudflib:script_data_transfer_objects", + "//base/exaudflib:scriptoptionlines", "@googletest//:gtest_main", ], ) \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp b/exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp similarity index 99% rename from exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp rename to exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp index 9866df4f1..8ef9b96a4 100644 --- a/exaudfclient/base/exaudf/exaudflib/test/script_data_transfer_objects_test.cpp +++ b/exaudfclient/base/exaudflib/test/script_data_transfer_objects_test.cpp @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" +#include "base/exaudflib/swig/script_data_transfer_objects.h" #include using namespace ExecutionGraph; diff --git a/exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp b/exaudfclient/base/exaudflib/test/script_option_lines_test.cpp similarity index 99% rename from exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp rename to exaudfclient/base/exaudflib/test/script_option_lines_test.cpp index 9b617d00b..5866169a7 100644 --- a/exaudfclient/base/exaudf/exaudflib/test/script_option_lines_test.cpp +++ b/exaudfclient/base/exaudflib/test/script_option_lines_test.cpp @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/vm/scriptoptionlines.h" +#include "base/exaudflib/vm/scriptoptionlines.h" #include #include #include diff --git a/exaudfclient/base/exaudf/exaudflib/udf_plugin_interface.h b/exaudfclient/base/exaudflib/udf_plugin_interface.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/udf_plugin_interface.h rename to exaudfclient/base/exaudflib/udf_plugin_interface.h diff --git a/exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.cc b/exaudfclient/base/exaudflib/vm/scriptoptionlines.cc similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.cc rename to exaudfclient/base/exaudflib/vm/scriptoptionlines.cc diff --git a/exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.h b/exaudfclient/base/exaudflib/vm/scriptoptionlines.h similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/vm/scriptoptionlines.h rename to exaudfclient/base/exaudflib/vm/scriptoptionlines.h diff --git a/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc b/exaudfclient/base/exaudflib/vm/swig_vm.cc similarity index 50% rename from exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc rename to exaudfclient/base/exaudflib/vm/swig_vm.cc index cd1a8a5e4..c21533ee6 100644 --- a/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.cc +++ b/exaudfclient/base/exaudflib/vm/swig_vm.cc @@ -1,2 +1,2 @@ //Check that swig_vm.h is self-contained -#include "exaudf/exaudflib/vm/swig_vm.h" \ No newline at end of file +#include "base/exaudflib/vm/swig_vm.h" \ No newline at end of file diff --git a/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h b/exaudfclient/base/exaudflib/vm/swig_vm.h similarity index 92% rename from exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h rename to exaudfclient/base/exaudflib/vm/swig_vm.h index d048ac594..fcac97312 100644 --- a/exaudfclient/base/exaudf/exaudflib/vm/swig_vm.h +++ b/exaudfclient/base/exaudflib/vm/swig_vm.h @@ -5,8 +5,8 @@ #include #include #include -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/exaudflib/swig/script_data_transfer_objects_wrapper.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/script_data_transfer_objects_wrapper.h" namespace SWIGVMContainers { diff --git a/exaudfclient/base/exaudf/exaudflib/zmqcontainer.proto b/exaudfclient/base/exaudflib/zmqcontainer.proto similarity index 100% rename from exaudfclient/base/exaudf/exaudflib/zmqcontainer.proto rename to exaudfclient/base/exaudflib/zmqcontainer.proto diff --git a/exaudfclient/base/exaudf/filter_swig_code.py b/exaudfclient/base/filter_swig_code.py similarity index 100% rename from exaudfclient/base/exaudf/filter_swig_code.py rename to exaudfclient/base/filter_swig_code.py diff --git a/exaudfclient/base/exaudf/java_repository.bzl b/exaudfclient/base/java_repository.bzl similarity index 100% rename from exaudfclient/base/exaudf/java_repository.bzl rename to exaudfclient/base/java_repository.bzl diff --git a/exaudfclient/base/exaudf/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD similarity index 90% rename from exaudfclient/base/exaudf/javacontainer/BUILD rename to exaudfclient/base/javacontainer/BUILD index 403c06c6e..45a236c52 100644 --- a/exaudfclient/base/exaudf/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -5,7 +5,7 @@ genrule( cmd = """ mkdir -p java_src/com/exasol/swig mkdir -p build_exascript_java_tmp_cc/exaudflib - cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_java_tmp_cc/exaudflib + cp "$(location //base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //base/exaudflib:exascript.i)" build_exascript_java_tmp_cc/exaudflib cd build_exascript_java_tmp_cc swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../java_src/com/exasol/swig" -o "../exascript_java_tmp.cc" exaudflib/exascript.i cd .. @@ -37,29 +37,29 @@ genrule( "orig/com/exasol/swig/TableIterator.java", "exascript_java_tmp.cc" ], - srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h"] + srcs = ["//base/exaudflib:exascript.i","//base/exaudflib:swig/script_data_transfer_objects_wrapper.h"] ) genrule( name = "exascript_java_tmp_h", cmd = """ mkdir build_exascript_java_tmp_h - cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_java_tmp_h + cp "$(location //base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //base/exaudflib:exascript.i)" build_exascript_java_tmp_h cp -r "$(location exascript_java_tmp.cc)" build_exascript_java_tmp_h cd build_exascript_java_tmp_h swig -v -DEXTERNAL_PROCESS -c++ -java -external-runtime "../$(location exascript_java_tmp.h)" """, outs = ["exascript_java_tmp.h"], - srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc"] + srcs = ["//base/exaudflib:exascript.i","//base/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_java_tmp.cc"] ) genrule( name = "filter_swig_code_exascript_java_h", - cmd = 'python3 $(location //exaudf:filter_swig_code.py) "$@" "$<"', + cmd = 'python3 $(location //base:filter_swig_code.py) "$@" "$<"', outs = ["exascript_java.h"], srcs = [":exascript_java_tmp_h"], - tools = ["//exaudf:filter_swig_code.py"] + tools = ["//base:filter_swig_code.py"] ) genrule( @@ -71,7 +71,7 @@ genrule( cp $(location :orig/com/exasol/swig/ResultHandler.java) "$$TMPDIR"/java_src/com/exasol/swig/ cp $(location :orig/com/exasol/swig/exascript_javaJNI.java) "$$TMPDIR"/java_src/com/exasol/swig/ find "$$TMPDIR"/java_src/com/exasol/swig/ -name *.java -type f -exec chmod 644 {} \\; - cp -r -L $(location //exaudf:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" + cp -r -L $(location //base:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" (cd "$$TMPDIR" python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") cp "$$TMPDIR"/exascript_java.cc $(location :exascript_java.cc) @@ -88,7 +88,7 @@ genrule( ], srcs = [":exascript_java_tmp.cc", ":orig/com/exasol/swig/TableIterator.java", ":orig/com/exasol/swig/ResultHandler.java", ":orig/com/exasol/swig/exascript_javaJNI.java"], - tools = ["//exaudf:filter_swig_code.py"] + tools = ["//base:filter_swig_code.py"] ) @@ -141,7 +141,7 @@ genrule( cc_library( name = "exascript_java", srcs = [":exascript_java.cc",], - deps = ["@java//:java","//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"], + deps = ["@java//:java","//base/exaudflib:exaudflib-deps","//base/exaudflib:header"], copts= ["-O0","-fno-lto"], # We limit this target to -O0 (no optimization) and -fno-lto. because otherwise we get compiler warnings of the sort # note: "code may be misoptimized unless -fno-strict-aliasing is used." @@ -155,7 +155,7 @@ cc_library( name = "javacontainer", srcs = [":javacontainer.cc", ":javacontainer.h", ":javacontainer_impl.cc", ":javacontainer_impl.h", ":dummy"], hdrs = [":filter_swig_code_exascript_java_h", "exascript_java_jni_decl.h"], - deps = ["@ssl//:ssl","@java//:java", ":exascript_java", "//exaudf/exaudflib:header", "//exaudf:debug_message_h","//exaudf/exaudflib:scriptoptionlines"], + deps = ["@ssl//:ssl","@java//:java", ":exascript_java", "//base/exaudflib:header", "//base:debug_message_h","//base/exaudflib:scriptoptionlines"], # copts= ["-O0","-fno-lto"], alwayslink=True, ) diff --git a/exaudfclient/base/exaudf/javacontainer/ExaCompiler.java b/exaudfclient/base/javacontainer/ExaCompiler.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaCompiler.java rename to exaudfclient/base/javacontainer/ExaCompiler.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaConnectionInformationImpl.java b/exaudfclient/base/javacontainer/ExaConnectionInformationImpl.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaConnectionInformationImpl.java rename to exaudfclient/base/javacontainer/ExaConnectionInformationImpl.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaExportSpecificationImpl.java b/exaudfclient/base/javacontainer/ExaExportSpecificationImpl.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaExportSpecificationImpl.java rename to exaudfclient/base/javacontainer/ExaExportSpecificationImpl.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaImportSpecificationImpl.java b/exaudfclient/base/javacontainer/ExaImportSpecificationImpl.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaImportSpecificationImpl.java rename to exaudfclient/base/javacontainer/ExaImportSpecificationImpl.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaIteratorImpl.java b/exaudfclient/base/javacontainer/ExaIteratorImpl.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaIteratorImpl.java rename to exaudfclient/base/javacontainer/ExaIteratorImpl.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaMetadataImpl.java b/exaudfclient/base/javacontainer/ExaMetadataImpl.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaMetadataImpl.java rename to exaudfclient/base/javacontainer/ExaMetadataImpl.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaStackTraceCleaner.java b/exaudfclient/base/javacontainer/ExaStackTraceCleaner.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaStackTraceCleaner.java rename to exaudfclient/base/javacontainer/ExaStackTraceCleaner.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaUndefinedSingleCallException.java b/exaudfclient/base/javacontainer/ExaUndefinedSingleCallException.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaUndefinedSingleCallException.java rename to exaudfclient/base/javacontainer/ExaUndefinedSingleCallException.java diff --git a/exaudfclient/base/exaudf/javacontainer/ExaWrapper.java b/exaudfclient/base/javacontainer/ExaWrapper.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/ExaWrapper.java rename to exaudfclient/base/javacontainer/ExaWrapper.java diff --git a/exaudfclient/base/exaudf/javacontainer/exascript_java_jni_decl.h b/exaudfclient/base/javacontainer/exascript_java_jni_decl.h similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/exascript_java_jni_decl.h rename to exaudfclient/base/javacontainer/exascript_java_jni_decl.h diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer.cc b/exaudfclient/base/javacontainer/javacontainer.cc similarity index 94% rename from exaudfclient/base/exaudf/javacontainer/javacontainer.cc rename to exaudfclient/base/javacontainer/javacontainer.cc index 578ac83d0..bb40b5722 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer.cc +++ b/exaudfclient/base/javacontainer/javacontainer.cc @@ -1,5 +1,5 @@ -#include "exaudf/javacontainer/javacontainer.h" -#include "exaudf/javacontainer/javacontainer_impl.h" +#include "base/javacontainer/javacontainer.h" +#include "base/javacontainer/javacontainer_impl.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer.h b/exaudfclient/base/javacontainer/javacontainer.h similarity index 93% rename from exaudfclient/base/exaudf/javacontainer/javacontainer.h rename to exaudfclient/base/javacontainer/javacontainer.h index b07cd34f8..f97c860e5 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer.h +++ b/exaudfclient/base/javacontainer/javacontainer.h @@ -2,7 +2,7 @@ #define JAVACONTAINER_H -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/vm/swig_vm.h" #include #ifdef ENABLE_JAVA_VM diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc b/exaudfclient/base/javacontainer/javacontainer_impl.cc similarity index 99% rename from exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc rename to exaudfclient/base/javacontainer/javacontainer_impl.cc index c3e0d25f4..54a04664c 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.cc +++ b/exaudfclient/base/javacontainer/javacontainer_impl.cc @@ -7,13 +7,13 @@ #include #include -#include "exaudf/exaudflib/swig/swig_meta_data.h" +#include "base/exaudflib/swig/swig_meta_data.h" #include "exascript_java_jni_decl.h" -#include "exaudf/debug_message.h" -#include "exaudf/javacontainer/javacontainer.h" -#include "exaudf/javacontainer/javacontainer_impl.h" -#include "exaudf/exaudflib/vm/scriptoptionlines.h" +#include "base/debug_message.h" +#include "base/javacontainer/javacontainer.h" +#include "base/javacontainer/javacontainer_impl.h" +#include "base/exaudflib/vm/scriptoptionlines.h" using namespace SWIGVMContainers; using namespace std; diff --git a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h b/exaudfclient/base/javacontainer/javacontainer_impl.h similarity index 98% rename from exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h rename to exaudfclient/base/javacontainer/javacontainer_impl.h index 79d579b1d..79f67318f 100644 --- a/exaudfclient/base/exaudf/javacontainer/javacontainer_impl.h +++ b/exaudfclient/base/javacontainer/javacontainer_impl.h @@ -5,7 +5,7 @@ #include #include -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/vm/swig_vm.h" #include #ifdef ENABLE_JAVA_VM diff --git a/exaudfclient/base/exaudf/javacontainer/test/BUILD b/exaudfclient/base/javacontainer/test/BUILD similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/test/BUILD rename to exaudfclient/base/javacontainer/test/BUILD diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc b/exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc similarity index 87% rename from exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc rename to exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc index 6b223afcb..7222716bc 100644 --- a/exaudfclient/base/exaudf/javacontainer/test/cpp/exaudf_wrapper.cc +++ b/exaudfclient/base/javacontainer/test/cpp/exaudf_wrapper.cc @@ -1,4 +1,4 @@ -#include "exaudf/exaudflib/swig/swig_common.h" +#include "base/exaudflib/swig/swig_common.h" //Dummy implementation to calm down the linker void* load_dynamic(const char* name) { diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc similarity index 99% rename from exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc rename to exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc index 0f54c085f..01c443e28 100644 --- a/exaudfclient/base/exaudf/javacontainer/test/cpp/javacontainer_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc @@ -1,7 +1,7 @@ #include "include/gtest/gtest.h" #include "gmock/gmock.h" -#include "exaudf/javacontainer/test/cpp/javavm_test.h" +#include "base/javacontainer/test/cpp/javavm_test.h" #include TEST(JavaContainer, basic_jar) { diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc b/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc similarity index 89% rename from exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc rename to exaudfclient/base/javacontainer/test/cpp/javavm_test.cc index aa2210222..f4c0310c4 100644 --- a/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc @@ -1,5 +1,5 @@ -#include "exaudf/javacontainer/test/cpp/javavm_test.h" -#include "exaudf/javacontainer/javacontainer_impl.h" +#include "base/javacontainer/test/cpp/javavm_test.h" +#include "base/javacontainer/javacontainer_impl.h" #include diff --git a/exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.h b/exaudfclient/base/javacontainer/test/cpp/javavm_test.h similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/test/cpp/javavm_test.h rename to exaudfclient/base/javacontainer/test/cpp/javavm_test.h diff --git a/exaudfclient/base/exaudf/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java b/exaudfclient/base/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java rename to exaudfclient/base/javacontainer/test/java/com/exasol/ExaStackTraceCleanerTest.java diff --git a/exaudfclient/base/exaudf/javacontainer/test/test.jar b/exaudfclient/base/javacontainer/test/test.jar similarity index 100% rename from exaudfclient/base/exaudf/javacontainer/test/test.jar rename to exaudfclient/base/javacontainer/test/test.jar diff --git a/exaudfclient/base/exaudf/load_dynamic.cc b/exaudfclient/base/load_dynamic.cc similarity index 93% rename from exaudfclient/base/exaudf/load_dynamic.cc rename to exaudfclient/base/load_dynamic.cc index d3e5d1442..4b6949d27 100644 --- a/exaudfclient/base/exaudf/load_dynamic.cc +++ b/exaudfclient/base/load_dynamic.cc @@ -3,7 +3,7 @@ #endif #include -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/vm/swig_vm.h" void* handle; diff --git a/exaudfclient/base/exaudf/protobuf_repository.bzl b/exaudfclient/base/protobuf_repository.bzl similarity index 100% rename from exaudfclient/base/exaudf/protobuf_repository.bzl rename to exaudfclient/base/protobuf_repository.bzl diff --git a/exaudfclient/base/exaudf/python/BUILD b/exaudfclient/base/python/BUILD similarity index 100% rename from exaudfclient/base/exaudf/python/BUILD rename to exaudfclient/base/python/BUILD diff --git a/exaudfclient/base/exaudf/python/exascript_python_preset_core.py b/exaudfclient/base/python/exascript_python_preset_core.py similarity index 100% rename from exaudfclient/base/exaudf/python/exascript_python_preset_core.py rename to exaudfclient/base/python/exascript_python_preset_core.py diff --git a/exaudfclient/base/exaudf/python/exascript_python_wrap.py b/exaudfclient/base/python/exascript_python_wrap.py similarity index 99% rename from exaudfclient/base/exaudf/python/exascript_python_wrap.py rename to exaudfclient/base/python/exascript_python_wrap.py index f2d6b2da1..00ce02a8d 100644 --- a/exaudfclient/base/exaudf/python/exascript_python_wrap.py +++ b/exaudfclient/base/python/exascript_python_wrap.py @@ -12,7 +12,7 @@ #print("sys.path append",path_to_pyexadataframe) sys.path.append(path_to_pyexadataframe) else: - path_to_pyexadataframe="/exaudf/python/python3" + path_to_pyexadataframe="/exaudf/base/python/python3" #print("sys.path append",path_to_pyexadataframe) sys.path.append(path_to_pyexadataframe) diff --git a/exaudfclient/base/exaudf/python/extend_exascript_python_preset_py.sh b/exaudfclient/base/python/extend_exascript_python_preset_py.sh similarity index 100% rename from exaudfclient/base/exaudf/python/extend_exascript_python_preset_py.sh rename to exaudfclient/base/python/extend_exascript_python_preset_py.sh diff --git a/exaudfclient/base/exaudf/python/python3/BUILD b/exaudfclient/base/python/python3/BUILD similarity index 59% rename from exaudfclient/base/exaudf/python/python3/BUILD rename to exaudfclient/base/python/python3/BUILD index 93ece8f5a..422693eb2 100644 --- a/exaudfclient/base/exaudf/python/python3/BUILD +++ b/exaudfclient/base/python/python3/BUILD @@ -5,12 +5,12 @@ genrule( cmd = """ INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes` mkdir -p build_exascript_python_tmp_cc/exaudflib - cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_python_tmp_cc/exaudflib + cp "$(location //base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //base/exaudflib:exascript.i)" build_exascript_python_tmp_cc/exaudflib cd build_exascript_python_tmp_cc swig -v $$INCLUDES -O -DEXTERNAL_PROCESS -Wall -c++ -python -py3 -addextern -module exascript_python -o "../$(location exascript_python_tmp.cc)" exaudflib/exascript.i """, outs = ["exascript_python_tmp.cc", "exascript_python.py"], - srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h"] + srcs = ["//base/exaudflib:exascript.i","//base/exaudflib:swig/script_data_transfer_objects_wrapper.h"] ) genrule( @@ -18,32 +18,32 @@ genrule( cmd = """ INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes` mkdir build_exascript_python_tmp_h - cp "$(location //exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudf/exaudflib:exascript.i)" build_exascript_python_tmp_h + cp "$(location //base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //base/exaudflib:exascript.i)" build_exascript_python_tmp_h cp "$(location exascript_python_tmp.cc)" "$(location exascript_python.py)" build_exascript_python_tmp_h cd build_exascript_python_tmp_h swig -v $$INCLUDES -DEXTERNAL_PROCESS -c++ -python -py3 -external-runtime "../$(location exascript_python_tmp.h)" """, outs = ["exascript_python_tmp.h"], - srcs = ["//exaudf/exaudflib:exascript.i","//exaudf/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_python_tmp.cc", "exascript_python.py"] + srcs = ["//base/exaudflib:exascript.i","//base/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_python_tmp.cc", "exascript_python.py"] ) genrule( name = "extend_exascript_python_preset_py", - cmd = 'bash $(location //exaudf/python:extend_exascript_python_preset_py.sh) "$(location //exaudf/python:exascript_python_preset_core.py)" "$(location exascript_python_preset.py)" "$$PYTHON3_PREFIX" "$$PYTHON3_VERSION" ""', + cmd = 'bash $(location //base/python:extend_exascript_python_preset_py.sh) "$(location //base/python:exascript_python_preset_core.py)" "$(location exascript_python_preset.py)" "$$PYTHON3_PREFIX" "$$PYTHON3_VERSION" ""', outs = ["exascript_python_preset.py"], - srcs = ["//exaudf/python:exascript_python_preset_core.py"], - tools = ["//exaudf/python:extend_exascript_python_preset_py.sh"] + srcs = ["//base/python:exascript_python_preset_core.py"], + tools = ["//base/python:extend_exascript_python_preset_py.sh"] ) genrule( name = "exascript_python_int", cmd = """ cp $(SRCS) . - python3 $(location //exaudf:build_integrated.py) "$(location exascript_python_int.h)" "exascript_python.py" "exascript_python_wrap.py" "exascript_python_preset.py" + python3 $(location //base:build_integrated.py) "$(location exascript_python_int.h)" "exascript_python.py" "exascript_python_wrap.py" "exascript_python_preset.py" """, outs = ["exascript_python_int.h"], - srcs = [":exascript_python_tmp_cc", "//exaudf/python:exascript_python_wrap.py", ":extend_exascript_python_preset_py"], - tools = ["//exaudf:build_integrated.py"] + srcs = [":exascript_python_tmp_cc", "//base/python:exascript_python_wrap.py", ":extend_exascript_python_preset_py"], + tools = ["//base:build_integrated.py"] ) genrule( @@ -51,14 +51,14 @@ genrule( cmd = """ ACTUAL_PYTHON_VERSION=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'` if [[ $$ACTUAL_PYTHON_VERSION == 2* ]] ; then - python3 $(location //exaudf:filter_swig_code.py) "$@" "$<" + python3 $(location //base:filter_swig_code.py) "$@" "$<" else cp "$<" "$@" fi """, outs = ["exascript_python.h"], srcs = [":exascript_python_tmp_h"], - tools = ["//exaudf:filter_swig_code.py"] + tools = ["//base:filter_swig_code.py"] ) genrule( @@ -67,32 +67,32 @@ genrule( ACTUAL_PYTHON_VERSION=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'` cp $(locations exascript_python_tmp_cc) . if [[ $$ACTUAL_PYTHON_VERSION == 2* ]] ; then - python $(location //exaudf:filter_swig_code.py) "$@" exascript_python_tmp.cc + python $(location //base:filter_swig_code.py) "$@" exascript_python_tmp.cc else cp exascript_python_tmp.cc "$@" fi """, outs = ["exascript_python.cc"], srcs = [":exascript_python_tmp_cc"], - tools = ["//exaudf:filter_swig_code.py"] + tools = ["//base:filter_swig_code.py"] ) cc_library( name = "exascript_python", srcs = [":filter_swig_code_exascript_python_cc",":filter_swig_code_exascript_python_h"], hdrs = [":filter_swig_code_exascript_python_h"], - deps = ["@python3//:python3","//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"], + deps = ["@python3//:python3","//base/exaudflib:exaudflib-deps","//base/exaudflib:header"], alwayslink=True, ) cc_library( name = "pythoncontainer", - srcs = ["//exaudf/python:pythoncontainer.cc", ":dummy.h"], + srcs = ["//base/python:pythoncontainer.cc", ":dummy.h"], data = [":extend_exascript_python_preset_py"], hdrs = [":exascript_python_int", ":filter_swig_code_exascript_python_h"], include_prefix = ".", - deps = ["@python3//:python3",":exascript_python","//exaudf/exaudflib:header", - "//exaudf:debug_message_h","//exaudf/exaudflib:scriptoptionlines", "//exaudf/python:pythoncontainer_header"], + deps = ["@python3//:python3",":exascript_python","//base/exaudflib:header", + "//base:debug_message_h","//base/exaudflib:scriptoptionlines", "//base/python:pythoncontainer_header"], alwayslink=True, ) @@ -109,5 +109,5 @@ cc_binary( linkshared = 1, srcs = [":python_ext_dataframe.cc"], deps = ["@python3//:python3","@numpy//:numpy", - "//exaudf/exaudflib:header", "//exaudf:debug_message_h"], + "//base/exaudflib:header", "//base:debug_message_h"], ) diff --git a/exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc b/exaudfclient/base/python/python3/python_ext_dataframe.cc similarity index 99% rename from exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc rename to exaudfclient/base/python/python3/python_ext_dataframe.cc index bdc8b3232..3e3902b8f 100644 --- a/exaudfclient/base/exaudf/python/python3/python_ext_dataframe.cc +++ b/exaudfclient/base/python/python3/python_ext_dataframe.cc @@ -1,6 +1,6 @@ #include -#include "exaudf/exaudflib/swig/swig_common.h" -#include "exaudf/debug_message.h" +#include "base/exaudflib/swig/swig_common.h" +#include "base/debug_message.h" #include diff --git a/exaudfclient/base/exaudf/python/pythoncontainer.cc b/exaudfclient/base/python/pythoncontainer.cc similarity index 99% rename from exaudfclient/base/exaudf/python/pythoncontainer.cc rename to exaudfclient/base/python/pythoncontainer.cc index 45a53e1dd..d87d373e1 100644 --- a/exaudfclient/base/exaudf/python/pythoncontainer.cc +++ b/exaudfclient/base/python/pythoncontainer.cc @@ -1,5 +1,5 @@ #include "pythoncontainer.h" -#include "exaudf/exaudflib/swig/swig_meta_data.h" +#include "base/exaudflib/swig/swig_meta_data.h" #include #ifdef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE @@ -10,10 +10,10 @@ #include #include "exascript_python_int.h" #include "exascript_python.h" -#include "exaudf/debug_message.h" -#include "exaudf/exaudflib/vm/scriptoptionlines.h" +#include "base/debug_message.h" +#include "base/exaudflib/vm/scriptoptionlines.h" -#include "exaudf/exaudflib/swig/script_data_transfer_objects.h" +#include "base/exaudflib/swig/script_data_transfer_objects.h" #include #include diff --git a/exaudfclient/base/exaudf/python/pythoncontainer.h b/exaudfclient/base/python/pythoncontainer.h similarity index 92% rename from exaudfclient/base/exaudf/python/pythoncontainer.h rename to exaudfclient/base/python/pythoncontainer.h index 0fa212cf6..aab6eb7a9 100644 --- a/exaudfclient/base/exaudf/python/pythoncontainer.h +++ b/exaudfclient/base/python/pythoncontainer.h @@ -1,7 +1,7 @@ #ifndef PYTHONVM_H #define PYTHONVM_H -#include "exaudf/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/vm/swig_vm.h" #ifdef ENABLE_PYTHON_VM diff --git a/exaudfclient/base/exaudf/python_repository.bzl b/exaudfclient/base/python_repository.bzl similarity index 100% rename from exaudfclient/base/exaudf/python_repository.bzl rename to exaudfclient/base/python_repository.bzl diff --git a/exaudfclient/base/exaudf/streaming_container/BUILD b/exaudfclient/base/streaming_container/BUILD similarity index 72% rename from exaudfclient/base/exaudf/streaming_container/BUILD rename to exaudfclient/base/streaming_container/BUILD index a23f09b05..848d7774b 100644 --- a/exaudfclient/base/exaudf/streaming_container/BUILD +++ b/exaudfclient/base/streaming_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "streamingcontainer", srcs = ["streamingcontainer.cc","streamingcontainer.h"], hdrs = ["streamingcontainer.h"], - deps = ["//exaudf/exaudflib:exaudflib-deps","//exaudf/exaudflib:header"] + deps = ["//base/exaudflib:exaudflib-deps","//base/exaudflib:header"] ) \ No newline at end of file diff --git a/exaudfclient/base/exaudf/streaming_container/streamingcontainer.cc b/exaudfclient/base/streaming_container/streamingcontainer.cc similarity index 100% rename from exaudfclient/base/exaudf/streaming_container/streamingcontainer.cc rename to exaudfclient/base/streaming_container/streamingcontainer.cc diff --git a/exaudfclient/base/exaudf/streaming_container/streamingcontainer.h b/exaudfclient/base/streaming_container/streamingcontainer.h similarity index 100% rename from exaudfclient/base/exaudf/streaming_container/streamingcontainer.h rename to exaudfclient/base/streaming_container/streamingcontainer.h diff --git a/exaudfclient/base/exaudf/zmq_repository.bzl b/exaudfclient/base/zmq_repository.bzl similarity index 100% rename from exaudfclient/base/exaudf/zmq_repository.bzl rename to exaudfclient/base/zmq_repository.bzl diff --git a/exaudfclient/base/build.sh b/exaudfclient/build.sh similarity index 100% rename from exaudfclient/base/build.sh rename to exaudfclient/build.sh diff --git a/exaudfclient/base/build_local.sh b/exaudfclient/build_local.sh similarity index 100% rename from exaudfclient/base/build_local.sh rename to exaudfclient/build_local.sh diff --git a/exaudfclient/build_local_all.sh b/exaudfclient/build_local_all.sh new file mode 100755 index 000000000..b97842f87 --- /dev/null +++ b/exaudfclient/build_local_all.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +bash build_local.sh "$@" --lockfile_mode=off --config no-tty --config python --config java --config slow-wrapper-py3 diff --git a/exaudfclient/base/docs/exaudfclient.drawio b/exaudfclient/docs/exaudfclient.drawio similarity index 100% rename from exaudfclient/base/docs/exaudfclient.drawio rename to exaudfclient/docs/exaudfclient.drawio diff --git a/exaudfclient/base/docs/exaudfclient.png b/exaudfclient/docs/exaudfclient.png similarity index 100% rename from exaudfclient/base/docs/exaudfclient.png rename to exaudfclient/docs/exaudfclient.png diff --git a/exaudfclient/base/exaudfclient.cc b/exaudfclient/exaudfclient.cc similarity index 96% rename from exaudfclient/base/exaudfclient.cc rename to exaudfclient/exaudfclient.cc index 567bee530..158e5d19c 100644 --- a/exaudfclient/base/exaudfclient.cc +++ b/exaudfclient/exaudfclient.cc @@ -15,8 +15,8 @@ #include //This is required for dynamic linking in new linker namespace, not required for plugins #endif #include -#include "exaudf/exaudflib/vm/swig_vm.h" -#include "exaudf/exaudflib/load_dynamic.h" +#include "base/exaudflib/vm/swig_vm.h" +#include "base/exaudflib/load_dynamic.h" #ifdef ENABLE_BENCHMARK_VM #include "benchmark_container/benchmark_container.h" #endif @@ -24,7 +24,7 @@ #include "streaming_container/streamingcontainer.h" #endif #include -#include "exaudf/debug_message.h" +#include "base/debug_message.h" #include #include #include @@ -38,11 +38,11 @@ #ifdef ENABLE_JAVA_VM -#include "exaudf/javacontainer/javacontainer.h" +#include "base/javacontainer/javacontainer.h" #endif //ENABLE_JAVA_VM #ifdef ENABLE_PYTHON_VM -#include "exaudf/python/pythoncontainer.h" +#include "base/python/pythoncontainer.h" #endif //ENABLE_PYTHON_VM #ifdef UDF_PLUGIN_CLIENT diff --git a/exaudfclient/base/run.sh b/exaudfclient/run.sh similarity index 100% rename from exaudfclient/base/run.sh rename to exaudfclient/run.sh diff --git a/exaudfclient/base/run_local.sh b/exaudfclient/run_local.sh similarity index 100% rename from exaudfclient/base/run_local.sh rename to exaudfclient/run_local.sh diff --git a/exaudfclient/base/test_udfclient.sh b/exaudfclient/test_udfclient.sh similarity index 100% rename from exaudfclient/base/test_udfclient.sh rename to exaudfclient/test_udfclient.sh diff --git a/exaudfclient/base/variables.bzl b/exaudfclient/variables.bzl similarity index 100% rename from exaudfclient/base/variables.bzl rename to exaudfclient/variables.bzl diff --git a/exaudfclient/base/visualize_all.sh b/exaudfclient/visualize_all.sh similarity index 100% rename from exaudfclient/base/visualize_all.sh rename to exaudfclient/visualize_all.sh diff --git a/exaudfclient/base/visualize_deps.sh b/exaudfclient/visualize_deps.sh similarity index 100% rename from exaudfclient/base/visualize_deps.sh rename to exaudfclient/visualize_deps.sh diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile index b5779ed30..6f208cb80 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile @@ -5,14 +5,14 @@ RUN mkdir /conf /buckets RUN ldconfig RUN mkdir /exaudfclient /exaudf -COPY /exaudfclient/base /exaudfclient/base +COPY /exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base +WORKDIR /exaudfclient/ # We need to build with optimize here, because the debug build fails to run with a runtime linking error regarding protobuf ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --config no-tty -c dbg --config python --config test-binaries-py3 +RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile index 823e0e37b..407ab1307 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile @@ -1,13 +1,13 @@ FROM {{build_deps}} RUN mkdir /exaudfclient /exaudf -COPY exaudfclient/base /exaudfclient/base +COPY exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base +WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --config no-tty --config optimize --config python --config fast-binary-py3 +RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_steps.py b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_steps.py index e6d5ca01e..7e8ec309a 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_steps.py +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_steps.py @@ -68,7 +68,7 @@ def requires_tasks(self): return {"build_deps": AnalyzeBuildDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base"} + return {"exaudfclient": "exaudfclient"} def get_path_in_flavor(self): return "flavor_base" @@ -95,7 +95,7 @@ def requires_tasks(self): return {"base_test_deps": AnalyzeBaseTestDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base", "emulator": "emulator"} + return {"exaudfclient": "exaudfclient", "emulator": "emulator"} def get_path_in_flavor(self): return "flavor_base" diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile index a9751eaca..ef1cdee80 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile @@ -5,14 +5,14 @@ RUN mkdir /conf /buckets RUN ldconfig RUN mkdir /exaudfclient /exaudf -COPY /exaudfclient/base /exaudfclient/base +COPY /exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base +WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ # We need to build with optimize here, because the debug build fails to run with a runtime linking error regarding protobuf -RUN ./build.sh --config no-tty -c dbg --config python --config test-binaries-py3 +RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile index 823e0e37b..407ab1307 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile @@ -1,13 +1,13 @@ FROM {{build_deps}} RUN mkdir /exaudfclient /exaudf -COPY exaudfclient/base /exaudfclient/base +COPY exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base +WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --config no-tty --config optimize --config python --config fast-binary-py3 +RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_steps.py b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_steps.py index 8c96e8994..b1110c10b 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_steps.py +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_steps.py @@ -82,7 +82,7 @@ def requires_tasks(self): return {"build_deps": AnalyzeBuildDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base"} + return {"exaudfclient": "exaudfclient"} def get_path_in_flavor(self): return "flavor_base" @@ -109,7 +109,7 @@ def requires_tasks(self): return {"base_test_deps": AnalyzeBaseTestDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base", "emulator": "emulator"} + return {"exaudfclient": "exaudfclient", "emulator": "emulator"} def get_path_in_flavor(self): return "flavor_base" diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile index 66ee9bdfd..c29731399 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile @@ -24,10 +24,10 @@ RUN true # workaround for https://github.com/moby/moby/issues/37965 RUN ldconfig RUN mkdir /exaudfclient /exaudf -COPY /exaudfclient/base /exaudfclient/base +COPY /exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base -RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config python --config test-binaries-py3"] +WORKDIR /exaudfclient/ +RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3"] RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile index 92ede8bd1..fdcb3ba4d 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile @@ -22,10 +22,10 @@ RUN true # workaround for https://github.com/moby/moby/issues/37965 RUN ldconfig RUN mkdir /exaudfclient /exaudf -COPY exaudfclient/base /exaudfclient/base +COPY exaudfclient/ /exaudfclient/ -WORKDIR /exaudfclient/base -RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty --config optimize --config python --config fast-binary-py3"] +WORKDIR /exaudfclient/ +RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3"] RUN cp -r -L bazel-bin/* /exaudf RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_steps.py b/flavors/template-Exasol-all-python-3.10/flavor_base/build_steps.py index 191755abe..45ce72f8b 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_steps.py +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_steps.py @@ -52,7 +52,7 @@ def requires_tasks(self): "language_deps": AnalyzeLanguageDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base"} + return {"exaudfclient": "exaudfclient"} def get_path_in_flavor(self): return "flavor_base" @@ -80,7 +80,7 @@ def requires_tasks(self): "language_deps": AnalyzeLanguageDeps} def get_additional_build_directories_mapping(self) -> Dict[str, str]: - return {"exaudfclient/base": "exaudfclient/base", "emulator": "emulator"} + return {"exaudfclient": "exaudfclient", "emulator": "emulator"} def get_path_in_flavor(self): return "flavor_base" From 252730a747d85e92ed3173164e3732fc38d46fc9 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:28:21 -0300 Subject: [PATCH 16/25] Fixed tests --- .github/workflows/check_bazel_tests.yml | 8 ++++---- exaudfclient/base/javacontainer/test/BUILD | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_bazel_tests.yml b/.github/workflows/check_bazel_tests.yml index 285d314e8..7d6215364 100644 --- a/.github/workflows/check_bazel_tests.yml +++ b/.github/workflows/check_bazel_tests.yml @@ -28,11 +28,11 @@ jobs: - name: Java Tests run: | export USE_BAZEL_VERSION=7.2.1 - bazel test //javacontainer/test/... - working-directory: ./exaudfclient/base + bazel test //base/javacontainer/test/... + working-directory: ./exaudfclient/ - name: ExaudfLib Tests run: | export USE_BAZEL_VERSION=7.2.1 - bazel test //exaudflib/test/... - working-directory: ./exaudfclient/base + bazel test //base/exaudflib/test/... + working-directory: ./exaudfclient/ diff --git a/exaudfclient/base/javacontainer/test/BUILD b/exaudfclient/base/javacontainer/test/BUILD index 8b6c9f53e..c0103e818 100644 --- a/exaudfclient/base/javacontainer/test/BUILD +++ b/exaudfclient/base/javacontainer/test/BUILD @@ -1,6 +1,6 @@ java_library( name = "ExaStackTraceCleaner", - srcs = ["//javacontainer:ExaStackTraceCleaner.java"] + srcs = ["//base/javacontainer:ExaStackTraceCleaner.java"] ) java_test( @@ -15,7 +15,7 @@ cc_test( name = "javacontainer-test", srcs = ["cpp/javacontainer_test.cc", "cpp/exaudf_wrapper.cc", "cpp/javavm_test.cc", "cpp/javavm_test.h"], deps = [ - "//javacontainer:javacontainer", + "//base/javacontainer:javacontainer", "@googletest//:gtest_main", ], data = ["test.jar"] From 494b3a6961f7c1d615102d50801bce61c1773880 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:40:56 -0300 Subject: [PATCH 17/25] Fixed javacontainer --- .../base/javacontainer/javacontainer_impl.cc | 2 +- .../test/cpp/javacontainer_test.cc | 40 +++++++++---------- exaudfclient/{ => base}/test_udfclient.sh | 0 3 files changed, 21 insertions(+), 21 deletions(-) rename exaudfclient/{ => base}/test_udfclient.sh (100%) diff --git a/exaudfclient/base/javacontainer/javacontainer_impl.cc b/exaudfclient/base/javacontainer/javacontainer_impl.cc index 54a04664c..a04252738 100644 --- a/exaudfclient/base/javacontainer/javacontainer_impl.cc +++ b/exaudfclient/base/javacontainer/javacontainer_impl.cc @@ -22,7 +22,7 @@ JavaVMImpl::JavaVMImpl(bool checkOnly, bool noJNI): m_checkOnly(checkOnly), m_ex m_scriptCode(SWIGVM_params->script_code), m_exceptionThrown(false), m_jvm(NULL), m_env(NULL), m_needsCompilation(true) { stringstream ss; - m_exaJavaPath = "/exaudf/javacontainer"; // TODO hardcoded path + m_exaJavaPath = "/exaudf/base/javacontainer"; // TODO hardcoded path DBG_FUNC_CALL(cerr,getScriptClassName()); // To be called before scripts are imported. Otherwise, the script classname from an imported script could be used DBG_FUNC_CALL(cerr,importScripts()); DBG_FUNC_CALL(cerr,getExternalJvmOptions()); diff --git a/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc index 01c443e28..ff3d24824 100644 --- a/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc @@ -6,20 +6,20 @@ TEST(JavaContainer, basic_jar) { const std::string script_code = "%scriptclass com.exasol.udf_profiling.UdfProfiler;\n" - "%jar javacontainer/test/test.jar;"; + "%jar base/javacontainer/test/test.jar;"; JavaVMTest vm(script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/javacontainer"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/base/javacontainer"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, "\n"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/exaudf/javacontainer/libexaudf.jar:javacontainer/test/test.jar"); - const std::vector expectedJarPaths = {"javacontainer/test/test.jar"}; + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar"); + const std::vector expectedJarPaths = {"base/javacontainer/test/test.jar"}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_FALSE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Dexasol.scriptclass=com.exasol.udf_profiling.UdfProfiler", "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/exaudf/javacontainer/libexaudf.jar:javacontainer/test/test.jar", + "-Djava.class.path=/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -38,17 +38,17 @@ TEST(JavaContainer, basic_inline) { "}" "}"; JavaVMTest vm(script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/javacontainer"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/base/javacontainer"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); const std::string expected_script_code = std::string("package com.exasol;\r\n") + script_code; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar"); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_jarPaths.empty()); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/javacontainer/libexaudf.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -67,20 +67,20 @@ TEST(JavaContainer, combined_inline_jar) { "return 0;" "}" "}"; - const std::string script_code_with_jar = std::string("%jar javacontainer/test/test.jar;") + script_code; + const std::string script_code_with_jar = std::string("%jar base/javacontainer/test/test.jar;") + script_code; JavaVMTest vm(script_code_with_jar); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/javacontainer"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/base/javacontainer"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); const std::string expected_script_code = std::string("package com.exasol;\r\n") + script_code; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/javacontainer/libexaudf.jar:javacontainer/test/test.jar"); - const std::vector expectedJarPaths = {"javacontainer/test/test.jar"}; + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar"); + const std::vector expectedJarPaths = {"base/javacontainer/test/test.jar"}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/javacontainer/libexaudf.jar:javacontainer/test/test.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -95,7 +95,7 @@ TEST(JavaContainer, quoted_jvm_option) { " }\n" "}\n"; JavaVMTest vm(script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/javacontainer"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/base/javacontainer"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); const std::string expected_script_code = "package com.exasol;\r\n\n\n" @@ -104,8 +104,8 @@ TEST(JavaContainer, quoted_jvm_option) { "\tctx.emit(\"Success!\");\n" " }\n}\n"; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar"); const std::vector expectedJarPaths = {}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); @@ -115,7 +115,7 @@ TEST(JavaContainer, quoted_jvm_option) { */ const std::vector expectedJVMOptions = { "-Dhttp.agent=\"ABC", "DEF\"", "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/javacontainer/libexaudf.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } diff --git a/exaudfclient/test_udfclient.sh b/exaudfclient/base/test_udfclient.sh similarity index 100% rename from exaudfclient/test_udfclient.sh rename to exaudfclient/base/test_udfclient.sh From a4ee104317e83c9d288335ac7d4d418c28a1f28e Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:09:56 -0300 Subject: [PATCH 18/25] Fixed running test_udfclient.sh --- .../flavor_base/base_test_build_run/Dockerfile | 4 ++-- .../flavor_base/build_run/Dockerfile | 2 +- .../flavor_base/base_test_build_run/Dockerfile | 4 ++-- .../flavor_base/build_run/Dockerfile | 2 +- .../flavor_base/base_test_build_run/Dockerfile | 4 ++-- .../flavor_base/build_run/Dockerfile | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile index 6f208cb80..6800028db 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile @@ -14,8 +14,8 @@ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile index 407ab1307..a45306a51 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile @@ -10,7 +10,7 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile index ef1cdee80..c3c84dbff 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile @@ -14,8 +14,8 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ # We need to build with optimize here, because the debug build fails to run with a runtime linking error regarding protobuf RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile index 407ab1307..a45306a51 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile @@ -10,7 +10,7 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile index c29731399..be55e863d 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile @@ -29,8 +29,8 @@ COPY /exaudfclient/ /exaudfclient/ WORKDIR /exaudfclient/ RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3"] RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile index fdcb3ba4d..c989badb1 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile @@ -28,7 +28,7 @@ WORKDIR /exaudfclient/ RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3"] RUN cp -r -L bazel-bin/* /exaudf -RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf From b9860ac38834b87c397786fa238069337aeeebf3 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:59:11 -0300 Subject: [PATCH 19/25] Changed working dir when running test_udfclient.sh --- .../flavor_base/base_test_build_run/Dockerfile | 6 ++++-- .../flavor_base/build_run/Dockerfile | 3 ++- .../flavor_base/base_test_build_run/Dockerfile | 6 ++++-- .../flavor_base/build_run/Dockerfile | 3 ++- .../flavor_base/base_test_build_run/Dockerfile | 6 ++++-- .../flavor_base/build_run/Dockerfile | 3 ++- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile index 6800028db..048e32e6f 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile @@ -14,8 +14,10 @@ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static + +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile index a45306a51..7de3bdbbb 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile @@ -10,7 +10,8 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile index c3c84dbff..211ea3c4c 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile @@ -14,8 +14,10 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ # We need to build with optimize here, because the debug build fails to run with a runtime linking error regarding protobuf RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static + +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile index a45306a51..7de3bdbbb 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile @@ -10,7 +10,8 @@ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile index be55e863d..930ba99d8 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile @@ -29,8 +29,10 @@ COPY /exaudfclient/ /exaudfclient/ WORKDIR /exaudfclient/ RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3"] RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3_static + +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3_static WORKDIR / RUN mkdir /exasol_emulator diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile index c989badb1..0690b72d1 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile @@ -28,7 +28,8 @@ WORKDIR /exaudfclient/ RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3"] RUN cp -r -L bazel-bin/* /exaudf -RUN ./base/test_udfclient.sh /exaudf/exaudfclient_py3 +WORKDIR /exaudfclient/base +RUN ./test_udfclient.sh /exaudf/exaudfclient_py3 WORKDIR /exaudf From fd1f1d1878267c898b23eefdf4fac0c7e01dc590 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Mon, 12 Aug 2024 08:01:19 -0300 Subject: [PATCH 20/25] Fixes from review --- exaudfclient/.bazelrc | 2 +- exaudfclient/base/BUILD | 2 +- exaudfclient/base/javacontainer/BUILD | 117 ++++++------------ exaudfclient/build_local_all.sh | 2 +- .../base_test_build_run/Dockerfile | 2 +- .../build_deps/packages/conda_packages | 1 + .../flavor_base/build_run/Dockerfile | 2 +- .../base_test_build_run/Dockerfile | 2 +- .../flavor_base/build_run/Dockerfile | 2 +- .../base_test_build_run/Dockerfile | 2 +- .../flavor_base/build_run/Dockerfile | 2 +- 11 files changed, 45 insertions(+), 91 deletions(-) diff --git a/exaudfclient/.bazelrc b/exaudfclient/.bazelrc index 128807709..032c4ce23 100644 --- a/exaudfclient/.bazelrc +++ b/exaudfclient/.bazelrc @@ -1,4 +1,4 @@ -build --copt='-std=c++17' --force_pic --action_env=PROTOBUF_BIN --action_env=PROTOBUF_LIBRARY_PREFIX --action_env=PROTOBUF_INCLUDE_PREFIX +build --lockfile_mode=off --copt='-std=c++17' --force_pic --action_env=PROTOBUF_BIN --action_env=PROTOBUF_LIBRARY_PREFIX --action_env=PROTOBUF_INCLUDE_PREFIX # TODO add environment variables for R libraries build:benchmark --define benchmark=true build:java --define java=true --action_env=JAVA_PREFIX diff --git a/exaudfclient/base/BUILD b/exaudfclient/base/BUILD index 02515f7aa..687ba0d2a 100644 --- a/exaudfclient/base/BUILD +++ b/exaudfclient/base/BUILD @@ -24,7 +24,7 @@ cc_library( # Using cc_binary to build a shared library as output target is a workaround, because -# Bazel's cc_library are only intermediate stages and can be used as output target. +# Bazel's cc_library are only intermediate stages and can't be used as output target. # It is necessary to include //base/exaudflib:exaudflib into deps and srcs, because # otherwise dlmopen won't find the symbols of exaudflib and its dependencies. The target //base/exaudflib:exaudflib-deps # won't work either, because it only contains the libraries as dependencies. diff --git a/exaudfclient/base/javacontainer/BUILD b/exaudfclient/base/javacontainer/BUILD index 45a236c52..b5224f1ba 100644 --- a/exaudfclient/base/javacontainer/BUILD +++ b/exaudfclient/base/javacontainer/BUILD @@ -9,32 +9,32 @@ genrule( cd build_exascript_java_tmp_cc swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -java -addextern -module exascript_java -package com.exasol.swig -outdir "../java_src/com/exasol/swig" -o "../exascript_java_tmp.cc" exaudflib/exascript.i cd .. - cp java_src/com/exasol/swig/ConnectionInformationWrapper.java $(location orig/com/exasol/swig/ConnectionInformationWrapper.java) - cp java_src/com/exasol/swig/exascript_java.java $(location orig/com/exasol/swig/exascript_java.java) - cp java_src/com/exasol/swig/exascript_javaJNI.java $(location orig/com/exasol/swig/exascript_javaJNI.java) - cp java_src/com/exasol/swig/ExportSpecificationWrapper.java $(location orig/com/exasol/swig/ExportSpecificationWrapper.java) - cp java_src/com/exasol/swig/ImportSpecificationWrapper.java $(location orig/com/exasol/swig/ImportSpecificationWrapper.java) - cp java_src/com/exasol/swig/Metadata.java $(location orig/com/exasol/swig/Metadata.java) - cp java_src/com/exasol/swig/ResultHandler.java $(location orig/com/exasol/swig/ResultHandler.java) - cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) - cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) - cp java_src/com/exasol/swig/SWIGVM_datatype_e.java $(location orig/com/exasol/swig/SWIGVM_datatype_e.java) - cp java_src/com/exasol/swig/SWIGVM_itertype_e.java $(location orig/com/exasol/swig/SWIGVM_itertype_e.java) - cp java_src/com/exasol/swig/TableIterator.java $(location orig/com/exasol/swig/TableIterator.java) + cp java_src/com/exasol/swig/ConnectionInformationWrapper.java $(location ConnectionInformationWrapper.java) + cp java_src/com/exasol/swig/exascript_java.java $(location exascript_java.java) + cp java_src/com/exasol/swig/exascript_javaJNI.java $(location raw/exascript_javaJNI.java) + cp java_src/com/exasol/swig/ExportSpecificationWrapper.java $(location ExportSpecificationWrapper.java) + cp java_src/com/exasol/swig/ImportSpecificationWrapper.java $(location ImportSpecificationWrapper.java) + cp java_src/com/exasol/swig/Metadata.java $(location Metadata.java) + cp java_src/com/exasol/swig/ResultHandler.java $(location raw/ResultHandler.java) + cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java $(location SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) + cp java_src/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java $(location SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) + cp java_src/com/exasol/swig/SWIGVM_datatype_e.java $(location SWIGVM_datatype_e.java) + cp java_src/com/exasol/swig/SWIGVM_itertype_e.java $(location SWIGVM_itertype_e.java) + cp java_src/com/exasol/swig/TableIterator.java $(location raw/TableIterator.java) cp exascript_java_tmp.cc $(location exascript_java_tmp.cc) """, - outs = ["orig/com/exasol/swig/ConnectionInformationWrapper.java", - "orig/com/exasol/swig/exascript_java.java", - "orig/com/exasol/swig/exascript_javaJNI.java", - "orig/com/exasol/swig/ExportSpecificationWrapper.java", - "orig/com/exasol/swig/ImportSpecificationWrapper.java", - "orig/com/exasol/swig/Metadata.java", - "orig/com/exasol/swig/ResultHandler.java", - "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", - "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", - "orig/com/exasol/swig/SWIGVM_datatype_e.java", - "orig/com/exasol/swig/SWIGVM_itertype_e.java", - "orig/com/exasol/swig/TableIterator.java", + outs = ["ConnectionInformationWrapper.java", + "exascript_java.java", + "ExportSpecificationWrapper.java", + "ImportSpecificationWrapper.java", + "Metadata.java", + "SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", + "SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", + "SWIGVM_datatype_e.java", + "SWIGVM_itertype_e.java", + "raw/exascript_javaJNI.java", + "raw/ResultHandler.java", + "raw/TableIterator.java", "exascript_java_tmp.cc" ], srcs = ["//base/exaudflib:exascript.i","//base/exaudflib:swig/script_data_transfer_objects_wrapper.h"] @@ -67,75 +67,28 @@ genrule( cmd = """ TMPDIR=`mktemp -d` mkdir -p "$$TMPDIR"/java_src/com/exasol/swig - cp $(location :orig/com/exasol/swig/TableIterator.java) "$$TMPDIR"/java_src/com/exasol/swig/ - cp $(location :orig/com/exasol/swig/ResultHandler.java) "$$TMPDIR"/java_src/com/exasol/swig/ - cp $(location :orig/com/exasol/swig/exascript_javaJNI.java) "$$TMPDIR"/java_src/com/exasol/swig/ + cp $(location :raw/TableIterator.java) "$$TMPDIR"/java_src/com/exasol/swig/ + cp $(location :raw/ResultHandler.java) "$$TMPDIR"/java_src/com/exasol/swig/ + cp $(location :raw/exascript_javaJNI.java) "$$TMPDIR"/java_src/com/exasol/swig/ find "$$TMPDIR"/java_src/com/exasol/swig/ -name *.java -type f -exec chmod 644 {} \\; cp -r -L $(location //base:filter_swig_code.py) $(location :exascript_java_tmp.cc) "$$TMPDIR" (cd "$$TMPDIR" python3 filter_swig_code.py "exascript_java.cc" "exascript_java_tmp.cc") cp "$$TMPDIR"/exascript_java.cc $(location :exascript_java.cc) - cp "$$TMPDIR"/java_src/com/exasol/swig/TableIterator.java $(location :filtered/com/exasol/swig/TableIterator.java) - cp "$$TMPDIR"/java_src/com/exasol/swig/ResultHandler.java $(location :filtered/com/exasol/swig/ResultHandler.java) - cp "$$TMPDIR"/java_src/com/exasol/swig/exascript_javaJNI.java $(location :filtered/com/exasol/swig/exascript_javaJNI.java) + cp "$$TMPDIR"/java_src/com/exasol/swig/TableIterator.java $(location TableIterator.java) + cp "$$TMPDIR"/java_src/com/exasol/swig/ResultHandler.java $(location ResultHandler.java) + cp "$$TMPDIR"/java_src/com/exasol/swig/exascript_javaJNI.java $(location exascript_javaJNI.java) rm -rf "$$TMPDIR" """, outs = [ "exascript_java.cc", - "filtered/com/exasol/swig/TableIterator.java", - "filtered/com/exasol/swig/ResultHandler.java", - "filtered/com/exasol/swig/exascript_javaJNI.java" - ], - srcs = [":exascript_java_tmp.cc", ":orig/com/exasol/swig/TableIterator.java", - ":orig/com/exasol/swig/ResultHandler.java", ":orig/com/exasol/swig/exascript_javaJNI.java"], - tools = ["//base:filter_swig_code.py"] -) - - -genrule( - name = "finish_java_package", - cmd = """ - cp $(location filtered/com/exasol/swig/TableIterator.java) $(location TableIterator.java) - cp $(location filtered/com/exasol/swig/ResultHandler.java) $(location ResultHandler.java) - cp $(location filtered/com/exasol/swig/exascript_javaJNI.java) $(location exascript_javaJNI.java) - cp $(location orig/com/exasol/swig/ConnectionInformationWrapper.java) $(location ConnectionInformationWrapper.java) - cp $(location orig/com/exasol/swig/exascript_java.java) $(location exascript_java.java) - cp $(location orig/com/exasol/swig/ExportSpecificationWrapper.java) $(location ExportSpecificationWrapper.java) - cp $(location orig/com/exasol/swig/ImportSpecificationWrapper.java) $(location ImportSpecificationWrapper.java) - cp $(location orig/com/exasol/swig/Metadata.java) $(location Metadata.java) - cp $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) $(location SWIGTYPE_p_ExecutionGraph__ExportSpecification.java) - cp $(location orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) $(location SWIGTYPE_p_ExecutionGraph__ImportSpecification.java) - cp $(location orig/com/exasol/swig/SWIGVM_datatype_e.java) $(location SWIGVM_datatype_e.java) - cp $(location orig/com/exasol/swig/SWIGVM_itertype_e.java) $(location SWIGVM_itertype_e.java) - """, - outs = [ - "ConnectionInformationWrapper.java", - "exascript_java.java", - "exascript_javaJNI.java", - "ExportSpecificationWrapper.java", - "ImportSpecificationWrapper.java", - "Metadata.java", - "ResultHandler.java", - "SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", - "SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", - "SWIGVM_datatype_e.java", - "SWIGVM_itertype_e.java", "TableIterator.java", + "ResultHandler.java", + "exascript_javaJNI.java" ], - srcs = [ - "filtered/com/exasol/swig/TableIterator.java", - "filtered/com/exasol/swig/ResultHandler.java", - "filtered/com/exasol/swig/exascript_javaJNI.java", - "orig/com/exasol/swig/ConnectionInformationWrapper.java", - "orig/com/exasol/swig/exascript_java.java", - "orig/com/exasol/swig/ExportSpecificationWrapper.java", - "orig/com/exasol/swig/ImportSpecificationWrapper.java", - "orig/com/exasol/swig/Metadata.java", - "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ExportSpecification.java", - "orig/com/exasol/swig/SWIGTYPE_p_ExecutionGraph__ImportSpecification.java", - "orig/com/exasol/swig/SWIGVM_datatype_e.java", - "orig/com/exasol/swig/SWIGVM_itertype_e.java", - ] + srcs = [":exascript_java_tmp.cc", ":raw/TableIterator.java", + ":raw/ResultHandler.java", ":raw/exascript_javaJNI.java"], + tools = ["//base:filter_swig_code.py"] ) cc_library( diff --git a/exaudfclient/build_local_all.sh b/exaudfclient/build_local_all.sh index b97842f87..bc8033b6c 100755 --- a/exaudfclient/build_local_all.sh +++ b/exaudfclient/build_local_all.sh @@ -1,3 +1,3 @@ #!/bin/bash -bash build_local.sh "$@" --lockfile_mode=off --config no-tty --config python --config java --config slow-wrapper-py3 +bash build_local.sh "$@" --config no-tty --config python --config java --config slow-wrapper-py3 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile index 048e32e6f..09812f998 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/base_test_build_run/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 +RUN ./build.sh --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages index 0c3c0044b..a6aea162c 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_deps/packages/conda_packages @@ -4,3 +4,4 @@ bazel|7.2.1 gxx_linux-64|12.4.0 gcc_linux-64|12.4.0 make|4.3 +chrpath|0.16 diff --git a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile index 7de3bdbbb..434fced7c 100644 --- a/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-conda/flavor_base/build_run/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 +RUN ./build.sh --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile index 211ea3c4c..fddfb7be3 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/base_test_build_run/Dockerfile @@ -12,7 +12,7 @@ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ # We need to build with optimize here, because the debug build fails to run with a runtime linking error regarding protobuf -RUN ./build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3 +RUN ./build.sh --config no-tty -c dbg --config python --config test-binaries-py3 RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile index 7de3bdbbb..434fced7c 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_run/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3 +RUN ./build.sh --config no-tty --config optimize --config python --config fast-binary-py3 RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile index 930ba99d8..3038297bb 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/base_test_build_run/Dockerfile @@ -27,7 +27,7 @@ RUN mkdir /exaudfclient /exaudf COPY /exaudfclient/ /exaudfclient/ WORKDIR /exaudfclient/ -RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty -c dbg --config python --config test-binaries-py3"] +RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty -c dbg --config python --config test-binaries-py3"] RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base diff --git a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile index 0690b72d1..1ac4548f8 100644 --- a/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile +++ b/flavors/template-Exasol-all-python-3.10/flavor_base/build_run/Dockerfile @@ -25,7 +25,7 @@ RUN mkdir /exaudfclient /exaudf COPY exaudfclient/ /exaudfclient/ WORKDIR /exaudfclient/ -RUN ["/bin/bash", "-c", "source /env && bash build.sh --lockfile_mode=off --config no-tty --config optimize --config python --config fast-binary-py3"] +RUN ["/bin/bash", "-c", "source /env && bash build.sh --config no-tty --config optimize --config python --config fast-binary-py3"] RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base From 592ba70259ea420b0a810eacaddc387c0ea7efd0 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:48:25 -0300 Subject: [PATCH 21/25] Fixed reference to Java language jar --- exaudfclient/base/javacontainer/javacontainer_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exaudfclient/base/javacontainer/javacontainer_impl.cc b/exaudfclient/base/javacontainer/javacontainer_impl.cc index a04252738..35786801d 100644 --- a/exaudfclient/base/javacontainer/javacontainer_impl.cc +++ b/exaudfclient/base/javacontainer/javacontainer_impl.cc @@ -433,7 +433,7 @@ void JavaVMImpl::registerFunctions() { } void JavaVMImpl::setClasspath() { - m_exaJarPath = m_exaJavaPath + "/libexaudf.jar"; + m_exaJarPath = m_exaJavaPath + "/exaudf_deploy.jar"; m_classpath = m_exaJarPath; } From 2f0185a05d8917728d6f6c6cbaa9f479999ad45b Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:06:51 -0300 Subject: [PATCH 22/25] Fixed Java tests --- .../test/cpp/javacontainer_test.cc | 24 +++++++++---------- exaudfclient/bazel-exaudfclient | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) create mode 120000 exaudfclient/bazel-exaudfclient diff --git a/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc index ff3d24824..387cfda6d 100644 --- a/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc @@ -11,15 +11,15 @@ TEST(JavaContainer, basic_jar) { EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJavaPath, "/exaudf/base/javacontainer"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, "\n"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/exaudf_deploy.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/exaudf/base/javacontainer/exaudf_deploy.jar:base/javacontainer/test/test.jar"); const std::vector expectedJarPaths = {"base/javacontainer/test/test.jar"}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_FALSE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Dexasol.scriptclass=com.exasol.udf_profiling.UdfProfiler", "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar", + "-Djava.class.path=/exaudf/base/javacontainer/exaudf_deploy.jar:base/javacontainer/test/test.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -42,13 +42,13 @@ TEST(JavaContainer, basic_inline) { EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); const std::string expected_script_code = std::string("package com.exasol;\r\n") + script_code; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/exaudf_deploy.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar"); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_jarPaths.empty()); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -73,14 +73,14 @@ TEST(JavaContainer, combined_inline_jar) { EXPECT_EQ(vm.getJavaVMInternalStatus().m_localClasspath, "/tmp"); const std::string expected_script_code = std::string("package com.exasol;\r\n") + script_code; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/exaudf_deploy.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar:base/javacontainer/test/test.jar"); const std::vector expectedJarPaths = {"base/javacontainer/test/test.jar"}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); const std::vector expectedJVMOptions = { "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar:base/javacontainer/test/test.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar:base/javacontainer/test/test.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } @@ -104,8 +104,8 @@ TEST(JavaContainer, quoted_jvm_option) { "\tctx.emit(\"Success!\");\n" " }\n}\n"; EXPECT_EQ(vm.getJavaVMInternalStatus().m_scriptCode, expected_script_code); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/libexaudf.jar"); - EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/libexaudf.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_exaJarPath, "/exaudf/base/javacontainer/exaudf_deploy.jar"); + EXPECT_EQ(vm.getJavaVMInternalStatus().m_classpath, "/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar"); const std::vector expectedJarPaths = {}; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jarPaths, expectedJarPaths); EXPECT_TRUE(vm.getJavaVMInternalStatus().m_needsCompilation); @@ -115,7 +115,7 @@ TEST(JavaContainer, quoted_jvm_option) { */ const std::vector expectedJVMOptions = { "-Dhttp.agent=\"ABC", "DEF\"", "-Xms128m", "-Xmx128m", "-Xss512k", "-XX:ErrorFile=/tmp/hs_err_pid%p.log", - "-Djava.class.path=/tmp:/exaudf/base/javacontainer/libexaudf.jar", + "-Djava.class.path=/tmp:/exaudf/base/javacontainer/exaudf_deploy.jar", "-XX:+UseSerialGC" }; EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions); } diff --git a/exaudfclient/bazel-exaudfclient b/exaudfclient/bazel-exaudfclient new file mode 120000 index 000000000..7e16d3a88 --- /dev/null +++ b/exaudfclient/bazel-exaudfclient @@ -0,0 +1 @@ +/home/thomas/.cache/bazel/_bazel_thomas/e5043f337eaaeaf4739f7c31dd0a129f/execroot/_main \ No newline at end of file From e833817f68d04e6d353dde72fe45599beef254d1 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:23:36 -0300 Subject: [PATCH 23/25] Removed bazel-exaudfclient --- exaudfclient/bazel-exaudfclient | 1 - 1 file changed, 1 deletion(-) delete mode 120000 exaudfclient/bazel-exaudfclient diff --git a/exaudfclient/bazel-exaudfclient b/exaudfclient/bazel-exaudfclient deleted file mode 120000 index 7e16d3a88..000000000 --- a/exaudfclient/bazel-exaudfclient +++ /dev/null @@ -1 +0,0 @@ -/home/thomas/.cache/bazel/_bazel_thomas/e5043f337eaaeaf4739f7c31dd0a129f/execroot/_main \ No newline at end of file From 1a194e16fcb0f0ab2812640578a24e8974a00e7f Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:24:40 -0300 Subject: [PATCH 24/25] Updated .gitignore --- exaudfclient/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/exaudfclient/.gitignore b/exaudfclient/.gitignore index 6d1870fde..3876f6726 100644 --- a/exaudfclient/.gitignore +++ b/exaudfclient/.gitignore @@ -3,6 +3,7 @@ bazel-genfiles bazel-out bazel-src bazel-testlogs +bazel-exaudfclient graph.in graph.png MODULE.bazel.lock From 2614e42361b1bf3e593bd8d702e2668d89019803 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:02:37 -0300 Subject: [PATCH 25/25] Added back pkg to flavor conda-cuda --- .../flavor_base/build_deps/packages/conda_packages | 1 + 1 file changed, 1 insertion(+) diff --git a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages index 0c3c0044b..a6aea162c 100644 --- a/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages +++ b/flavors/template-Exasol-all-python-3.10-cuda-conda/flavor_base/build_deps/packages/conda_packages @@ -4,3 +4,4 @@ bazel|7.2.1 gxx_linux-64|12.4.0 gcc_linux-64|12.4.0 make|4.3 +chrpath|0.16