trino-435版本windows下源码编译

news2025/1/23 13:00:50

一、源码下载地址

https://github.com/trinodb/trino/tags

二、编译环境及工具准备

1、maven

(1)版本:3.6.3
(2)settings.xml配置

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
  <localRepository>D:\maven\repo2</localRepository>  
  <mirrors>
	<mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>https://maven.aliyun.com/repository/central/</url>
  </mirror>
   <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
  </mirrors>
 <profiles>
	<profile>
		<!-- maven使用jdk1.8 --> 
		<id>jdk-1.8</id>
			  <!-- 开启jdk --> 
		<activation>
			<activeByDefault>true</activeByDefault>
			<jdk>1.8</jdk>
		</activation>
			
		<properties>
			  <!-- 配置编译器信息 -->
			<maven.compiler.source>1.8</maven.compiler.source>
			<maven.compiler.target>1.8</maven.compiler.target>
			<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
		</properties>
	</profile>
  </profiles>
</settings>
2、jdk

版本:17.0.9

3、idea

版本:2023.2

三、源码编译配置

(1)取消插件:really-executable-jar-maven-plugin
在这里插入图片描述
(2)trino-root xml取消如下两个module
在这里插入图片描述
(3)trino-root xml取消scm
在这里插入图片描述
(4)trino-root xml取消如下配置

