[chore](dependency) fix build thirdparty errors (#8456)
1. the patch for aws-c-cal-0.4.5 does not need anymore 2. remove duplicate bit_length document 3. add some debug log for routine load
This commit is contained in:
@ -480,8 +480,7 @@ module.exports = [
|
||||
"bitand",
|
||||
"bitor",
|
||||
"bitxor",
|
||||
"bitnot",
|
||||
"bit_length"
|
||||
"bitnot"
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@ -482,8 +482,7 @@ module.exports = [
|
||||
"bitand",
|
||||
"bitor",
|
||||
"bitxor",
|
||||
"bitnot",
|
||||
"bit_length"
|
||||
"bitnot"
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
---
|
||||
{
|
||||
"title": "bit_length",
|
||||
"language": "en"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bit_length
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`INT bit_length(VARCHAR str)`
|
||||
|
||||
Return length of argument in bits.
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
MySQL> select bit_length("doris");
|
||||
+---------------------+
|
||||
| bit_length('doris') |
|
||||
+---------------------+
|
||||
| 40 |
|
||||
+---------------------+
|
||||
|
||||
MySQL [test]> select bit_length("hello world");
|
||||
+---------------------------+
|
||||
| bit_length('hello world') |
|
||||
+---------------------------+
|
||||
| 88 |
|
||||
+---------------------------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
bit_length
|
||||
@ -1,55 +0,0 @@
|
||||
---
|
||||
{
|
||||
"title": "bit_length",
|
||||
"language": "zh-CN"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bit_length
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`INT bit_length(VARCHAR str)`
|
||||
|
||||
返回字符串的bit位数
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
MySQL> select bit_length("doris");
|
||||
+---------------------+
|
||||
| bit_length('doris') |
|
||||
+---------------------+
|
||||
| 40 |
|
||||
+---------------------+
|
||||
|
||||
MySQL [test]> select bit_length("hello world");
|
||||
+---------------------------+
|
||||
| bit_length('hello world') |
|
||||
+---------------------------+
|
||||
| 88 |
|
||||
+---------------------------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
bit_length
|
||||
@ -21,10 +21,14 @@ import org.apache.doris.common.Config;
|
||||
import org.apache.doris.common.InternalErrorCode;
|
||||
import org.apache.doris.system.SystemInfoService;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* ScheduleRule: RoutineLoad PAUSED -> NEED_SCHEDULE
|
||||
*/
|
||||
public class ScheduleRule {
|
||||
private static final Logger LOG = LogManager.getLogger(ScheduleRule.class);
|
||||
|
||||
private static int deadBeCount(String clusterName) {
|
||||
SystemInfoService systemInfoService = Catalog.getCurrentSystemInfo();
|
||||
@ -43,17 +47,26 @@ public class ScheduleRule {
|
||||
return false;
|
||||
}
|
||||
if (jobRoutine.autoResumeLock) {//only manual resume for unlock
|
||||
LOG.debug("routine load job {}'s autoResumeLock is true, skip", jobRoutine.id);
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle all backends are down.
|
||||
*/
|
||||
LOG.debug("try to auto reschedule routine load {}, firstResumeTimestamp: {}, autoResumeCount: {}, " +
|
||||
"pause reason: {}",
|
||||
jobRoutine.id, jobRoutine.firstResumeTimestamp, jobRoutine.autoResumeCount,
|
||||
jobRoutine.pauseReason == null ? "null" : jobRoutine.pauseReason.getCode().name());
|
||||
if (jobRoutine.pauseReason != null && jobRoutine.pauseReason.getCode() == InternalErrorCode.REPLICA_FEW_ERR) {
|
||||
int dead = deadBeCount(jobRoutine.clusterName);
|
||||
if (dead > Config.max_tolerable_backend_down_num) {
|
||||
LOG.debug("dead backend num {} is larger than config {}, " +
|
||||
"routine load job {} can not be auto rescheduled",
|
||||
dead, Config.max_tolerable_backend_down_num, jobRoutine.id);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (jobRoutine.firstResumeTimestamp == 0) {//the first resume
|
||||
jobRoutine.firstResumeTimestamp = System.currentTimeMillis();
|
||||
jobRoutine.autoResumeCount = 1;
|
||||
|
||||
15
thirdparty/download-thirdparty.sh
vendored
15
thirdparty/download-thirdparty.sh
vendored
@ -280,18 +280,6 @@ fi
|
||||
cd -
|
||||
echo "Finished patching $HDFS3_SOURCE"
|
||||
|
||||
# aws-c-cal patch to fix compile error
|
||||
# This bug has been fixed in new version of aws-c-cal
|
||||
if [ $AWS_C_CAL_SOURCE == "aws-c-cal-0.4.5" ]; then
|
||||
cd $TP_SOURCE_DIR/$AWS_C_CAL_SOURCE
|
||||
if [ ! -f $PATCHED_MARK ]; then
|
||||
patch -p1 < $TP_PATCH_DIR/aws-c-cal-0.4.5.patch
|
||||
touch $PATCHED_MARK
|
||||
fi
|
||||
cd -
|
||||
fi
|
||||
echo "Finished patching $AWS_C_CAL_SOURCE"
|
||||
|
||||
# rocksdb patch to fix compile error
|
||||
if [ $ROCKSDB_SOURCE == "rocksdb-5.14.2" ]; then
|
||||
cd $TP_SOURCE_DIR/$ROCKSDB_SOURCE
|
||||
@ -317,7 +305,8 @@ echo "Finished patching $LIBRDKAFKA_SOURCE"
|
||||
cd $TP_SOURCE_DIR/$AWS_SDK_SOURCE
|
||||
if [ ! -f $PATCHED_MARK ]; then
|
||||
if [ $AWS_SDK_SOURCE == "aws-sdk-cpp-1.9.211" ]; then
|
||||
curl -L https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/aws-crt-cpp-1.9.211.tar.gz | tar -zx
|
||||
wget --no-check-certificate -q https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/aws-crt-cpp-1.9.211.tar.gz
|
||||
tar xzf aws-crt-cpp-1.9.211.tar.gz
|
||||
else
|
||||
bash ./prefetch_crt_dependency.sh
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user