solr

How to find whether solr server is running or not

半城伤御伤魂 提交于 2021-01-21 14:43:38
问题 I am running an application that get search results from solr server. But when server is not running i get no response from the server. Is there any way i can found that my server is not running so that i can give proper error message regarding it 回答1: You could periodically ping your server (e.g. http://localhost:8983/solr/admin/ping ) and in case of an error pass that message on to the frontend... 回答2: If you have SolrServer object, just call SolrServer.ping() it throws exception if can't

利用arthas实时定位线上性能问题

倾然丶 夕夏残阳落幕 提交于 2021-01-20 06:50:38
0. 场景及需求 我们线上5台solr读服务器,配置一样,但是相同的请求,其中一台响应时间明显比其他4台慢,我们想通过arthas来定位具体哪里执行慢。 1. arthas介绍 阿里开源的java调试工具,能解决如下的问题: 这个类从哪个 jar 包加载的?为什么会报各种类相关的 Exception? 我改的代码为什么没有执行到?难道是我没 commit?分支搞错了? 遇到问题无法在线上 debug,难道只能通过加日志再重新发布吗? 线上遇到某个用户的数据处理有问题,但线上同样无法 debug,线下无法重现! 是否有一个全局视角来查看系统的运行状况? 有什么办法可以监控到JVM的实时运行状态? 从我们实际使用经验来说,可以解决两个常见的问题: 性能慢时,可以定位是具体哪个方法慢。 cpu高时,很方便的定位到那个线程高。 2. 先说坑 我们分别在2台测试环境和1台线上环境测试arthas,发现在2台测试环境中出现如下两个问题: 166测试环境,安装提示成功,但是一直无法启动,通过源码我们发现安装并没成功,但是提示成功。 151测试环境,使用trace监控方法请求流程耗时时,出现java(tomcat)进程没有响应和被杀死两种无法接受情况。 建议: 上述2问题,在线上生产环境没遇到,但是不建议在线上正常运行环境中使用arthas;但线上java程序遇到重大问题

开发运维视角下,影响软件高可扩展性的6个因素

落花浮王杯 提交于 2021-01-08 11:41:52
<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;"><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">软件可扩展性是一个有趣的话题。实现软件可扩展性涉及很多因素,我们在本文将讨论一些与开发和运维方面相关的因素。</p> <p

Apache Solr - Indexing ZIP files

空扰寡人 提交于 2021-01-07 06:59:24
问题 My web app is an e-mail service. It stores email messages in MySQL database and email attachments are on a disk. The database is similar to: ---------------------------------------------------------------------- | id | sender | receiver | subject | body | attach_dir | attachments | ---------------------------------------------------------------------- | 2 | 444 | 555 | Apples | Hey! | /mnt/emails| att1.doc\r\n| | | | | | | | att2.doc\r\n| ------------------------------------------------------

Apache Solr - Indexing ZIP files

徘徊边缘 提交于 2021-01-07 06:59:07
问题 My web app is an e-mail service. It stores email messages in MySQL database and email attachments are on a disk. The database is similar to: ---------------------------------------------------------------------- | id | sender | receiver | subject | body | attach_dir | attachments | ---------------------------------------------------------------------- | 2 | 444 | 555 | Apples | Hey! | /mnt/emails| att1.doc\r\n| | | | | | | | att2.doc\r\n| ------------------------------------------------------

SolrJ: is not nesting documents

故事扮演 提交于 2021-01-07 03:33:30
问题 Here my beans: public class UnitatDenormalized { @Field private String id; @Field(value= "autors", child = true) private List<Autor> autors = new ArrayList<Autor>(); } public class Autor { @Field private String id; @Field private String name; } I'm trying to index nested authors as a nested document inside unitat . Here my straightforward bean initialization: UnitatDenormalized denormalized = new UnitatDenormalized(); denormalized.setId("giac_img-111-99-5805-415087"); denormalized.addAutors

SolrJ: is not nesting documents

半世苍凉 提交于 2021-01-07 03:33:27
问题 Here my beans: public class UnitatDenormalized { @Field private String id; @Field(value= "autors", child = true) private List<Autor> autors = new ArrayList<Autor>(); } public class Autor { @Field private String id; @Field private String name; } I'm trying to index nested authors as a nested document inside unitat . Here my straightforward bean initialization: UnitatDenormalized denormalized = new UnitatDenormalized(); denormalized.setId("giac_img-111-99-5805-415087"); denormalized.addAutors

Upgrading Solr index from 6 to 8

倖福魔咒の 提交于 2021-01-07 01:14:30
问题 I have a core which was created years ago, running correctly from a Solr 6.x. I've upgraded Solr to 7.7.3. I've launched the IndexUpgrade script: /opt/solr/server/solr-webapp/webapp/WEB-INF/lib$ sudo java -cp lucene-core-7.7.3.jar:lucene-backward-codecs-7.7.3.jar org.apache.lucene.index.IndexUpgrader /var/solr/data/hms/data/index/ It silently run, so my assumption is that it did what it had to do correctly. Then I've upgraded to Solr 8.7.0, and launched the script: /opt/solr/server/solr

Upgrading Solr index from 6 to 8

匆匆过客 提交于 2021-01-07 01:12:52
问题 I have a core which was created years ago, running correctly from a Solr 6.x. I've upgraded Solr to 7.7.3. I've launched the IndexUpgrade script: /opt/solr/server/solr-webapp/webapp/WEB-INF/lib$ sudo java -cp lucene-core-7.7.3.jar:lucene-backward-codecs-7.7.3.jar org.apache.lucene.index.IndexUpgrader /var/solr/data/hms/data/index/ It silently run, so my assumption is that it did what it had to do correctly. Then I've upgraded to Solr 8.7.0, and launched the script: /opt/solr/server/solr

Atlas 介绍

≯℡__Kan透↙ 提交于 2021-01-06 09:24:46
一、Atlas是什么? 在当今大数据的应用越来越广泛的情况下,数据治理一直是企业面临的巨大问题。 大部分公司只是单纯的对数据进行了处理,而数据的血缘,分类等等却很难实现,市场上也急需要一个专注于数据治理的技术框架,这时Atlas应运而生。 Atlas官网地址: https://atlas.apache.org/ Atlas是Hadoop的数据治理和元数据框架。 Atlas是一组可扩展和可扩展的核心基础治理服务,使企业能够有效,高效地满足Hadoop中的合规性要求,并允许与整个企业数据生态系统集成。 Apache Atlas为组织提供了开放的元数据管理和治理功能,以建立其数据资产的目录,对这些资产进行分类和治理,并为数据科学家,分析师和数据治理团队提供围绕这些数据资产的协作功能。 Atlas支持各种Hadoop和非Hadoop元数据类型 提供了丰富的REST API进行集成 对数据血缘的追溯达到了字段级别,这种技术还没有其实类似框架可以实现 对权限也有很好的控制 ​ 二、架构原理 Atlas包括以下组件: 采用Hbase存储元数据 采用Solr实现索引 Ingest/Export 采集导出组件 Type System类型系统 Graph Engine图形引擎 共同构成Atlas的核心机制 所有功能通过API向用户提供,也可以通过Kafka消息系统进行集成