Skip to content

Commit

Permalink
[query] datafuse -> databend
Browse files Browse the repository at this point in the history
Signed-off-by: Chojan Shang <psiace@outlook.com>
  • Loading branch information
PsiACE committed Sep 14, 2021
1 parent 7672004 commit b626e19
Show file tree
Hide file tree
Showing 142 changed files with 446 additions and 446 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/datafuse-performance-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
echo $HOME
export SCCACHE_DIR=/home/runner/.cache/sccache
export RUSTC_WRAPPER=sccache
cargo build --bin=datafuse-query --bin=datafuse-store --target x86_64-unknown-linux-gnu --release
cargo build --bin=databend-query --bin=datafuse-store --target x86_64-unknown-linux-gnu --release
mkdir -p distro
sccache --show-stats
mv target/x86_64-unknown-linux-gnu/release/datafuse-query ./distro/datafuse-query
mv target/x86_64-unknown-linux-gnu/release/databend-query ./distro/databend-query
mv target/x86_64-unknown-linux-gnu/release/datafuse-store ./distro/datafuse-store
mv docker/bootstrap.sh ./distro/bootstrap.sh
- name: Set up QEMU
Expand Down Expand Up @@ -158,10 +158,10 @@ jobs:
echo $HOME
export SCCACHE_DIR=/home/runner/.cache/sccache
export RUSTC_WRAPPER=sccache
cargo build --bin=datafuse-query --bin=datafuse-store --target x86_64-unknown-linux-gnu --release
cargo build --bin=databend-query --bin=datafuse-store --target x86_64-unknown-linux-gnu --release
mkdir -p distro
sccache --show-stats
mv target/x86_64-unknown-linux-gnu/release/datafuse-query ./distro/datafuse-query
mv target/x86_64-unknown-linux-gnu/release/databend-query ./distro/databend-query
mv target/x86_64-unknown-linux-gnu/release/datafuse-store ./distro/datafuse-store
mv docker/bootstrap.sh ./distro/bootstrap.sh
- name: Set up QEMU
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/datafuse-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Pack binaries
run: |
tar -C ./target/${{ matrix.config.target }}/release -czvf datafuse-${{ steps.get_version.outputs.VERSION }}-${{ matrix.config.target }}.tar.gz datafuse-query datafuse-store
tar -C ./target/${{ matrix.config.target }}/release -czvf datafuse-${{ steps.get_version.outputs.VERSION }}-${{ matrix.config.target }}.tar.gz databend-query datafuse-store
tar -C ./target/${{ matrix.config.target }}/release -czvf databend-cli-${{ steps.get_version.outputs.VERSION }}-${{ matrix.config.target }}.tar.gz databend-cli
- name: Release datafuse
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ setup:
bash ./scripts/setup/dev_setup.sh

run: build
bash ./scripts/deploy/datafuse-query-standalone.sh release
bash ./scripts/deploy/databend-query-standalone.sh release

run-debug: build-debug
bash ./scripts/deploy/datafuse-query-standalone.sh
bash ./scripts/deploy/databend-query-standalone.sh

build:
bash ./scripts/build/build-native.sh
Expand Down Expand Up @@ -72,23 +72,23 @@ miri:
MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test

docker:
docker build --network host -f docker/Dockerfile -t ${HUB}/datafuse-query:${TAG} .
docker build --network host -f docker/Dockerfile -t ${HUB}/databend-query:${TAG} .

# experiment feature: take a look at docker/README.md for detailed multi architecture image build support
dockerx:
docker buildx build . -f ./docker/Dockerfile --platform ${PLATFORM} --allow network.host --builder host -t ${HUB}/datafuse-query:${TAG} --push
docker buildx build . -f ./docker/Dockerfile --platform ${PLATFORM} --allow network.host --builder host -t ${HUB}/databend-query:${TAG} --push

build-perf-tool:
cargo build --target x86_64-unknown-linux-gnu --bin datafuse-benchmark
cargo build --target x86_64-unknown-linux-gnu --bin databend-benchmark
mkdir -p ./distro
mv ./target/x86_64-unknown-linux-gnu/debug/datafuse-benchmark ./distro
mv ./target/x86_64-unknown-linux-gnu/debug/databend-benchmark ./distro

perf-tool: build-perf-tool
docker buildx build . -f ./docker/perf-tool/Dockerfile --platform linux/amd64 --allow network.host --builder host -t ${HUB}/perf-tool:${TAG} --push

run-helm:
helm upgrade --install datafuse ./deploy/charts/datafuse \
--set image.repository=${HUB}/datafuse-query --set image.tag=${TAG} --set configs.mysqlPort=3308
--set image.repository=${HUB}/databend-query --set image.tag=${TAG} --set configs.mysqlPort=3308

profile:
bash ./scripts/ci/ci-run-profile.sh
Expand Down
2 changes: 1 addition & 1 deletion common/flights/proto/queryflight.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020-2021 The DatafuseQuery Authors.
// Copyright 2020-2021 The DatabendQuery Authors.
//
// Code is licensed under Apache License, Version 2.0.

