-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Bump elasticsearch version and improve methodology. #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cd6f464
0a4e6d5
61d181a
ce51b99
63eb6bb
c163497
b5f7edb
cad3f9d
03772f1
5802501
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
FROM clickhouse/clickhouse-server:latest | ||
|
||
FROM clickhouse/clickhouse-server:25.6@sha256:7566eea413755c8fc43a7b39078b05f16ed350bb33c98f2f087c5f66b0e8163f | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# ClickHouse methodology | ||
|
||
**Version: [23.3.1.2823](https://hub.docker.com/layers/clickhouse/clickhouse-server/23.3.1.2823/images/sha256-b88fd8c71b64d3158751337557ff089ff7b0d1ebf81d9c4c7aa1f0b37a31ee64?context=explore)** | ||
**Version: [25.6](https://hub.docker.com/layers/clickhouse/clickhouse-server/25.6/images/sha256-77ff1f2054e27bec1b4c5eccbf701b63f8409831fea71f162ae2f25872dee1f4)** | ||
|
||
**File with Formatted Queries:** [Config File](/assets/clickhouse/config.yaml) | ||
|
||
|
@@ -67,4 +67,4 @@ On launch we execute ClickHouse’s entrypoint.sh to start ClickHouse in the bac | |
On shutdown, we simply send ClickHouse a stop command. | ||
|
||
**Clearing Caches:** | ||
Before starting any queries we ask ClickHouse to drop its UNCOMPRESSED CACHE and MARK CACHE. We also flush the file system buffers and clear the filesystem caches. | ||
Before starting any queries we ask ClickHouse to drop its UNCOMPRESSED CACHE and MARK CACHE. We also flush the file system buffers and clear the filesystem caches. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Minor typo: possessive “ClickHouse’s” vs plural “ClickHouse’s provided docker images” → “ClickHouse-provided Docker images” for clarity. 🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,7 +5,7 @@ | |||||
|
||||||
CLP_OUT_PATH = f"{WORK_DIR}/archives" | ||||||
CLP_S_BINARY = "/clp/clp-s" | ||||||
class clp_s_bench(Benchmark): | ||||||
class clp_bench(Benchmark): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Rename class to PascalCase to respect PEP-8 PEP-8 prescribes -class clp_bench(Benchmark):
+class ClpBench(Benchmark): You will also need to adjust the instantiation on Line 64 and any external imports. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
def __init__(self, dataset, target_encoded_size=268435456): | ||||||
super().__init__(dataset) | ||||||
|
||||||
|
@@ -61,7 +61,7 @@ def terminate_procs(self): | |||||
|
||||||
|
||||||
def main(): | ||||||
bench = clp_s_bench(sys.argv[1]) | ||||||
bench = clp_bench(sys.argv[1]) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Instantiation must match updated class name If you adopt the PascalCase rename, remember to update the constructor here: - bench = clp_bench(sys.argv[1])
+ bench = ClpBench(sys.argv[1]) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
bench.run_everything() | ||||||
|
||||||
if __name__ == "__main__": | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,14 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
log_path = sys.argv[1] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def pop_by_path(obj, path): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keys = path.split('.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for key in keys[:-1]: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
obj = obj[key] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
out = obj[keys[-1]] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
del obj[keys[-1]] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return out | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+13
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Optional: Add type annotations for better code documentation Consider adding type annotations to improve code readability and enable better IDE support. -def pop_by_path(obj, path):
+def pop_by_path(obj: dict, path: str) -> any: 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.12.2)13-13: Missing return type annotation for public function (ANN201) 13-13: Missing type annotation for function argument (ANN001) 13-13: Missing type annotation for function argument (ANN001) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def traverse_data(collection_name): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
with open(log_path, encoding="utf-8") as f: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for line in f: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -55,15 +63,46 @@ def traverse_data(collection_name): | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id_value = str(attr["query"]["_id"]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
json_line["attr"]["query"]["_id"] = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
json_line["attr"]["query"]["_id"]["_ooid"] = id_value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timestamp_val = pop_by_path(json_line, sys.argv[2]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
json_line["@timestamp"] = timestamp_val | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
except KeyError: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# no such timestamp, ignore | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
json_line["@timestamp"] = 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
yield { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"_index": collection_name, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"_op_type": "create", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"_source": json_line, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def ingest_dataset(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
es = Elasticsearch("http://localhost:9202", request_timeout=1200, retry_on_timeout=True) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if sys.argv[3] != "no_logsdb": | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template_body = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"index_patterns": [collection_name], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"template": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"settings": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"index": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"mode": "logsdb" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"mappings": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"properties": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"@timestamp": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"type": "date", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"format": "date_optional_time||epoch_second||epoch_millis||yyyy-MM-dd HH:mm:ss.SSS zzz" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"priority": 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
es.indices.put_index_template(name=collection_name, body=template_body) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+84
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) LGTM! Consider minor formatting improvements. The index template logic is well-implemented with comprehensive date format support for the @timestamp field. The conditional creation based on the logsdb flag is appropriate. Consider adding trailing commas for better diff readability: "settings": {
"index": {
- "mode": "logsdb"
+ "mode": "logsdb",
},
},
"mappings": {
"properties": {
"@timestamp": {
"type": "date",
- "format": "date_optional_time||epoch_second||epoch_millis||yyyy-MM-dd HH:mm:ss.SSS zzz"
- }
+ "format": "date_optional_time||epoch_second||epoch_millis||yyyy-MM-dd HH:mm:ss.SSS zzz",
+ },
}
- }
+ },
},
- "priority": 101
+ "priority": 101, 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.12.2)90-90: Trailing comma missing Add trailing comma (COM812) 97-97: Trailing comma missing Add trailing comma (COM812) 98-98: Trailing comma missing Add trailing comma (COM812) 99-99: Trailing comma missing Add trailing comma (COM812) 100-100: Trailing comma missing Add trailing comma (COM812) 102-102: Trailing comma missing Add trailing comma (COM812) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
count = 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for success, info in streaming_bulk( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
es, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,9 +13,14 @@ | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
class elasticsearch_bench(Benchmark): | ||||||||||||||||||||||||||||||
# add any parameters to the tool here | ||||||||||||||||||||||||||||||
def __init__(self, dataset): | ||||||||||||||||||||||||||||||
def __init__(self, dataset, logsdb=True): | ||||||||||||||||||||||||||||||
super().__init__(dataset) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
self.logsdb = logsdb | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
if not logsdb: | ||||||||||||||||||||||||||||||
self.properties["notes"] = "no logsdb" | ||||||||||||||||||||||||||||||
Comment on lines
+16
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) LGTM! Consider minor improvements for code quality. The logsdb parameter addition is well-implemented with appropriate default value and property tracking. Consider addressing the static analysis suggestions: - def __init__(self, dataset, logsdb=True):
+ def __init__(self, dataset: str, *, logsdb: bool = True) -> None: Using keyword-only argument ( 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.12.2)16-16: Missing return type annotation for special method Add return type annotation: (ANN204) 16-16: Missing type annotation for function argument (ANN001) 16-16: Boolean default positional argument in function definition (FBT002) 16-16: Missing type annotation for function argument (ANN001) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||
def compressed_size(self): | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
|
@@ -35,8 +40,13 @@ def ingest(self): | |||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
Ingests the dataset at self.datasets_path | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
if self.logsdb: | ||||||||||||||||||||||||||||||
logsdb = "anything" | ||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||
logsdb = "no_logsdb" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
self.docker_execute([ | ||||||||||||||||||||||||||||||
f"python3 {ASSETS_DIR}/ingest.py {self.datasets_path}" | ||||||||||||||||||||||||||||||
f"python3 {ASSETS_DIR}/ingest.py {self.datasets_path} {self.dataset_meta['timestamp']} {logsdb}" | ||||||||||||||||||||||||||||||
]) | ||||||||||||||||||||||||||||||
Comment on lines
+43
to
50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) LGTM! Consider simplifying the conditional logic. The updated ingest method correctly passes the required arguments to the ingestion script, including the new logsdb flag and timestamp path. Consider simplifying the conditional logic and adding trailing comma: - if self.logsdb:
- logsdb = "anything"
- else:
- logsdb = "no_logsdb"
+ logsdb = "anything" if self.logsdb else "no_logsdb"
self.docker_execute([
- f"python3 {ASSETS_DIR}/ingest.py {self.datasets_path} {self.dataset_meta['timestamp']} {logsdb}"
+ f"python3 {ASSETS_DIR}/ingest.py {self.datasets_path} {self.dataset_meta['timestamp']} {logsdb}",
]) 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.12.2)43-46: Use ternary operator Replace (SIM108) 49-49: Trailing comma missing Add trailing comma (COM812) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
def search(self, query): | ||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# dependencies | ||
|
||
# If there is any dedicated image available, you should build the benchmarking image on top of that | ||
FROM ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-jammy:main | ||
FROM ubuntu:jammy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainConfirm missing tool-chain & clean up apt cache after the base-image switch Switching from the bespoke While touching the layer, it is also best practice to clean up the apt cache to keep the image small: RUN apt-get update \
- && DEBIAN_FRONTEND=noninteractive apt-get install -y \
- tmux \
- vim
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y \
+ tmux \
+ vim \
+ && rm -rf /var/lib/apt/lists/* 🏁 Script executed: #!/bin/bash
set -eux
# Locate the overhead-test Dockerfile
dockerfile_path=$(fd "overhead_test/Dockerfile" -t f)
echo "Found Dockerfile at: $dockerfile_path"
# Show the first 50 lines to inspect the base image and install steps
sed -n '1,50p' "$dockerfile_path" Length of output: 180 🏁 Script executed: #!/bin/bash
set -eux
# Locate the Dockerfile under assets/overhead_test
dockerfile_path=$(find . -type f -path "*/assets/overhead_test/Dockerfile" | head -n1)
echo "Found Dockerfile at: $dockerfile_path"
# Print the first 50 lines to inspect base image and install steps
sed -n '1,50p' "$dockerfile_path" Length of output: 661 🏁 Script executed: #!/bin/bash
set -eux
# List all files under assets/overhead_test
echo "=== Files in assets/overhead_test ==="
find assets/overhead_test -type f
# Search for common toolchain and runtime dependencies
echo "=== Searching for Python scripts ==="
rg --no-heading --color never '#!.*python' assets/overhead_test || true
rg --no-heading --color never '\.py' assets/overhead_test || true
echo "=== Searching for curl usage ==="
rg --no-heading --color never 'curl' assets/overhead_test || true
echo "=== Searching for gcc/g++ usage ==="
rg --no-heading --color never '\bgcc\b|\bg\+\+\b' assets/overhead_test || true
echo "=== Searching for make usage ==="
rg --no-heading --color never '\bmake\b' assets/overhead_test || true Length of output: 1009 Ensure Python3 is installed and clean up apt cache The • File: assets/overhead_test/Dockerfile Suggested diff: RUN apt-get update \
- && DEBIAN_FRONTEND=noninteractive apt-get install -y \
- tmux \
- vim
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y \
+ tmux \
+ vim \
+ python3 \
+ && rm -rf /var/lib/apt/lists/*
🤖 Prompt for AI Agents
|
||
|
||
# Install necessary packages | ||
RUN apt-get update \ | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||||||||||||
FROM presto/prestissimo-dependency:ubuntu-22.04 | ||||||||||||||||||||||
FROM presto/prestissimo-dependency:ubuntu-22.04-presto-0.293 | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Install necessary packages | ||||||||||||||||||||||
RUN apt-get update; | ||||||||||||||||||||||
|
@@ -35,22 +35,28 @@ RUN cd /usr/local && sh -c "$(curl --location https://taskfile.dev/install.sh)" | |||||||||||||||||||||
RUN pip3 install pyarrow; | ||||||||||||||||||||||
|
||||||||||||||||||||||
WORKDIR /home | ||||||||||||||||||||||
RUN git clone https://github.com/anlowee/presto.git; | ||||||||||||||||||||||
RUN git clone https://github.com/y-scope/presto.git; | ||||||||||||||||||||||
WORKDIR /home/presto | ||||||||||||||||||||||
RUN git checkout xwei/benchmark-test; | ||||||||||||||||||||||
RUN git checkout 89ce0f3b4ec713d658f3544e75aeb92fbd3a397d; | ||||||||||||||||||||||
WORKDIR /home/presto/presto-native-execution | ||||||||||||||||||||||
RUN mkdir build; | ||||||||||||||||||||||
RUN rm -rf velox; | ||||||||||||||||||||||
RUN git clone https://github.com/anlowee/velox.git; | ||||||||||||||||||||||
RUN git clone https://github.com/y-scope/velox.git; | ||||||||||||||||||||||
WORKDIR /home/presto/presto-native-execution/velox | ||||||||||||||||||||||
RUN git checkout xwei/benchmark-test; | ||||||||||||||||||||||
RUN git checkout 27ee4bcaad449fd1c8b90c48787f4eaf8e92395f; | ||||||||||||||||||||||
|
||||||||||||||||||||||
WORKDIR /home/presto | ||||||||||||||||||||||
RUN ./mvnw clean install -DskipTests -pl -presto-docs -T1C; | ||||||||||||||||||||||
|
||||||||||||||||||||||
WORKDIR /home/presto/presto-native-execution/build | ||||||||||||||||||||||
RUN cmake .. && make -j$(nproc) presto_server; | ||||||||||||||||||||||
WORKDIR /home/presto/presto-native-execution | ||||||||||||||||||||||
# RUN cmake .. && make -j$(nproc) presto_server; | ||||||||||||||||||||||
RUN NUM_THREADS=8 make release; | ||||||||||||||||||||||
|
||||||||||||||||||||||
Comment on lines
+51
to
54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Dead commented build step: please delete or document The Either remove it or add a comment explaining why the alternative remains for archaeology. 🤖 Prompt for AI Agents
|
||||||||||||||||||||||
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 | ||||||||||||||||||||||
ENV PATH=$JAVA_HOME/bin:$PATH | ||||||||||||||||||||||
|
||||||||||||||||||||||
RUN apt-get update; | ||||||||||||||||||||||
|
||||||||||||||||||||||
RUN apt-get install -y \ | ||||||||||||||||||||||
mariadb-client \ | ||||||||||||||||||||||
net-tools; | ||||||||||||||||||||||
Comment on lines
+58
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Second apt-get layer leaks cache and misses version pinning
-RUN apt-get update;
-RUN apt-get install -y \
- mariadb-client \
- net-tools;
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ mariadb-client=1:10.6.* \
+ net-tools=1.60* && \
+ rm -rf /var/lib/apt/lists/* Keeps layers reproducible and lean. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Checkov (3.2.334)[LOW] 1-62: Ensure that HEALTHCHECK instructions have been added to container images (CKV_DOCKER_2) [LOW] 1-62: Ensure that a user for the container has been created (CKV_DOCKER_3) 🪛 Hadolint (2.12.0)[info] 58-58: Delete the apt-get lists after installing something (DL3009) [warning] 60-60: Pin versions in apt get install. Instead of (DL3008) [info] 60-60: Avoid additional packages by specifying (DL3015) [info] 60-60: Multiple consecutive (DL3059) 🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
discovery.uri=http://127.0.0.1:8080 | ||
presto.version=0.293-SNAPSHOT-faae543 | ||
presto.version=0.293-89ce0f3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Version string now diverges from directory naming used elsewhere
Recommend either:
This keeps observability tools and grep searches consistent. 🤖 Prompt for AI Agents
|
||
http-server.http.port=7777 | ||
shutdown-onset-sec=1 | ||
register-test-functions=false | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -63,20 +63,20 @@ def launch(self): | |||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Runs the benchmarked tool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute("bash -c \"python3 /home/presto/presto-server/target/presto-server-0.293-SNAPSHOT/bin/launcher.py run --etc-dir=/home/include/etc_coordinator\"", background=True) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute("bash -c \"python3 /home/presto/presto-server/target/presto-server-0.293/bin/launcher.py run --etc-dir=/home/include/etc_coordinator\"", background=True) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.wait_for_port(8080) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute("/home/presto/presto-native-execution/build/presto_cpp/main/presto_server --logtostderr=1 --etc_dir=/home/include/etc_worker", background=True) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute("/home/presto/presto-native-execution/_build/release/presto_cpp/main/presto_server --logtostderr=1 --etc_dir=/home/include/etc_worker", background=True) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.wait_for_port(7777) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
time.sleep(60) # this needs to be more than 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+66
to
70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Hard-coded versioned paths make future bumps brittle
-"/home/presto/presto-server/target/presto-server-0.293/bin/launcher.py"
+f"/home/presto/presto-server/target/presto-server-{self.properties['presto_version']}/bin/launcher.py" Populate
🤖 Prompt for AI Agents
Comment on lines
+68
to
70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Repeated polling sleep hides readiness issues A fixed This will surface crashes early and shave minutes off CI when the service starts quickly. 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
def hive_execute(self, query, check=True): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
return self.docker_execute(f'/home/presto/presto-cli/target/presto-cli-0.293-SNAPSHOT-executable.jar --catalog hive --schema {PARQUET_SCHEMA_NAME} --execute "{query}"', check) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
return self.docker_execute(f'/home/presto/presto-cli/target/presto-cli-0.293-executable.jar --catalog hive --schema {PARQUET_SCHEMA_NAME} --execute "{query}"', check) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
def ingest(self): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ingests the dataset at self.datasets_path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute(f'/home/presto/presto-cli/target/presto-cli-0.293-SNAPSHOT-executable.jar --catalog hive --schema {PARQUET_SCHEMA_NAME} --execute "CREATE SCHEMA IF NOT EXISTS hive.{PARQUET_SCHEMA_NAME};"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.docker_execute(f'/home/presto/presto-cli/target/presto-cli-0.293-executable.jar --catalog hive --schema {PARQUET_SCHEMA_NAME} --execute "CREATE SCHEMA IF NOT EXISTS hive.{PARQUET_SCHEMA_NAME};"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
72
to
80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Add type annotations + avoid positional boolean default Static analysis (Ruff ANN/F-BT) flags - def hive_execute(self, query, check=True):
+ def hive_execute(self, query: str, check: bool = True) -> str:
...
- def ingest(self):
+ def ingest(self) -> None: Improves IDE autocomplete and enforces the public API. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.12.2)72-72: Missing return type annotation for public function (ANN201) 72-72: Missing type annotation for function argument (ANN001) 72-72: Boolean default positional argument in function definition (FBT002) 72-72: Missing type annotation for function argument (ANN001) 75-75: Missing return type annotation for public function Add return type annotation: (ANN201) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
if self.pairwise_arrays: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.hive_execute(f""" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Good pinning; add HEALTHCHECK & non-root user
Pinning the ClickHouse image by digest is 👍. Consider adding:
HEALTHCHECK
so orchestration tools can detect crash-loops.Example:
📝 Committable suggestion
🧰 Tools
🪛 Checkov (3.2.334)
[LOW] 1-1: Ensure that HEALTHCHECK instructions have been added to container images
(CKV_DOCKER_2)
[LOW] 1-1: Ensure that a user for the container has been created
(CKV_DOCKER_3)
🤖 Prompt for AI Agents