diff --git a/be/src/exec/operator/result_sink_operator.h b/be/src/exec/operator/result_sink_operator.h index bada2ed61c0e10..d0980d58c9cd3c 100644 --- a/be/src/exec/operator/result_sink_operator.h +++ b/be/src/exec/operator/result_sink_operator.h @@ -29,8 +29,6 @@ class DorisArrowSchemaConvertor; class ResultBlockBufferBase; struct ResultFileOptions { - // [[deprecated]] - bool is_local_file; std::string file_path; TFileFormatType::type file_format; std::string column_separator; @@ -39,18 +37,12 @@ struct ResultFileOptions { std::vector broker_addresses; std::map broker_properties; std::string success_file_name; - std::vector> schema; //not use in outfile with parquet format - std::map file_properties; //not use in outfile with parquet format std::vector parquet_schemas; TParquetCompressionType::type parquet_commpression_type; TParquetVersion::type parquet_version; bool parquert_disable_dictionary = false; bool enable_int96_timestamps = true; - //note: use outfile with parquet format, have deprecated 9:schema and 10:file_properties - //But in order to consider the compatibility when upgrading, so add a bool to check - //Now the code version is 1.1.2, so when the version is after 1.2, could remove this code. - bool is_refactor_before_flag = false; std::string orc_schema; TFileCompressType::type orc_compression_type; // currently only for csv @@ -85,10 +77,8 @@ struct ResultFileOptions { file_name_padding = t_opt.file_name_padding; } - is_local_file = true; if (t_opt.__isset.broker_addresses) { broker_addresses = t_opt.broker_addresses; - is_local_file = false; } if (t_opt.__isset.broker_properties) { broker_properties = t_opt.broker_properties; @@ -96,15 +86,7 @@ struct ResultFileOptions { if (t_opt.__isset.success_file_name) { success_file_name = t_opt.success_file_name; } - if (t_opt.__isset.schema) { - schema = t_opt.schema; - is_refactor_before_flag = true; - } - if (t_opt.__isset.file_properties) { - file_properties = t_opt.file_properties; - } if (t_opt.__isset.parquet_schemas) { - is_refactor_before_flag = false; parquet_schemas = t_opt.parquet_schemas; } if (t_opt.__isset.parquet_compression_type) { diff --git a/be/src/runtime/descriptors.cpp b/be/src/runtime/descriptors.cpp index 6cdb5b23d00426..53a2c8ce862b43 100644 --- a/be/src/runtime/descriptors.cpp +++ b/be/src/runtime/descriptors.cpp @@ -288,14 +288,10 @@ std::string IcebergTableDescriptor::debug_string() const { MaxComputeTableDescriptor::MaxComputeTableDescriptor(const TTableDescriptor& tdesc) : TableDescriptor(tdesc), - _region(tdesc.mcTable.region), _project(tdesc.mcTable.project), _table(tdesc.mcTable.table), - _odps_url(tdesc.mcTable.odps_url), - _tunnel_url(tdesc.mcTable.tunnel_url), _access_key(tdesc.mcTable.access_key), - _secret_key(tdesc.mcTable.secret_key), - _public_access(tdesc.mcTable.public_access) { + _secret_key(tdesc.mcTable.secret_key) { if (tdesc.mcTable.__isset.endpoint) { _endpoint = tdesc.mcTable.endpoint; } else { diff --git a/be/src/runtime/descriptors.h b/be/src/runtime/descriptors.h index ebf540abec1d9d..86b34e9bc44fa7 100644 --- a/be/src/runtime/descriptors.h +++ b/be/src/runtime/descriptors.h @@ -225,28 +225,18 @@ class MaxComputeTableDescriptor : public TableDescriptor { MaxComputeTableDescriptor(const TTableDescriptor& tdesc); ~MaxComputeTableDescriptor() override; std::string debug_string() const override; - std::string region() const { return _region; } std::string project() const { return _project; } std::string table() const { return _table; } - std::string odps_url() const { return _odps_url; } - std::string tunnel_url() const { return _tunnel_url; } - std::string access_key() const { return _access_key; } - std::string secret_key() const { return _secret_key; } - std::string public_access() const { return _public_access; } std::string endpoint() const { return _endpoint; } std::string quota() const { return _quota; } Status init_status() const { return _init_status; } std::map properties() const { return _props; } private: - std::string _region; //deprecated std::string _project; std::string _table; - std::string _odps_url; //deprecated - std::string _tunnel_url; //deprecated - std::string _access_key; //deprecated - std::string _secret_key; //deprecated - std::string _public_access; //deprecated + std::string _access_key; //deprecated + std::string _secret_key; //deprecated std::string _endpoint; std::string _quota; std::map _props; diff --git a/be/src/storage/olap_common.h b/be/src/storage/olap_common.h index e194ae66fb6c9a..e16a04783d19f5 100644 --- a/be/src/storage/olap_common.h +++ b/be/src/storage/olap_common.h @@ -164,10 +164,8 @@ enum class FieldAggregationMethod { }; enum class PushType { - PUSH_NORMAL = 1, // for broker/hadoop load, not used any more - PUSH_FOR_DELETE = 2, // for delete - PUSH_FOR_LOAD_DELETE = 3, // not used any more - PUSH_NORMAL_V2 = 4, // for spark load + PUSH_FOR_DELETE = 2, // for delete + PUSH_NORMAL_V2 = 4, // for spark load }; // , such as <100, 110> @@ -254,10 +252,6 @@ struct OlapReaderStatistics { int64_t block_fetch_ns = 0; // time of rowset reader's `next_batch()` call int64_t block_load_ns = 0; int64_t blocks_load = 0; - // Not used any more, will be removed after non-vectorized code is removed - int64_t block_seek_num = 0; - // Not used any more, will be removed after non-vectorized code is removed - int64_t block_seek_ns = 0; // block_load_ns // block_init_ns diff --git a/cloud/test/CMakeLists.txt b/cloud/test/CMakeLists.txt index 32151459472c8e..47124cad5b05a5 100644 --- a/cloud/test/CMakeLists.txt +++ b/cloud/test/CMakeLists.txt @@ -23,7 +23,6 @@ set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/test") set(TEST_LINK_LIBS ResourceManager ${TEST_LINK_LIBS}) -#add_executable(sync_point_test sync_point_test.cpp) add_executable(blob_message_test blob_message_test.cpp) add_executable(clone_chain_reader_test clone_chain_reader_test.cpp) @@ -154,7 +153,6 @@ add_executable(versioned_value_test versioned_value_test.cpp) add_executable(bvars_test bvars_test.cpp) message("Meta-service test dependencies: ${TEST_LINK_LIBS}") -#target_link_libraries(sync_point_test ${TEST_LINK_LIBS}) target_link_libraries(blob_message_test ${TEST_LINK_LIBS}) diff --git a/cloud/test/sync_point_test.cpp b/cloud/test/sync_point_test.cpp deleted file mode 100644 index 4758cf9ca91213..00000000000000 --- a/cloud/test/sync_point_test.cpp +++ /dev/null @@ -1,340 +0,0 @@ -// 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. - -// switch on syncpoint macro -#ifndef UNIT_TEST -#define UNIT_TEST -#endif -#include "cpp/sync_point.h" - -#include -#include -#include -#include - -#define STDOUT (std::cout << __PRETTY_FUNCTION__ << " ") - -int g_data = 12315; - -void foo() { - int a = 10086; - - STDOUT << "a: " << a << std::endl; - - TEST_SYNC_POINT_CALLBACK("foo:a_assigned", &a); // a may be accessed - - STDOUT << "a: " << a << std::endl; - - int b = 100; - - STDOUT << "b: " << b << std::endl; - TEST_SYNC_POINT_CALLBACK("foo:b_assigned", &b); // b may be accessed - - STDOUT << "b: " << b << std::endl; - - a += b; - - STDOUT << "a: " << a << std::endl; - - if (a == 10086 + 100) { - STDOUT << "expected branch taken, a: " << a << std::endl; - } else { - STDOUT << "exceptional branch taken, a: " << a << std::endl; - } -} - -void test_foo_single_thread() { - auto sp = doris::SyncPoint::get_instance(); - std::cout << "========== default behavior ==========" << std::endl; - foo(); // first run, nothing changed - - std::cout << "========== change default behavior ==========" << std::endl; - sp->set_call_back("foo:a_assigned", [](void* arg) { - int& a = *reinterpret_cast(arg); // we known what arg is - STDOUT << "original a: " << a << std::endl; - a = 10010; - STDOUT << "change a: " << a << std::endl; - }); - - sp->set_call_back("foo:b_assigned", [](void* arg) { - int& b = *reinterpret_cast(arg); // we known what arg is - STDOUT << "original b: " << b << std::endl; - b = 200; - STDOUT << "change b: " << b << std::endl; - }); - - sp->enable_processing(); // turn on - foo(); - - sp->clear_all_call_backs(); - sp->disable_processing(); - sp->clear_trace(); -} - -void foo(int x) { - // multi-thread data race - g_data = x; - - TEST_SYNC_POINT("foo:assigned:1"); - // concurrent stuff may be executed by other thread here, - // and this thread may race with it - TEST_SYNC_POINT("foo:assigned:2"); - - STDOUT << x << std::endl; -} - -void bar() { - TEST_SYNC_POINT("bar:assigned:1"); - g_data = 10086; - TEST_SYNC_POINT("bar:assigned:2"); -} - -void test_foo_data_race() { - std::cout << "========== data race ==========" << std::endl; - - std::mutex mtx; - std::condition_variable cv; - auto sp = doris::SyncPoint::get_instance(); - - bool go = false; - std::unique_lock lk(mtx); - g_data = 0; - - // =========================================================================== - // FORCE threads concurrent execution with sequence: - // - // thread1 thread2 thread3 - // | | | - // | | foo(3) - // | | | - // | foo(2) | - // | | | - // foo(1) | | - // | | | - // v v v - // - std::thread th1([&] { - { - std::unique_lock lk(mtx); - cv.wait(lk, [&] { return go; }); - } - TEST_SYNC_POINT("test_foo_data_race:1:start"); - assert(g_data == 2); - foo(1); - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - assert(g_data == 1); - TEST_SYNC_POINT("test_foo_data_race:1:end"); - }); - std::thread th2([&] { - { - std::unique_lock lk(mtx); - cv.wait(lk, [&] { return go; }); - } - TEST_SYNC_POINT("test_foo_data_race:2:start"); - assert(g_data == 3); - foo(2); - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - assert(g_data == 2); - TEST_SYNC_POINT("test_foo_data_race:2:end"); - }); - std::thread th3([&] { - { - std::unique_lock lk(mtx); - cv.wait(lk, [&] { return go; }); - } - TEST_SYNC_POINT("test_foo_data_race:3:start"); - assert(g_data == 0); - foo(3); - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - assert(g_data == 3); - TEST_SYNC_POINT("test_foo_data_race:3:end"); - }); - - // prepare dependency - sp->enable_processing(); - // run foo(int) in sequence 3->2->1 - sp->load_dependency({ - {"test_foo_data_race:3:end", "test_foo_data_race:2:start"}, - {"test_foo_data_race:2:end", "test_foo_data_race:1:start"}, - }); - - // set and go - go = true; - lk.unlock(); - cv.notify_all(); - - th1.join(); - th2.join(); - th3.join(); - sp->clear_all_call_backs(); - sp->clear_trace(); - sp->disable_processing(); - - // =========================================================================== - // FORCE to run bar() in the middle of foo() - // - // thread4 thread5 - // | | - // | foo():assigned:1 - // | | - // bar() | - // | | - // | foo():assigned:2 - // | | - // v v - // - lk.lock(); - go = false; - - std::thread th4([&] { - { - std::unique_lock lk(mtx); - cv.wait(lk, [&] { return go; }); - } - bar(); - }); - std::thread th5([&] { - { - std::unique_lock lk(mtx); - cv.wait(lk, [&] { return go; }); - } - foo(10010); // try to set g_data to 10010 - assert(g_data == 10086); // foo() is racing with bar() - }); - - // prepare dependency - sp->enable_processing(); - sp->load_dependency({ - {"foo:assigned:1", "bar:assigned:1"}, // no need to specify bar1->bar2, - {"bar:assigned:2", "foo:assigned:2"}, // because they a natually sequenced - }); - - // set and go - go = true; - lk.unlock(); - cv.notify_all(); - - th4.join(); - th5.join(); - sp->clear_all_call_backs(); - sp->clear_trace(); - - sp->disable_processing(); -} - -int foo_return_with_value() { - int ctx = 1; - (void)ctx; - // for those return values are not explictly declared - { - // for ctx capture - TEST_SYNC_POINT_CALLBACK("foo_return_with_value1_ctx", &ctx); - - int tmp_ret = -1; - (void)tmp_ret; // supress `unused` warning when build in release mode - TEST_SYNC_POINT_RETURN_WITH_VALUE("foo_return_with_value1", &tmp_ret); - } - - // for those return valuse are explicitly declared - { - int ret = -1; - TEST_SYNC_POINT_RETURN_WITH_VALUE("foo_return_with_value2", &ret); - return ret; - } -} - -void foo_return_with_void(int* in) { - *in = 10000; - TEST_SYNC_POINT_RETURN_WITH_VOID("foo_return_with_void1"); - *in = 10010; - TEST_SYNC_POINT_RETURN_WITH_VOID("foo_return_with_void2"); - *in = 10086; -} - -void test_return_point() { - auto sp = doris::SyncPoint::get_instance(); - sp->clear_all_call_backs(); - sp->enable_processing(); - - // test pred == false, nothing happens - { - sp->clear_all_call_backs(); - - sp->set_call_back("foo_return_with_value1", - [](void* ret) { *reinterpret_cast(ret) = -1; }); - sp->set_call_back("foo_return_with_value1::pred", - [](void* pred) { *reinterpret_cast(pred) = false; }); - - sp->set_call_back("foo_return_with_void1::pred", - [](void* pred) { *reinterpret_cast(pred) = false; }); - - int ret = foo_return_with_value(); - assert(ret == -1); - - foo_return_with_void(&ret); - assert(ret == 10086); - } - - // test pred == true, get the value and return point we want - { - sp->clear_all_call_backs(); - sp->set_call_back("foo_return_with_value2", - [](void* ret) { *reinterpret_cast(ret) = 10086; }); - sp->set_call_back("foo_return_with_value2::pred", - [](void* pred) { *reinterpret_cast(pred) = true; }); - - sp->set_call_back("foo_return_with_void2::pred", - [](void* pred) { *reinterpret_cast(pred) = true; }); - - int ret = foo_return_with_value(); - assert(ret == 10086); - - foo_return_with_void(&ret); - assert(ret == 10010); - } - - // pred depends on tested thread's context - { - sp->clear_all_call_backs(); - int* ctx; - // "steal" context from tested thread to this testing thread in order to - // change behaviors of the tested thread without changing it's code - sp->set_call_back("foo_return_with_value1_ctx", - [&ctx](void* tested_ctx) { ctx = reinterpret_cast(tested_ctx); }); - sp->set_call_back("foo_return_with_value1", - [](void* ret) { *reinterpret_cast(ret) = 10086; }); - // use the context from tested thread to do more checks and modifications - sp->set_call_back("foo_return_with_value1::pred", [&ctx](void* pred) { - // we can change the return logic of the tested thread - *reinterpret_cast(pred) = (*ctx > 0); // true - }); - - [[maybe_unused]] int ret = foo_return_with_value(); - assert(ret == 10086); - } -} - -void test() { - // test_foo_single_thread(); - // test_foo_data_race(); - test_return_point(); -} - -int main() { - test(); - return 0; -} diff --git a/fe/fe-core/src/main/java/org/apache/doris/auth/certificate/CertificateRuntimeAuthFactory.java b/fe/fe-core/src/main/java/org/apache/doris/auth/certificate/CertificateRuntimeAuthFactory.java index 995d3176fd5df9..4bcf9a76115950 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/auth/certificate/CertificateRuntimeAuthFactory.java +++ b/fe/fe-core/src/main/java/org/apache/doris/auth/certificate/CertificateRuntimeAuthFactory.java @@ -52,8 +52,4 @@ public static CertificateRuntimeAuthService getInstance() { } } - @Deprecated - public static CertificateRuntimeAuthService create() { - return getInstance(); - } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceClient.java b/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceClient.java index 5ad4f7839885cf..33b383b9ca9c31 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceClient.java +++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceClient.java @@ -490,21 +490,6 @@ public Cloud.AlterClusterResponse alterCluster(Cloud.AlterClusterRequest request .alterCluster(request); } - /** - * This method is deprecated, there is no code to call it. - */ - @Deprecated - public Cloud.AlterObjStoreInfoResponse alterObjStoreInfo(Cloud.AlterObjStoreInfoRequest request) { - if (!request.hasCloudUniqueId()) { - Cloud.AlterObjStoreInfoRequest.Builder builder = Cloud.AlterObjStoreInfoRequest.newBuilder(); - builder.mergeFrom(request); - return blockingStub.withDeadlineAfter(Config.meta_service_brpc_timeout_ms, TimeUnit.MILLISECONDS) - .alterObjStoreInfo(builder.setCloudUniqueId(Config.cloud_unique_id).build()); - } - return blockingStub.withDeadlineAfter(Config.meta_service_brpc_timeout_ms, TimeUnit.MILLISECONDS) - .alterObjStoreInfo(request); - } - public Cloud.AlterObjStoreInfoResponse alterStorageVault(Cloud.AlterObjStoreInfoRequest request) { if (!request.hasCloudUniqueId()) { Cloud.AlterObjStoreInfoRequest.Builder builder = Cloud.AlterObjStoreInfoRequest.newBuilder(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceProxy.java b/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceProxy.java index 38b205c7a12873..c0069ea847ef1f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceProxy.java +++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceProxy.java @@ -599,16 +599,6 @@ public Cloud.RemoveDeleteBitmapUpdateLockResponse removeDeleteBitmapUpdateLock( Cloud.RemoveDeleteBitmapUpdateLockResponse::getStatus); } - /** - * This method is deprecated, there is no code to call it. - */ - @Deprecated - public Cloud.AlterObjStoreInfoResponse alterObjStoreInfo(Cloud.AlterObjStoreInfoRequest request) - throws RpcException { - return executeWithMetrics("alterObjStoreInfo", (client) -> client.alterObjStoreInfo(request), - Cloud.AlterObjStoreInfoResponse::getStatus); - } - public Cloud.AlterObjStoreInfoResponse alterStorageVault(Cloud.AlterObjStoreInfoRequest request) throws RpcException { return executeWithMetrics("alterStorageVault", (client) -> client.alterStorageVault(request), diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/S3Util.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/S3Util.java index f6c2fcf9c7c644..0011cb3071d689 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/S3Util.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/S3Util.java @@ -21,13 +21,11 @@ import org.apache.doris.common.Config; import org.apache.doris.common.InternalErrorCode; import org.apache.doris.common.UserException; -import org.apache.doris.common.credentials.CloudCredential; import com.google.common.base.Strings; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; -import software.amazon.awssdk.auth.credentials.AwsCredentials; import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider; import software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain; import software.amazon.awssdk.auth.credentials.AwsSessionCredentials; @@ -64,66 +62,6 @@ public class S3Util { private static final Logger LOG = LogManager.getLogger(Util.class); - private static AwsCredentialsProvider getAwsCredencialsProvider(CloudCredential credential) { - AwsCredentials awsCredential; - AwsCredentialsProvider awsCredentialsProvider; - if (!credential.isTemporary()) { - awsCredential = AwsBasicCredentials.create(credential.getAccessKey(), credential.getSecretKey()); - } else { - awsCredential = AwsSessionCredentials.create(credential.getAccessKey(), credential.getSecretKey(), - credential.getSessionToken()); - } - - if (!credential.isWhole()) { - awsCredentialsProvider = AwsCredentialsProviderChain.of( - SystemPropertyCredentialsProvider.create(), - EnvironmentVariableCredentialsProvider.create(), - WebIdentityTokenFileCredentialsProvider.create(), - ProfileCredentialsProvider.create(), - InstanceProfileCredentialsProvider.create()); - } else { - awsCredentialsProvider = StaticCredentialsProvider.create(awsCredential); - } - - return awsCredentialsProvider; - } - - @Deprecated - public static S3Client buildS3Client(String endpoint, String region, CloudCredential credential, - boolean isUsePathStyle) { - EqualJitterBackoffStrategy backoffStrategy = EqualJitterBackoffStrategy - .builder() - .baseDelay(Duration.ofSeconds(1)) - .maxBackoffTime(Duration.ofMinutes(1)) - .build(); - // retry 3 time with Equal backoff - RetryPolicy retryPolicy = RetryPolicy - .builder() - .numRetries(3) - .backoffStrategy(backoffStrategy) - .build(); - ClientOverrideConfiguration clientConf = ClientOverrideConfiguration - .builder() - // set retry policy - .retryPolicy(retryPolicy) - // using AwsS3V4Signer - .putAdvancedOption(SdkAdvancedClientOption.SIGNER, AwsS3V4Signer.create()) - .build(); - return S3Client.builder() - .httpClient(UrlConnectionHttpClient.builder().socketTimeout(Duration.ofSeconds(30)) - .connectionTimeout(Duration.ofSeconds(30)).build()) - .endpointOverride(URI.create(buildEndpointUrl(endpoint))) - .credentialsProvider(getAwsCredencialsProvider(credential)) - .region(Region.of(region)) - .overrideConfiguration(clientConf) - // disable chunkedEncoding because of bos not supported - .serviceConfiguration(S3Configuration.builder() - .chunkedEncodingEnabled(false) - .pathStyleAccessEnabled(isUsePathStyle) - .build()) - .build(); - } - /** * Using (accessKey, secretKey) or roleArn for creating different credentials provider when creating s3client * @param endpoint AWS endpoint (eg: "https://s3.us-east-1.amazonaws.com") diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/DppConfig.java b/fe/fe-core/src/main/java/org/apache/doris/load/DppConfig.java deleted file mode 100644 index c1ee58b79f2205..00000000000000 --- a/fe/fe-core/src/main/java/org/apache/doris/load/DppConfig.java +++ /dev/null @@ -1,84 +0,0 @@ -// 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. - -package org.apache.doris.load; - -import org.apache.doris.common.io.Text; -import org.apache.doris.thrift.TPriority; - -import com.google.common.collect.Maps; -import com.google.gson.annotations.SerializedName; - -import java.io.DataInput; -import java.io.IOException; -import java.util.Map; - -@Deprecated -public class DppConfig { - // palo base path in hadoop - // dpp: paloPath/cluster_id/applications/dpp_version - // output: paloPath/cluster_id/output - @SerializedName(value = "paloPath") - private String paloPath; - @SerializedName(value = "httpPort") - private int httpPort; - @SerializedName(value = "hadoopConfigs") - private Map hadoopConfigs; - // priority for palo internal schedule - // for now are etl submit schedule and download file schedule - @SerializedName(value = "priority") - private TPriority priority; - - // for persist - public DppConfig() { - this(null, -1, null, null); - } - - private DppConfig(String paloPath, int httpPort, Map hadoopConfigs, TPriority priority) { - this.paloPath = paloPath; - this.httpPort = httpPort; - this.hadoopConfigs = hadoopConfigs; - this.priority = priority; - } - - @Deprecated - public void readFields(DataInput in) throws IOException { - boolean readPaloPath = false; - if (in.readBoolean()) { - readPaloPath = true; - } - if (readPaloPath) { - paloPath = Text.readString(in); - } - - httpPort = in.readInt(); - - boolean readHadoopConfigs = false; - if (in.readBoolean()) { - readHadoopConfigs = true; - } - if (readHadoopConfigs) { - hadoopConfigs = Maps.newHashMap(); - int count = in.readInt(); - for (int i = 0; i < count; ++i) { - hadoopConfigs.put(Text.readString(in), Text.readString(in)); - } - } - - this.priority = TPriority.valueOf(Text.readString(in)); - } -} diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PrivEntry.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PrivEntry.java index 79305b4353a862..452515f49d4ca5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PrivEntry.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PrivEntry.java @@ -77,11 +77,6 @@ public void setPrivSet(PrivBitSet privSet) { this.privSet = privSet; } - @Deprecated - public void setSetByDomainResolver(boolean isSetByDomainResolver) { - this.isSetByDomainResolver = isSetByDomainResolver; - } - public abstract boolean keyMatch(PrivEntry other); @Deprecated diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java index 68addc21ffce20..bc8925b5b8ba88 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java @@ -2503,36 +2503,6 @@ public void logRefreshExternalTable(ExternalObjectLog log) { logEdit(OperationType.OP_REFRESH_EXTERNAL_TABLE, log); } - @Deprecated - public void logDropExternalTable(ExternalObjectLog log) { - logEdit(OperationType.OP_DROP_EXTERNAL_TABLE, log); - } - - @Deprecated - public void logCreateExternalTable(ExternalObjectLog log) { - logEdit(OperationType.OP_CREATE_EXTERNAL_TABLE, log); - } - - @Deprecated - public void logDropExternalDatabase(ExternalObjectLog log) { - logEdit(OperationType.OP_DROP_EXTERNAL_DB, log); - } - - @Deprecated - public void logCreateExternalDatabase(ExternalObjectLog log) { - logEdit(OperationType.OP_CREATE_EXTERNAL_DB, log); - } - - @Deprecated - public void logAddExternalPartitions(ExternalObjectLog log) { - logEdit(OperationType.OP_ADD_EXTERNAL_PARTITIONS, log); - } - - @Deprecated - public void logDropExternalPartitions(ExternalObjectLog log) { - logEdit(OperationType.OP_DROP_EXTERNAL_PARTITIONS, log); - } - public void logInvalidateExternalPartitions(ExternalObjectLog log) { logEdit(OperationType.OP_REFRESH_EXTERNAL_PARTITIONS, log); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java index 3fa8a9698a2b8c..9f9c7a75431ebe 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java @@ -670,42 +670,6 @@ public void setNumInstances(int numInstances) { this.numInstances = numInstances; } - @Deprecated - public void appendTrace(StringBuilder sb) { - sb.append(planNodeName); - if (!children.isEmpty()) { - sb.append("("); - int idx = 0; - for (PlanNode child : children) { - if (idx++ != 0) { - sb.append(","); - } - child.appendTrace(sb); - } - sb.append(")"); - } - } - - /** - * find planNode recursively based on the planNodeId - */ - @Deprecated - public static PlanNode findPlanNodeFromPlanNodeId(PlanNode root, PlanNodeId id) { - if (root == null || root.getId() == null || id == null) { - return null; - } else if (root.getId().equals(id)) { - return root; - } else { - for (PlanNode child : root.getChildren()) { - PlanNode retNode = findPlanNodeFromPlanNodeId(child, id); - if (retNode != null) { - return retNode; - } - } - return null; - } - } - public String getPlanTreeExplainStr() { StringBuilder sb = new StringBuilder(); sb.append("[").append(getId().asInt()).append(": ").append(getPlanNodeName()).append("]"); diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/QeService.java b/fe/fe-core/src/main/java/org/apache/doris/qe/QeService.java index e070e602cd821f..9bebcb0c106208 100755 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/QeService.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/QeService.java @@ -18,7 +18,6 @@ package org.apache.doris.qe; import org.apache.doris.qe.help.HelpModule; -import org.apache.doris.service.ExecuteEnv; import org.apache.doris.tls.server.FeServerStarterFactory; import org.apache.doris.tls.server.ServerStarter; @@ -37,11 +36,6 @@ public class QeService { private final ServerStarter mysqlStarter; private final ServerStarter flightStarter; - @Deprecated - public QeService(int port, int arrowFlightSQLPort) { - this(port, arrowFlightSQLPort, ExecuteEnv.getInstance().getScheduler()); - } - public QeService(int port, int arrowFlightSQLPort, ConnectScheduler scheduler) { this.port = port; this.arrowFlightSQLPort = arrowFlightSQLPort; diff --git a/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/CloudPartitionTest.java b/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/CloudPartitionTest.java index 63889a798b9549..cf2822700f46d3 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/CloudPartitionTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/CloudPartitionTest.java @@ -25,7 +25,6 @@ import org.apache.doris.rpc.RpcException; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.mockito.Mockito; @@ -37,10 +36,6 @@ public class CloudPartitionTest { - @Disabled - public void getCachedVisibleVersion() { - } - public static CloudPartition createPartition(long pId, long dbId, long tblId) { return new CloudPartition(pId, "p" + pId, null, null, dbId, tblId); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/common/parquet/ParquetReaderTest.java b/fe/fe-core/src/test/java/org/apache/doris/common/parquet/ParquetReaderTest.java deleted file mode 100644 index 6953638af187a5..00000000000000 --- a/fe/fe-core/src/test/java/org/apache/doris/common/parquet/ParquetReaderTest.java +++ /dev/null @@ -1,60 +0,0 @@ -// 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. - -package org.apache.doris.common.parquet; - -import org.apache.doris.analysis.BrokerDesc; - -import com.google.common.collect.Maps; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.Map; - -public class ParquetReaderTest { - private static final Logger LOG = LogManager.getLogger(ParquetReaderTest.class); - - // you need to set - // localfile, remote file - // ak, sk, broker desc - // before running this test - @Disabled - @Test - public void testWrongFormat() { - try { - // local - String file = "/path/to/local/all_type_none.parquet"; - ParquetReader reader = ParquetReader.create(file); - LOG.info(reader.getSchema(false)); - - // remote - String file2 = "bos://cmy-repe/all_type_none.parquet"; - Map properties = Maps.newHashMap(); - properties.put("bos_endpoint", "http://bj.bcebos.com"); - properties.put("bos_accesskey", "1"); - properties.put("bos_secret_accesskey", "2"); - BrokerDesc brokerDesc = new BrokerDesc("dummy", properties); - - ParquetReader reader2 = ParquetReader.create(file2, brokerDesc, "127.0.0.1", 8118); - LOG.info(reader2.getSchema(false)); - } catch (Exception e) { - LOG.info("error: ", e); - } - } -} diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java deleted file mode 100644 index 86c34f189243c8..00000000000000 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java +++ /dev/null @@ -1,63 +0,0 @@ -// 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. - -package org.apache.doris.nereids.memo; - -// import org.apache.doris.nereids.CascadesContext; -// import org.apache.doris.nereids.trees.plans.JoinType; -// import org.apache.doris.nereids.trees.plans.Plan; -// import org.apache.doris.nereids.trees.plans.logical.LogicalProject; -// import org.apache.doris.nereids.trees.plans.physical.PhysicalPlan; -// import org.apache.doris.nereids.util.HyperGraphBuilder; -// import org.apache.doris.nereids.util.MemoTestUtils; -// import org.apache.doris.nereids.util.PlanChecker; -import org.apache.doris.utframe.TestWithFeService; -// -// import com.google.common.collect.Sets; -// import org.junit.jupiter.api.Assertions; -// import org.junit.jupiter.api.Test; -// -// import java.util.HashSet; -// import java.util.Set; - -class RankTest extends TestWithFeService { - - // @Test - // void test() throws Exception { - // createDatabase("test"); - // HyperGraphBuilder hyperGraphBuilder = new HyperGraphBuilder(Sets.newHashSet(JoinType.INNER_JOIN)); - // hyperGraphBuilder.init(0, 1, 2); - // Plan plan = hyperGraphBuilder - // .addEdge(JoinType.INNER_JOIN, 0, 1) - // .addEdge(JoinType.INNER_JOIN, 1, 2) - // .buildPlan(); - // plan = new LogicalProject(plan.getOutput(), plan); - // CascadesContext cascadesContext = MemoTestUtils.createCascadesContext(connectContext, plan); - // hyperGraphBuilder.initStats("test", cascadesContext); - // PhysicalPlan bestPlan = PlanChecker.from(cascadesContext) - // .optimize() - // .getBestPlanTree(); - // Memo memo = cascadesContext.getMemo(); - // Set shape = new HashSet<>(); - // for (int i = 0; i < memo.getRankSize(); i++) { - // shape.add(memo.unrank(memo.rank(i + 1).first).shape("")); - // } - // System.out.println(shape); - // Assertions.assertEquals(2, shape.size()); - // Assertions.assertEquals(bestPlan.shape(""), memo.unrank(memo.rank(1).first).shape("")); - // } -} diff --git a/fs_brokers/cdc_client/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java b/fs_brokers/cdc_client/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java index 49d4b71de41e4a..f808e18bde9a6a 100644 --- a/fs_brokers/cdc_client/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java +++ b/fs_brokers/cdc_client/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java @@ -435,25 +435,7 @@ public void setKeepAliveInterval(long keepAliveInterval) { this.keepAliveInterval = keepAliveInterval; } - /** - * @return "keep alive" connect timeout in milliseconds. - * @see #setKeepAliveConnectTimeout(long) - * - * @deprecated in favour of {@link #getConnectTimeout()} - */ - public long getKeepAliveConnectTimeout() { - return connectTimeout; - } - /** - * @param connectTimeout "keep alive" connect timeout in milliseconds. - * @see #getKeepAliveConnectTimeout() - * - * @deprecated in favour of {@link #setConnectTimeout(long)} - */ - public void setKeepAliveConnectTimeout(long connectTimeout) { - this.connectTimeout = connectTimeout; - } /** * @return heartbeat period in milliseconds (0 if not set (default)). diff --git a/tools/row_to_column/get_ddl_stmt.py b/tools/row_to_column/get_ddl_stmt.py deleted file mode 100644 index 2a0cb1d733f302..00000000000000 --- a/tools/row_to_column/get_ddl_stmt.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -# 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. - -# -*- coding: utf-8 -*- -import ConfigParser -import re -import sys -import os -import json -from urllib import urlopen - -config = ConfigParser.ConfigParser() -config.read("conf") -username = config.get("cluster", "username") -passwd = config.get("cluster", "password") -fe_host = config.get("cluster", "fe_host") -fe_http_port = config.get("cluster", "http_port") -db=sys.argv[1] -table_name=sys.argv[2] - -tbls=[] -f_table=open(table_name, "r") -line=f_table.readline() -while line: - tbls.append(line) - line=f_table.readline() -f_table.close() -fw_create=open("create.sql", "w") - -for tbl in tbls: - url_list=[] - url_list.append("http://") - url_list.append(username) - url_list.append(":") - url_list.append(passwd) - url_list.append("@") - url_list.append(fe_host) - url_list.append(":") - url_list.append(fe_http_port) - url_list.append("/api/_get_ddl?db=default_cluster:") - url_list.append(db) - url_list.append("&tbl=") - url_list.append(tbl) - url = "".join(url_list) - - doc = urlopen(url).read(); - doc = json.loads(doc) - - create_table_stmt = doc["TABLE"] - ddl = create_table_stmt[0].encode("utf-8") - print ddl - -fw_create.close()