Flume + Solr + log4j build web Log collection system, flumesolr
Preface
Many web applications use ELK as the log collection system. Flume is used here because they are familiar with the Hadoop framework and Flume has many advantages.
For details
We talked about the basic usage and configuration file of SOLR several times before, and then we started our real code journey.
1) start with a simple program:
Public static void main (string [] ARGs) throws solrserverexception, ioexception,
Background: Kafka The completion of the message bus, so that the data of each system can be aggregated in the Kafka node, the next task is to maximize the value of data, let the data "Hui" talk.Environment Preparation:Kafka server.CDH 5.8.3 Server,
The MySQL test is used here.1, first build a table in MySQL: solr_test2. Insert several test data:3, use Notepad to play solrconfig.xml files, in the Solrhome folder. E:\solrhome\mycore\conf\solrconfig.xml(Solrhome folder is what, see:
This article transferred from: http://blog.csdn.net/xiaoyu714543065/article/details/11849115I. Data import (DATAIMPORTHANDLER-DIH)DIH is a toolkit provided by SOLR for importing databases, xml/http, and rich text objects into the SOLR index library.
Query Parameters
Frequently used:
Q-query string, required.
FL-specify the content of the returned fields, which are separated by commas (,) or spaces.
Start-return the offset position of the first record in the complete found result.
1. Parameters of the Corequeryparam query
1) Q: query string, required.
2) Q.op: Overrides the Schema.xml defaultoperator (with "and" or "or" in the case of a space), which is usually specified by default.
3) DF: The default query field, typically
1, common query parameter descriptionQ-The query string is required.FL-Specifies that the contents of those fields be returned, separated by commas or spaces.Start-Returns the offset position of the first record in the full found result, starting at
FL: A list separated by commas (,). It is used to specify the list to be returned in the document results.FieldSet. The default value is"*All fields.
Deftype: Specify query parser. Commonly Used deftype = Lucene, deftype = dismax, deftype =
FL: A list separated by commas (,). It is used to specify the list to be returned in the document results.FieldSet. The default value is"*All fields.
Deftype: Specify query parser. Commonly Used deftype = Lucene, deftype = dismax, deftype =
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.