#!/bin/bash## Licensed to the Apache Software Foundation (ASF) under one# or more contributor license agreements. See the NOTICE file# distributed with this work for additional information# regarding copyright ownership. The ASF licenses this file# to you under the Apache License, Version 2.0 (the# "License"); you may not use this file except in compliance# with the License. You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing,# software distributed under the License is distributed on an# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY# KIND, either express or implied. See the License for the# specific language governing permissions and limitations# under the License.#reCheck=1ドルif [[ "$reCheck" != "-f" ]]; thenread -p "Do you want to clean data of datanode in the IoTDB ? y/n (default n): " CLEAN_SERVICEif [[ "$CLEAN_SERVICE" != "y" && "$CLEAN_SERVICE" != "Y" ]]; thenecho "Exiting..."exit 1fifiif [ -z "${IOTDB_HOME}" ]; thenexport IOTDB_HOME="$(cd "`dirname "0ドル"`"/../..; pwd)"finohup bash ${IOTDB_HOME}/sbin/stop-datanode.sh -f >/dev/null 2>&1 &rm -rf ${IOTDB_HOME}/data/datanode/ >/dev/null 2>&1 &if [ -f "${IOTDB_HOME}/conf/iotdb-system.properties" ]; thenIOTDB_DATANODE_CONFIG="${IOTDB_HOME}/conf/iotdb-system.properties"elseIOTDB_DATANODE_CONFIG="${IOTDB_HOME}/conf/iotdb-datanode.properties"fidn_system_dir=$(echo $(grep '^dn_system_dir=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/system") | sed 's/.*=//')dn_data_dirs=$(echo $(grep '^dn_data_dirs=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/data") | sed 's/.*=//')dn_consensus_dir=$(echo $(grep '^dn_consensus_dir=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/consensus") | sed 's/.*=//')dn_wal_dirs=$(echo $(grep '^dn_wal_dirs=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/wal") | sed 's/.*=//')dn_tracing_dir=$(echo $(grep '^dn_tracing_dir=' ${IOTDB_DATANODE_CONFIG} || echo "datanode/tracing") | sed 's/.*=//')dn_sync_dir=$(echo $(grep '^dn_sync_dir=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/sync") | sed 's/.*=//')pipe_receiver_file_dirs=$(echo $(grep '^pipe_receiver_file_dirs=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/system/pipe/receiver") | sed 's/.*=//')iot_consensus_v2_receiver_file_dirs=$(echo $(grep '^iot_consensus_v2_receiver_file_dirs=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/system/pipe/consensus/receiver") | sed 's/.*=//')sort_tmp_dir=$(echo $(grep '^sort_tmp_dir=' ${IOTDB_DATANODE_CONFIG} || echo "data/datanode/tmp") | sed 's/.*=//')function clearPath {path_name=1ドルif [ -n "$path_name" ]; thenpath_name="${path_name#"${path_name%%[![:space:]]*}"}"IFS=';,' read -r -a paths <<< "$path_name"for path_name in "${paths[@]}"doif [[ $path_name == /* ]]; thenrm -rf $path_name >/dev/null 2>&1 &elserm -rf ${IOTDB_HOME}/$path_name >/dev/null 2>&1 &fidonefi}clearPath $dn_system_dirclearPath $dn_data_dirsclearPath $dn_consensus_dirclearPath $dn_wal_dirsclearPath $dn_tracing_dirclearPath $dn_sync_dirclearPath $pipe_receiver_file_dirsclearPath $iot_consensus_v2_receiver_file_dirsclearPath $sort_tmp_direcho "DataNode clean done ..."
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型