<!--                <plugin>-->
<!--                    <groupId>org.skife.maven</groupId>-->
<!--                    <artifactId>really-executable-jar-maven-plugin</artifactId>-->
<!--                    <version>2.1.1</version>-->
<!--                </plugin>-->
<!--                <plugin>-->
<!--                    <groupId>org.gaul</groupId>-->
<!--                    <artifactId>modernizer-maven-plugin</artifactId>-->
<!--                    <configuration>-->
<!--                        <violationsFiles>-->
<!--                            <violationsFile>${air.main.basedir}/.mvn/modernizer/violations.xml</violationsFile>-->
<!--                        </violationsFiles>-->
<!--                        <exclusionPatterns>-->
<!--                            <exclusionPattern>org/joda/time/.*</exclusionPattern>-->
<!--                        </exclusionPatterns>-->
<!--                        <exclusions>-->
<!--                            &lt;!&ndash; getOnlyElement is more readable than the stream analogue &ndash;&gt;-->
<!--                            <exclusion>com/google/common/collect/Iterables.getOnlyElement:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!--                            &lt;!&ndash; getLast has lower complexity for array based lists than the stream analogue (O(1) vs O(log(N)) &ndash;&gt;-->
<!--                            <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!--                            &lt;!&ndash; TODO: requires getting to common understanding which of those we want to enable &ndash;&gt;-->
<!--                            <exclusion>com/google/common/collect/Iterables.transform:(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Lists.transform:(Ljava/util/List;Lcom/google/common/base/Function;)Ljava/util/List;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.isEmpty:(Ljava/lang/Iterable;)Z</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.all:(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Z</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.any:(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Z</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.skip:(Ljava/lang/Iterable;I)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.limit:(Ljava/lang/Iterable;I)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.get:(Ljava/lang/Iterable;I)Ljava/lang/Object;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.getFirst:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.cycle:(Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.cycle:([Ljava/lang/Object;)Ljava/lang/Iterable;</exclusion>-->
<!--                            <exclusion>com/google/common/collect/Iterables.getOnlyElement:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!--                            &lt;!&ndash; com.google.common.io.BaseEncoding.base64 provides more reach interfaces than java.util.Base64 &ndash;&gt;-->
<!--                            <exclusion>com/google/common/io/BaseEncoding.base64:()Lcom/google/common/io/BaseEncoding;</exclusion>-->

<!--                            &lt;!&ndash; disable default modernizer violation &ndash;&gt;-->
<!--                            <exclusion>com/google/inject/Provider</exclusion>-->
<!--                        </exclusions>-->
<!--                    </configuration>-->
<!--                </plugin>-->

(4)取消maven-enforcer-plugin配置
在这里插入图片描述
(5)配置maven插件
在这里插入图片描述

四、profiles配置

取消dependency-scope-check、duplicate-finder-check两个配置,防止maven install时因依赖冲突或jar依赖相关问题的出现在这里插入图片描述](https://img-blog.csdnimg.cn/direct/c4754f121fbb4d7a82b682390f7dae3c.png)
在这里插入图片描述
在这里插入图片描述

五、启动类配置

Trino comes with sample configuration that should work out-of-the-box for development. Use the following options to create a run configuration:

Main Class: io.trino.server.DevelopmentServer
VM Options: -ea -Dconfig=etc/config.properties -Dlog.levels-file=etc/log.properties -Djdk.attach.allowAttachSelf=true
Working directory: $MODULE_DIR$
Use classpath of module: trino-server-dev
The working directory should be the trino-server-dev subdirectory. In IntelliJ, using $MODULE_DIR$ accomplishes this automatically.

If VM options doesn’t exist in the dialog, you need to select Modify options and enable Add VM options
在这里插入图片描述

六、代码修改

由于trino源码支持的构建环境为Max OS X or Linux,因此需要适配windows环境,代码修改如下:
(1)修改方法: io.trino.server.TrinoSystemRequirements.verifyOsArchitecture,将failRequirement改为警告形式warnRequirement

 warnRequirement("Trino requires Linux or Mac OS X (found %s)", osName);

(2)修改方法: io.trino.server.TrinoSystemRequirements.verifyFileDescriptor,增加windows环境判断

private static void verifyFileDescriptor()
    {
        String osName = StandardSystemProperty.OS_NAME.value();
        OptionalLong maxFileDescriptorCount = getMaxFileDescriptorCount();
         if ("Windows 10".equals(osName)) {
            maxFileDescriptorCount=OptionalLong.of(100000);
        } 
        if (maxFileDescriptorCount.isEmpty()) {
            // This should never happen since we have verified the OS and JVM above
            failRequirement("Cannot read OS file descriptor limit");
        }
        if (maxFileDescriptorCount.getAsLong() < MIN_FILE_DESCRIPTORS) {
            failRequirement("Trino requires at least %s file descriptors (found %s)", MIN_FILE_DESCRIPTORS, maxFileDescriptorCount.getAsLong());
        }
        if (maxFileDescriptorCount.getAsLong() < RECOMMENDED_FILE_DESCRIPTORS) {
            warnRequirement("Current OS file descriptor limit is %s. Trino recommends at least %s", maxFileDescriptorCount.getAsLong(), RECOMMENDED_FILE_DESCRIPTORS);
        }
    }

(3)io.trino.server.PluginDiscovery#discoverPlugins 适配windows

 File file = artifact.getFile();
        if (!(file.getPath().endsWith("/target/classes")||file.getPath().endsWith("\\target\\classes"))) {
            throw new RuntimeException("Unexpected file for main artifact: " + file);
        }

(4)修改io.trino.server.PluginDiscovery#binaryName,适配windows系统

private static String binaryName(String javaName)
    {
        String property=System.getProperty("os.name");
        if(property.trim().toLowerCase().contains("windows")){
            return javaName.replace('.','\\');
        }
        return javaName.replace('.', '/');
    }

(5)修改io.trino.server.PluginDiscovery#javaName适配windows系统

private static String javaName(String binaryName)
    {
        return binaryName.replace('/', '.').replace("\\",".");
    }
``
`
(6)由于阿里云仓库使用得是https,io.trino.server.HttpsArtifactResolve代码中写死的使用http因此需要重写此代码,使用阿里云仓库,将HttpsArtifactResolve复制一份替换阿里云仓库,并修改resolveArtifacts方法,代码如下:

package io.trino.server;
public class ArtifactResolverX {
public static final String USER_LOCAL_REPO = “D:\maven\repo2”;
public static final String MAVEN_CENTRAL_URI = “https://repo1.maven.org/maven2/”;

    public static final String ALIYUN_MAVEN_CENTRAL_URI = "https://maven.aliyun.com/repository/public";
    public static final Set<String> DEPRECATED_MAVEN_CENTRAL_URIS = ImmutableSet.<String>builder()
            .add("http://repo1.maven.org/maven2")
            .add("http://repo1.maven.org/maven2/")
            .add("http://repo.maven.apache.org/maven2")
            .add("http://repo.maven.apache.org/maven2/")
            .build();

    private final RepositorySystem repositorySystem;
    private final MavenRepositorySystemSession repositorySystemSession;
    private final List<RemoteRepository> repositories;

public ArtifactResolverX(String localRepositoryDir, String...remoteRepositoryUris)
    {
        this(localRepositoryDir, Arrays.asList(remoteRepositoryUris));
    }

public ArtifactResolverX(String localRepositoryDir, List < String > remoteRepositoryUris)
    {
        MavenServiceLocator locator = new MavenServiceLocator();
        locator.addService(RepositoryConnectorFactory.class, FileRepositoryConnectorFactory.class);
        locator.addService(RepositoryConnectorFactory.class, AsyncRepositoryConnectorFactory.class);
        repositorySystem = locator.getService(RepositorySystem.class);

        repositorySystemSession = new MavenRepositorySystemSession();

        LocalRepositoryManager localRepositoryManager = new SimpleLocalRepositoryManager(localRepositoryDir);
        repositorySystemSession.setLocalRepositoryManager(localRepositoryManager);

        repositorySystemSession.setTransferListener(new ConsoleTransferListener());
        repositorySystemSession.setRepositoryListener(new ConsoleRepositoryListener());

        List<RemoteRepository> repositories = new ArrayList<>(remoteRepositoryUris.size());
        int index = 0;
        for (String repositoryUri : remoteRepositoryUris) {
            repositories.add(new RemoteRepository("repo-" + index++, "default", repositoryUri));
        }
        this.repositories = Collections.unmodifiableList(repositories);
    }

    public List<Artifact> resolveArtifacts (Artifact...sourceArtifacts)
    {
        return resolveArtifacts(Arrays.asList(sourceArtifacts));
    }

    public List<Artifact> resolveArtifacts (Iterable < ? extends Artifact > sourceArtifacts)
    {
        CollectRequest collectRequest = new CollectRequest();
        for (Artifact sourceArtifact : sourceArtifacts) {
            collectRequest.addDependency(new Dependency(sourceArtifact, JavaScopes.RUNTIME));
        }
        for (RemoteRepository repository : repositories) {
            // Hack: avoid using deprecated Maven Central URLs
            if (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {
                repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);
            }
            collectRequest.addRepository(repository);
        }

        DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME));

        return resolveArtifacts(dependencyRequest);
    }

    public List<Artifact> resolvePom (File pomFile)
    {
        if (pomFile == null) {
            throw new RuntimeException("pomFile is null");
        }

        MavenProject pom = getMavenProject(pomFile);
        Artifact rootArtifact = getProjectArtifact(pom);

        CollectRequest collectRequest = new CollectRequest();
        for (org.apache.maven.model.Dependency dependency : pom.getDependencies()) {
            collectRequest.addDependency(toAetherDependency(dependency));
        }

        // Hack: avoid using deprecated Maven Central URLs. The Central Repository no longer supports insecure
        // communication over plain HTTP.
        ImmutableList.Builder<RemoteRepository> allRepositories = ImmutableList.builder();
        for (RemoteRepository repository : pom.getRemoteProjectRepositories()) {
            if (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {
                repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);
            }
            allRepositories.add(repository);
        }
        for (RemoteRepository repository : repositories) {
            if (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {
                repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);
            }
            allRepositories.add(repository);
        }
        collectRequest.setRepositories(allRepositories.build());

        // Make sure we account for managed dependencies
        if (pom.getDependencyManagement() != null) {
            for (org.apache.maven.model.Dependency managedDependency : pom.getDependencyManagement().getDependencies()) {
                collectRequest.addManagedDependency(toAetherDependency(managedDependency));
            }
        }

        DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME));
        List<Artifact> artifacts = resolveArtifacts(dependencyRequest);

        Map<String, Artifact> modules = getSiblingModules(pom).stream()
                .collect(toMap(ArtifactResolverX::getArtifactKey, identity()));

        return Stream.concat(
                        Stream.of(rootArtifact),
                        artifacts.stream()
                                .map(artifact -> modules.getOrDefault(getArtifactKey(artifact), artifact)))
                .collect(toImmutableList());
    }

    private MavenProject getMavenProject (File pomFile)
    {
        try {
            PlexusContainer container = container();
            org.apache.maven.repository.RepositorySystem lrs = container.lookup(org.apache.maven.repository.RepositorySystem.class);
            ProjectBuilder projectBuilder = container.lookup(ProjectBuilder.class);
            ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
            request.setSystemProperties(requiredSystemProperties());
            request.setRepositorySession(repositorySystemSession);
            request.setProcessPlugins(false);
            ArtifactRepository defaultLocalRepository = lrs.createDefaultLocalRepository();
            defaultLocalRepository.setUrl(USER_LOCAL_REPO);
            request.setLocalRepository(defaultLocalRepository);
            ArtifactRepository defaultRemoteRepository = lrs.createDefaultRemoteRepository();
            defaultRemoteRepository.setUrl(ALIYUN_MAVEN_CENTRAL_URI);
            request.setRemoteRepositories(Arrays.asList(new ArtifactRepository[]{defaultRemoteRepository}.clone()));
            ProjectBuildingResult result = projectBuilder.build(pomFile, request);
            return result.getProject();
        } catch (Exception e) {
            throw new RuntimeException("Error loading pom: " + pomFile.getAbsolutePath(), e);
        }
    }

    private Artifact getProjectArtifact (MavenProject pom)
    {
        return new DefaultArtifact(
                pom.getArtifact().getGroupId(),
                pom.getArtifact().getArtifactId(),
                pom.getArtifact().getClassifier(),
                pom.getArtifact().getType(),
                pom.getArtifact().getVersion(),
                null,
                new File(pom.getModel().getBuild().getOutputDirectory()));
    }

    private List<Artifact> getSiblingModules (MavenProject module)
    {
        if (!module.hasParent() || module.getParentFile() == null) {
            return ImmutableList.of();
        }

        // Parent exists and is a project reactor
        MavenProject parent = module.getParent();
        String parentDir = module.getParentFile().getParent();

        return parent.getModules().stream()
                .map(moduleName -> new File(parentDir, moduleName + "/pom.xml"))
                .filter(File::isFile)
                .map(this::getMavenProject)
                .map(this::getProjectArtifact)
                .collect(toImmutableList());
    }

    /**
     * Returns a string identifying artifact by its maven coordinates.
     */
    private static String getArtifactKey (Artifact artifact)
    {
        return format("%s:%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier());
    }

    private Properties requiredSystemProperties ()
    {
        Properties properties = new Properties();
        properties.setProperty("java.version", System.getProperty("java.version"));
        return properties;
    }

    private Dependency toAetherDependency (org.apache.maven.model.Dependency dependency)
    {
        Artifact artifact = new DefaultArtifact(dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), dependency.getType(), dependency.getVersion());
        ImmutableList.Builder<Exclusion> exclusions = ImmutableList.builder();
        for (org.apache.maven.model.Exclusion exclusion : dependency.getExclusions()) {
            exclusions.add(new Exclusion(exclusion.getGroupId(), exclusion.getArtifactId(), null, "*"));
        }
        return new Dependency(artifact, dependency.getScope(), dependency.isOptional(), exclusions.build());
    }

    private List<Artifact> resolveArtifacts (DependencyRequest dependencyRequest)
    {
        DependencyResult dependencyResult;
        try {
            dependencyResult = repositorySystem.resolveDependencies(repositorySystemSession, dependencyRequest);
        } catch (DependencyResolutionException e) {
            dependencyResult = e.getResult();
        }
        List<ArtifactResult> artifactResults = dependencyResult.getArtifactResults();
        List<Artifact> artifacts = new ArrayList<>(artifactResults.size());
        for (ArtifactResult artifactResult : artifactResults) {
            if (artifactResult.isMissing()) {
                artifacts.add(artifactResult.getRequest().getArtifact());
            } else {
                artifacts.add(artifactResult.getArtifact());
            }
        }

        return Collections.unmodifiableList(artifacts);
    }

    private static PlexusContainer container ()
    {
        try {
            ClassWorld classWorld = new ClassWorld("plexus.core", Thread.currentThread().getContextClassLoader());

            ContainerConfiguration cc = new DefaultContainerConfiguration()
                    .setClassWorld(classWorld)
                    .setRealm(null)
                    .setName("maven");

            DefaultPlexusContainer container = new DefaultPlexusContainer(cc);

            // NOTE: To avoid inconsistencies, we'll use the Thread context class loader exclusively for lookups
            container.setLookupRealm(null);

            container.setLoggerManager(new Slf4jLoggerManager());
            container.getLoggerManager().setThresholds(Logger.LEVEL_INFO);

            return container;
        } catch (PlexusContainerException e) {
            throw new RuntimeException("Error loading Maven system", e);
        }
    }
}

``

此外还需要修改下面的两个类,将HttpsArtifactResolver替换为ArtifactResolverX :

  • io.trino.server.DevelopmentPluginsProvider
  • io.trino.server.DevelopmentLoaderConfig

七、本地启动测试

1、启动服务

在这里插入图片描述

2、客户端连接

使用client/trino-cli下的jar,启动方式:java -jar trino-cli-435-executable.jar --server http://localhost:8080

3、执行命令

4、ui展示

登录只需填写用户名trino
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1330199.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

融资项目——vue之事件监听

vue通过v-on进行事件监听&#xff0c;在标签中使用v-on:xxx&#xff08;事件名称&#xff09;进行监听&#xff0c;事件触发的相应方法定义在Vue对象中的methods中。如下图所示&#xff1a; 上述代码对按钮进行监听&#xff0c;点击按钮后就会触发solve函数。

2016年第五届数学建模国际赛小美赛C题对超级细菌的战争解题全过程文档及程序

2016年第五届数学建模国际赛小美赛 C题 对超级细菌的战争 原题再现&#xff1a; 最近有很多关于我们抗生素耐药性危机的讨论。进化出的能够抵抗抗生素的细菌每年杀死70万人&#xff0c;越来越强大的细菌正在世界各地传播。研究人员担心&#xff0c;我们将进入一个后抗生素时代…

分子动力学模拟

天玑算科研服务_模拟计算_超算租用_实验测试天玑算科研服务致力于营造良好科研生态环境&#xff0c;加速科研成果转换&#xff0c;500余位TOP高校博士计算工程师团队&#xff0c;涉及第一性原理、分子动力学模拟、有限元等领域&#xff0c;为电池、能源、化工、生物医药等领域提…

尚硅谷图解Java设计模式

尚硅谷图解Java设计模式 第 1 章 内容介绍和授课方式Java 设计模式内容介绍先看几个经典的面试题设计模式的重要性 课程亮点和授课方式 第 2 章 设计模式七大原则设计模式的目的设计模式七大原则单一职责原则基本介绍应用实例单一职责原则注意事项和细节 接口隔离原则(Interfac…

HarmonyOS构建第一个ArkTS应用(FA模型)

构建第一个ArkTS应用&#xff08;FA模型&#xff09; 创建ArkTS工程 若首次打开DevEco Studio&#xff0c;请点击Create Project创建工程。如果已经打开了一个工程&#xff0c;请在菜单栏选择File > New > Create Project来创建一个新工程。 选择Application应用开发&a…

18 Vue3中使用v-model绑定文本域

概述 使用v-model绑定文本域则属于不太常见的情况了&#xff0c;因为文本域一般会被富文本替代&#xff0c;而富文本的话一般又会引入一些第三方的富文本库&#xff0c;所以在真实的开发中&#xff0c;使用v-model绑定文本域的场景实际上并不多见。 这里&#xff0c;我们了解…

如何在Windows上搭建WebDAV服务并通过内网穿透实现公网访问

文章目录 前言1. 安装IIS必要WebDav组件2. 客户端测试3. 使用cpolar内网穿透&#xff0c;将WebDav服务暴露在公网3.1 安装cpolar内网穿透3.2 配置WebDav公网访问地址 4. 映射本地盘符访问 前言 在Windows上如何搭建WebDav&#xff0c;并且结合cpolar的内网穿透工具实现在公网访…

安全、效率、成本:混合云数据库管理的三重挑战!

随着业务需求的不断演变&#xff0c;数据在多云平台之间流动&#xff0c;给数据库管控带来了新的层次和复杂性。这给数据库管控带来了前所未有的挑战。企业可能面临着一系列问题&#xff0c;包括安全性挑战、管理复杂性、性能与效率问题、成本控制难题、缺乏统一的管理视图以及…

C++ 链表

目录 链表结构 一&#xff0c;单链表 1.实现基本的增删查改 2.对链表进行一些操作 &#xff08;1&#xff09;删除等于给定值的所有节点。 &#xff08;2&#xff09;翻转链表 &#xff08;3&#xff09; 返回中间节点的地址 &#xff08;4&#xff09;倒数第k个节点 &…

运维管理平台哪个好?如何挑选合适的运维管理平台?

运用运维管理平台来处理一些内部后勤事务或者对外的售后服务&#xff0c;是现在很多企业采用的管理方法&#xff0c;优势是成本较低&#xff0c;效率更高。那么&#xff0c;运维管理平台哪个比较好呢&#xff1f; 选择运维管理平台要先找准自己的需求&#xff0c;然后才能选出合…

Android JNI入门到基础

一、JNI项目创建 AS创建项目时选择NativeC 会创建一个基本的JNI项目 MainActivity中写java层的native方法 具体实现在cpp文件中 native-lib.cpp #include <jni.h> #include <string>extern "C" JNIEXPORT jstring JNICALL Java_com_cn_techvision_j…

增强客户获取能力:探索 B 端影片行销的影响

01 B端企业短视频营销的价值与难点 短视频营销在当今的市场中越来越受到重视。有数据显示&#xff0c;越来越多的市场人将尝试增加短视频营销的预算&#xff0c;并且在2023年&#xff0c;每5个市场人中就有1个人将尝试短视频营销。相较于内容深、信息量大的长视频&#xff0c;…

CRC循环冗余校验

CRC循环冗余检验&#xff1a; 一般会给定生成多项式&#xff0c;通过生成多项式确定P&#xff08;除数&#xff09;的值&#xff08;e.g. P ( X ) X 3 X 2 1 P(X)X^3X^21 P(X)X3X21表示除数 P 1101 P1101 P1101&#xff09; 带传送的数据记为M&#xff0c;M有k位。n位冗…

高级数据结构 <二叉搜索树>

本文已收录至《数据结构(C/C语言)》专栏&#xff01; 作者&#xff1a;ARMCSKGT 目录 前言正文二叉搜索树的概念二叉搜索树的基本功能实现二叉搜索树的基本框架插入节点删除节点查找函数中序遍历函数析构函数和销毁函数(后序遍历销毁)拷贝构造和赋值重载(前序遍历创建)其他函数…

多数据库切换?设计模式--抽象工厂引导下思路

缘起 某日&#xff0c;部门Leader找到小明&#xff1a;“小明&#xff0c;我们公司不是用的SQL Server的数据库吗&#xff0c;但是后面可能会改&#xff0c;比如去使用Access或Mysql或其他的&#xff0c;你觉得该怎么去设计这个代码呢&#xff1f;” 小明一脸所思&#xff0c…

亚马逊测评的重要性和技术选择

亚马逊测评是指卖家通过各种途径&#xff0c;如测评平台、社区、红人等&#xff0c;联系到亚马逊的买家&#xff0c;让其对卖家的产品进行评价和留下真实的综合评价&#xff0c;这对于跨境电商卖家来说非常重要&#xff0c;因为亚马逊的排名和转化率很大程度上取决于产品的评价…

什么是数据资产化?数据怎样成为资产?怎样进入资产负债表?

财政部发布的《企业数据资源相关会计处理暂行规定》将从2024年1月1日起开始实施&#xff0c;为企业数据资源入表提供了基本指引&#xff0c;数据资产化有望迎来爆发期。什么是数据资产化&#xff0c;怎样让数据成为资产&#xff0c;成为了众多国有企业、上市公司关心的问题。 —…

应用全局的UI状态存储AppStorage

目录 1、概述 2、StorageProp 2.1、观察变化和行为表现 3、StorageLink 3.1、观察变化和行为表现 4、从应用逻辑使用AppStorage和LocalStorage 5、从UI内部使用AppStorage和LocalStorage 6、不建议借助StorageLink的双向同步机制实现事件通知 6.1、推荐的事件通知方式…

KiCad 类型为电源输出和电源输出的引脚已连接

环境&#xff1a; KiCad 版本&#xff1a;7.0.6 操作系统版本&#xff1a;Win10 错误描述&#xff1a; KiCad 原理图 ERC 检查啊出现错误&#xff0c;错误提示下&#xff1a; 类型为电源输出和电源输出的引脚已连接。 错误原因&#xff1a; 电源输出和电源输出连接到了一起…

电商裂变营销的新策略:工会排队

电商行业已经发展了很多年了&#xff0c;一些基本的营销手段大家也是见识过的&#xff0c;比如&#xff1a;打折、满减、618、双十一、双十二等等。但是很多人把东西都屯到这种节日下单&#xff0c;算下来发现根本没便宜多少&#xff0c;有的反而更贵了&#xff0c;因为这是商家…