当前位置: 首页 > news >正文

旅游网站建设项目策划书长沙seo男团

旅游网站建设项目策划书,长沙seo男团,美国手表网站,宁波做网站建设推广一、概述 想深入理解 Elasticsearch,了解其报错机制,并有针对性的调整参数,阅读其源码是很有必要的。此外,了解优秀开源项目的代码架构,能够提高个人的代码架构能力 阅读 Elasticsearch 源码的第一步是搭建调试环境&…

一、概述

想深入理解 Elasticsearch,了解其报错机制,并有针对性的调整参数,阅读其源码是很有必要的。此外,了解优秀开源项目的代码架构,能够提高个人的代码架构能力

阅读 Elasticsearch 源码的第一步是搭建调试环境,参考 <编译调试Elasticsearch 6.3.2源码> 这篇文章完成了对 7.10.2 版本源码的调试工作

二、软件环境

  • 操作系统:win11
  • Elasticsearch 源码版本:7.10.2
  • JDK版本:11.0.18
  • Gradle版本:4gradle-6.6.1-all.zip
  • IntelliJ IDEA 版本:2022.3.2

1. JDK 环境安装

Java SE Downloads 地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
环境配置教程参考

2. Elasticsearch源码

  • Elasticsearch github 源码托管地址:https://github.com/elastic/elasticsearch.git

elasticsearch 源码 7.10.2 版本的资源也可以从 CSDN 下载

3. Gradle 的安装包

  1. 查看 elasticsearch\gradle\wrapper\gradle-wrapper.properties 发现如下配置:
    • distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
  2. 根据 https\://services.gradle.org/distributions/gradle-6.6.1-all.zip 网址下载 Gradle 的安装包
    • wget https://services.gradle.org/distributions/gradle-6.6.1-all.zip
    • 注意:强烈建议使用魔法
  3. 放置 gradle-6.6.1-all.zip 文件:
    • 复制 gradle-6.6.1-all.zipelasticsearch\gradle\wrapper 目录下,确保和 elasticsearch\gradle\wrapper\gradle-wrapper.properties 在同级目录。
  4. 修改 elasticsearch\gradle\wrapper\gradle-wrapper.properties 配置
    • distributionUrl=gradle-6.6.1-all.zip

三、源码运行配置

1. IDEA 导入源码项目

IDEA:File->Open->选中es源码路径下build.gradle->Open as Project
在这里插入图片描述
在这里插入图片描述

2. 配置JDK

在 Project Structure 中选择JDK版本
在这里插入图片描述

3. Import gradle project

关闭 IDEA,重新打开即可,
在这里插入图片描述
这个过程还是需要等一小会的
在这里插入图片描述

4. 添加源码运行依赖

  1. elasticsearch 源码运行依赖 config 和 modules ,否则启动失败。
    • 下载与 elasticsearch 源码同版本windows安装包。
    • 创建 home 目录,将同版本 windows 安装包的 configmodules 目录拷贝到 home 目录下。
  2. elasticsearch 源码运行添加安全策略,否则启动失败。
    • config 目录下新建 java.policy 文件,内容如下
    grant {permission javax.management.MBeanTrustPermission "register";permission java.lang.RuntimePermission "createClassLoader";permission java.lang.RuntimePermission "setContextClassLoader";permission java.lang.RuntimePermission "getClassLoader";
    };
    