Expand Down
2 changes: 1 addition & 1 deletion common/flights/proto/storeflight.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020-2021 The DatafuseQuery Authors.
// Copyright 2020-2021 The DatabendQuery Authors.
//
// Code is licensed under Apache License, Version 2.0.

Expand Down
2 changes: 1 addition & 1 deletion common/functions/src/aggregates/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct Aggregators;
impl Aggregators {
pub fn register(map: FactoryFuncRef) -> Result<()> {
let mut map = map.write();
// DatafuseQuery always uses lowercase function names to get functions.
// DatabendQuery always uses lowercase function names to get functions.
map.insert("count".into(), AggregateCountFunction::try_create);
map.insert("sum".into(), try_create_aggregate_sum_function);
map.insert("avg".into(), try_create_aggregate_avg_function);
Expand Down
4 changes: 2 additions & 2 deletions common/functions/src/scalars/udfs/version_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ fn test_version_function() -> Result<()> {
nullable: false,
func: VersionFunction::try_create("version")?,
columns: vec![Series::new(vec![
"DatafuseQuery v-0.1.0-3afb26c(1.54.0-nightly-2021-06-09T07:56:09.461981495+00:00)",
"DatabendQuery v-0.1.0-3afb26c(1.54.0-nightly-2021-06-09T07:56:09.461981495+00:00)",
])
.into()],
expect: Series::new(vec![
"DatafuseQuery v-0.1.0-3afb26c(1.54.0-nightly-2021-06-09T07:56:09.461981495+00:00)",
"DatabendQuery v-0.1.0-3afb26c(1.54.0-nightly-2021-06-09T07:56:09.461981495+00:00)",
])
.into(),
error: "",
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git clone https://github.com/datafuselabs/datafuse.git

### Build Image

`make docker` to build image `datafuselabs/datafuse-query`
`make docker` to build image `datafuselabs/databend-query`

### Run Helm

Expand All @@ -21,7 +21,7 @@ when successful install you will get a note like this,

```
NOTES:
1. connect to datafuse-query mysql port:
1. connect to databend-query mysql port:
export FUSE_MYSQL_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services datafuse)
mysql -h127.0.0.1 -P$FUSE_MYSQL_PORT
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/datafuse/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
as we are using NodePort,
get into your node instance first (ie in minikube, do minikube ssh)

1. connect to datafuse-query mysql port:
1. connect to databend-query mysql port:
export FUSE_MYSQL_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "datafuse.fullname" . }})
mysql -h127.0.0.1 -P$FUSE_MYSQL_PORT

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN make setup
RUN make build

FROM debian:buster
COPY --from=builder /app/target/release/datafuse-query /datafuse-query
COPY --from=builder /app/target/release/databend-query /databend-query
COPY --from=builder /app/target/release/datafuse-store /datafuse-store
COPY --from=builder /app/docker/datafuse-query-docker.toml /datafuse-query.toml
COPY --from=builder /app/docker/databend-query-docker.toml /databend-query.toml
COPY --from=builder /app/docker/bootstrap.sh /bootstrap.sh
ENTRYPOINT ["/bootstrap.sh"]
4 changes: 2 additions & 2 deletions docker/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/datafuse-store --single true &> /tmp/datafuse-store.log &
P1=$!
/datafuse-query -c datafuse-query.toml &> /tmp/datafuse-query.log &
/databend-query -c databend-query.toml &> /tmp/databend-query.log &
P2=$!

tail -f /tmp/datafuse-query.log &
tail -f /tmp/databend-query.log &
P3=$!

tail -f /tmp/datafuse-store.log &
Expand Down
2 changes: 1 addition & 1 deletion docker/cache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM debian:bullseye
COPY ./distro/datafuse-query /datafuse-query
COPY ./distro/databend-query /databend-query
COPY ./distro/datafuse-store /datafuse-store
COPY ./distro/bootstrap.sh /bootstrap.sh
ENTRYPOINT ["/bootstrap.sh"]
8 changes: 4 additions & 4 deletions docker/datafuse-query-docker.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Usage:
# datafuse-query -c datafuse_query_config_spec.toml
# databend-query -c databend_query_config_spec.toml

# Log level.
log_level = "DEBUG"

# DatafuseQuery rpc address.
# DatabendQuery rpc address.
# For flight rpc.
flight_api_address = "0.0.0.0:9091"

# DatafuseQuery http address.
# DatabendQuery http address.
# For admin RESET API.
http_api_address = "0.0.0.0:8081"

# DatafuseQuery metrics RESET API.
# DatabendQuery metrics RESET API.
metric_api_address = "0.0.0.0:7071"

# MySQL Handler.
Expand Down
4 changes: 2 additions & 2 deletions docker/perf-tool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM python:3
COPY ./tests/perfs/perfs.py /perfs.py
COPY ./tests/perfs/compare.py /compare.py
COPY ./distro/datafuse-benchmark /datafuse-benchmark
COPY ./distro/databend-benchmark /databend-benchmark

COPY ./tests/perfs/perfs.yaml /perfs.yaml

RUN pip install --no-cache-dir pyyaml \
&& pip install -U cos-python-sdk-v5 \
&& python3 -m pip install configargparse\
&& pip install wget
ENV BIN_LOCATION "/datafuse-benchmark"
ENV BIN_LOCATION "/databend-benchmark"
ENV SERVER_HOST "127.0.0.1"
ENV SERVER_PORT "9090"
ENV ITERATION "3"
Expand Down
6 changes: 3 additions & 3 deletions docker/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ RUN update-ca-certificates -f
RUN chmod +x /install.sh
RUN /install.sh $version
# double check whether binaries could run on host architecture
RUN timeout 3 /root/.datafuse/bin/datafuse-query || true
RUN timeout 3 /root/.datafuse/bin/databend-query || true
RUN timeout 3 /root/.datafuse/bin/datafuse-store || true
# CI environment build image under GLIBC 2.29 and debian:buster only run GLIBC 2.28
FROM debian:bullseye
COPY --from=installer /root/.datafuse/bin/datafuse-query /datafuse-query
COPY --from=installer /root/.datafuse/bin/databend-query /databend-query
COPY --from=installer /root/.datafuse/bin/datafuse-store /datafuse-store
COPY ./docker/bootstrap.sh /bootstrap.sh
COPY ./docker/datafuse-query-docker.toml /datafuse-query.toml
COPY ./docker/databend-query-docker.toml /databend-query.toml
ENTRYPOINT ["/bootstrap.sh"]
2 changes: 1 addition & 1 deletion docker/stateless/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN make setup
RUN make build

FROM ubuntu:20.04
COPY --from=builder /app/target/release/datafuse-query /datafuse-query
COPY --from=builder /app/target/release/databend-query /databend-query
COPY --from=builder /app/tests /tests

RUN apt-get update -y \
Expand Down
4 changes: 2 additions & 2 deletions docker/stateless/run.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

set -e -x -a
sudo nohup /datafuse-query &
sudo nohup /databend-query &

sleep 5

function run_tests()
{
cd tests
mkdir -p test_output
./datafuse-test --print-time --jobs 4
./databend-test --print-time --jobs 4
}

export -f run_tests
Expand Down
10 changes: 5 additions & 5 deletions query/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "datafuse-query"
name = "databend-query"
version = "0.1.0"
description = "A real-time Cloud Distributed Query Engine"
authors = ["Datafuse Authors <opensource@datafuselabs.com>"]
Expand All @@ -8,12 +8,12 @@ publish = false
edition = "2021"

[[bin]]
name = "datafuse-query"
path = "src/bin/datafuse-query.rs"
name = "databend-query"
path = "src/bin/databend-query.rs"

[[bin]]
name = "datafuse-benchmark"
path = "src/bin/datafuse-benchmark.rs"
name = "databend-benchmark"
path = "src/bin/databend-benchmark.rs"

[features]
default = ["simd"]
Expand Down
4 changes: 2 additions & 2 deletions query/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DatafuseQuery
# DatabendQuery

DatafuseQuery is a Distributed Query Engine at scale.
DatabendQuery is a Distributed Query Engine at scale.
6 changes: 3 additions & 3 deletions query/benches/suites/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use common_exception::Result;
use common_planners::PlanNode;
use common_runtime::tokio;
use criterion::Criterion;
use datafuse_query::interpreters::SelectInterpreter;
use datafuse_query::sql::PlanParser;
use datafuse_query::tests::try_create_session_mgr;
use databend_query::interpreters::SelectInterpreter;
use databend_query::sql::PlanParser;
use databend_query::tests::try_create_session_mgr;
use futures::StreamExt;

pub mod bench_aggregate_query_sql;
Expand Down
2 changes: 1 addition & 1 deletion query/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ path = "fuzz_targets/fuzz_parse_sql.rs"

[dependencies]
honggfuzz = "0.5.54"
datafuse-query = { path = ".." }
databend-query = { path = ".." }
2 changes: 1 addition & 1 deletion query/fuzz/fuzz_targets/fuzz_parse_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use datafuse_query::sql::DfParser;
use databend_query::sql::DfParser;
use honggfuzz::fuzz;

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion query/src/api/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

DatafuseQuery API(including Flight&HTTP) for the interaction.
DatabendQuery API(including Flight&HTTP) for the interaction.
4 changes: 2 additions & 2 deletions query/src/api/http/v1/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub async fn cluster_add_handler(
}

// GET /v1/cluster/list
// list all nodes in current datafuse-query cluster
// list all nodes in current databend-query cluster
// request: None
// cluster_state: the shared in memory state which store all nodes known to current node
// return: return a list of cluster node information
Expand All @@ -134,7 +134,7 @@ pub async fn cluster_list_handler(
}

// POST /v1/cluster/remove
// remove a node based on name in current datafuse-query cluster
// remove a node based on name in current databend-query cluster
// request: Node to be deleted
// cluster_state: the shared in memory state which store all nodes known to current node
// return: return Ok status code when delete success
Expand Down
Loading

0 comments on commit b626e19

Please sign in to comment.