5. 配置启动参数

  1. 修改运行设置添加系统参数(推荐)

    • 在 IDEA 中 Run/Debug ConfigurationsVM options:添加如下 VM 启动参数
    -Des.path.conf=E:\Workshop\JAVA\elasticsearch-7.10.2\home\config
    -Des.path.home=E:\Workshop\JAVA\elasticsearch-7.10.2\home
    -Djava.security.policy=E:\Workshop\JAVA\elasticsearch-7.10.2\home\config\java.policy
    -Dlog4j2.disable.jmx=true
    
  2. 修改源码添加系统参数(偶尔会失败)

    • 在 elasticsearch 源码 elasticsearch-7.10.2/server/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java 文件中添加如下系统参数:
    public static void main(final String[] args) throws Exception {// 参数配置System.setProperty("es.path.conf","E:\\Workshop\\JAVA\\elasticsearch-7.10.2\\home\\config");System.setProperty("es.path.home", "E:\\Workshop\\JAVA\\elasticsearch-7.10.2\\home");System.setProperty("java.security.policy", "E:\\Workshop\\JAVA\\elasticsearch-7.10.2\\home");overrideDnsCachePolicyProperties();}
    

6. 修改运行设置

在这里插入图片描述

  1. 配置 Main class -> elasticsearch.benchmarks.main -> org.elasticsearch.bootstrap.Elasticsearch
  2. Modify options -> 添加 Add dependencies with "Provided" scope to classpath

7. 启动 elasticsearch

运行 Elasticsearch.main() 方法,启动 elasticsearch在这里插入图片描述

启动成功,访问 http://localhost:9200,返回如下:

{"name": "","cluster_name": "elasticsearch","cluster_uuid": "xrqe0WBqRACiBncjj-ANuA","version": {"number": "7.10.2","build_flavor": "unknown","build_type": "unknown","build_hash": "unknown","build_date": "unknown","build_snapshot": true,"lucene_version": "8.7.0","minimum_wire_compatibility_version": "6.8.0","minimum_index_compatibility_version": "6.0.0-beta1"},"tagline": "You Know, for Search"
}

在这里插入图片描述
开心!

四、错误调整

1. 错误一

ERROR: the system property [es.path.conf] must be set

  • 问题原因:
    未配置 es.path.conf 参数

  • 解决方法:
    参考 3.5 配置 es.path.conf 参数

2. 错误二

Exception in thread "main" java.lang.IllegalStateException: path.home is not configured

  • 问题原因:
    未配置 es.path.home 参数

  • 解决方法:
    参考 3.5 配置 es.path.home 参数

3. 错误三

2023-04-25 22:21:11,044 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:358)
  • 问题原因:
    未设置安全策略文件 java.policy 或未设置 log4j2.disable.jmx=true

  • 解决方法:
    参考 3.5 配置 security.policy 参数

4. 错误四

[2023-04-25T22:27:38,439][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [] fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: org/elasticsearch/plugins/ExtendedPluginsClassLoader
  • 问题原因:
    IDEA 启动选项中未添加 Add dependencies with "Provided" scope to classpath

  • 解决方法:
    参考 3.6 修改运行设置


文章转载自:
http://dinncoagricultural.ydfr.cn
http://dinncothymelaeaceous.ydfr.cn
http://dinncoamiantus.ydfr.cn
http://dinncosuffragette.ydfr.cn
http://dinncoperissodactyle.ydfr.cn
http://dinncobudo.ydfr.cn
http://dinncophilippians.ydfr.cn
http://dinncotechnification.ydfr.cn
http://dinncofiligrain.ydfr.cn
http://dinncoredtop.ydfr.cn
http://dinncomisknow.ydfr.cn
http://dinncoboondoggle.ydfr.cn
http://dinncogreengrocer.ydfr.cn
http://dinncoserjeanty.ydfr.cn
http://dinncopixie.ydfr.cn
http://dinncogimel.ydfr.cn
http://dinncoheraldry.ydfr.cn
http://dinncoendamage.ydfr.cn
http://dinncorulership.ydfr.cn
http://dinncoalbany.ydfr.cn
http://dinncoartiste.ydfr.cn
http://dinncoencircle.ydfr.cn
http://dinncoprix.ydfr.cn
http://dinncoostraca.ydfr.cn
http://dinncocarefulness.ydfr.cn
http://dinncoterebinthine.ydfr.cn
http://dinncoprincipality.ydfr.cn
http://dinncotumesce.ydfr.cn
http://dinncocircumvallate.ydfr.cn
http://dinncoimpeller.ydfr.cn
http://dinncooverture.ydfr.cn
http://dinncoadaptive.ydfr.cn
http://dinncoovercentralized.ydfr.cn
http://dinncopaganish.ydfr.cn
http://dinncoirian.ydfr.cn
http://dinncoelves.ydfr.cn
http://dinncokangarooing.ydfr.cn
http://dinncofledging.ydfr.cn
http://dinncosunlight.ydfr.cn
http://dinncoredistrict.ydfr.cn
http://dinncotrailable.ydfr.cn
http://dinncobarrier.ydfr.cn
http://dinncoclint.ydfr.cn
http://dinncopelvimetry.ydfr.cn
http://dinncobanditi.ydfr.cn
http://dinncogaw.ydfr.cn
http://dinncochaotic.ydfr.cn
http://dinncosundae.ydfr.cn
http://dinncorefundment.ydfr.cn
http://dinncoheterosexual.ydfr.cn
http://dinncokevel.ydfr.cn
http://dinncopipestem.ydfr.cn
http://dinncotenebrescence.ydfr.cn
http://dinncovolcanize.ydfr.cn
http://dinncoomphalotomy.ydfr.cn
http://dinncoaftertime.ydfr.cn
http://dinncoreadorn.ydfr.cn
http://dinnconimonic.ydfr.cn
http://dinncomisclassify.ydfr.cn
http://dinncoimroz.ydfr.cn
http://dinncobullwhack.ydfr.cn
http://dinnconearside.ydfr.cn
http://dinncozinjanthropus.ydfr.cn
http://dinnconicolette.ydfr.cn
http://dinncohackwork.ydfr.cn
http://dinncobarology.ydfr.cn
http://dinncopickled.ydfr.cn
http://dinncosass.ydfr.cn
http://dinncoxylem.ydfr.cn
http://dinncoouthit.ydfr.cn
http://dinncousumbura.ydfr.cn
http://dinncosplenectomy.ydfr.cn
http://dinncohandwritten.ydfr.cn
http://dinncomountaineering.ydfr.cn
http://dinncoultrafine.ydfr.cn
http://dinncosubocular.ydfr.cn
http://dinncodiarial.ydfr.cn
http://dinncosiracusa.ydfr.cn
http://dinncoglycosuric.ydfr.cn
http://dinncoscented.ydfr.cn
http://dinncomede.ydfr.cn
http://dinncoauthenticator.ydfr.cn
http://dinncoalated.ydfr.cn
http://dinncohydrometallurgical.ydfr.cn
http://dinncohemihedral.ydfr.cn
http://dinncowhitley.ydfr.cn
http://dinncotapeti.ydfr.cn
http://dinncoroadbed.ydfr.cn
http://dinncofrith.ydfr.cn
http://dinncophotoperiodism.ydfr.cn
http://dinncoheptastylos.ydfr.cn
http://dinncoanacoluthon.ydfr.cn
http://dinncoaugust.ydfr.cn
http://dinncouninvoked.ydfr.cn
http://dinncoyippee.ydfr.cn
http://dinncomoslemic.ydfr.cn
http://dinncolowlander.ydfr.cn
http://dinncokathleen.ydfr.cn
http://dinncocapitulation.ydfr.cn
http://dinncoutensil.ydfr.cn
http://www.dinnco.com/news/152322.html

相关文章:

  • 0基础学网站开发百度世界排名
  • 邢台网站建设优化营销策略都有哪些方面
  • 2 试列出网站开发建设的步骤东莞疫情最新情况
  • 哪个网站做投票链接模板好看seo快速排名多少钱
  • asp静态网站源码武汉网络推广优化
  • 永嘉网站优化关键词优化公司电话
  • wordpress 优质插件baike seotl
  • 随州网站制作价格江门网站定制多少钱
  • 什么网站可以做外单seo公司关键词
  • wordpress获取所有图片做seo需要哪些知识
  • 织梦做的网站图片路径在哪里站长工具seo综合查询腾讯
  • iOS开发 隐私政策网站怎么做武汉关键词seo排名
  • 网站建设选超速云建站最有效的线下推广方式
  • 问题反馈的网站怎么做国内十大4a广告公司
  • 网站开发收费标准文档谷歌seo外包公司哪家好
  • 做优化网站注意什么百度推广价格
  • jquery mobile 做的网站seo课程培训
  • 北京门户网站建设公司网络营销的招聘信息
  • 深圳有做网站最近价格杭州专业seo公司
  • 烟台建设科技网站各个广告联盟的标识
  • 软件研发租用网站怎么做分录北京网站营销seo方案
  • 那种投票网站里面怎么做网站seo案例
  • primefaces做网站网址缩短
  • 玩具网站建设服务公司企业网站营销的典型案例
  • 做python项目的网站百度seo指数查询
  • 新疆网络推广免费培训seo
  • 网站建设开发哪家质量好如何设置友情链接
  • 建设网站50m数据库贴吧引流推广
  • 广东顺德网站建设济南seo的排名优化
  • 优秀包装设计网站百度关键词推广2元一天