我想高效地搜索大量日志(大小约为 1 TB,放置在多台机器上)。
为此,我想构建一个由 Flume、Hadoop 和 Solr 组成的基础架构。 Flume 将从几台机器上获取日志并将它们放入 HDFS。
现在,我希望能够使用 map reduce 作业为这些日志编制索引,以便能够使用 Solr 搜索它们。我发现 MapReduceIndexerTool这是为我做的,但我发现它需要一个吗啉。
我知道,morphline 通常会对它获取的数据执行一组操作,但如果我想使用 MapReduceIndexerTool,我应该执行哪种操作?
我找不到适用于此 map reduce 作业的 morphline 的任何示例。
恭敬地感谢您。
最佳答案
Cloudera 有一个 guide在 morphline
下给出了几乎相似的用例。
In this figure, a Flume Source receives syslog events and sends them to a Flume Morphline Sink, which converts each Flume event to a record and pipes it into a readLine command. The readLine command extracts the log line and pipes it into a grok command. The grok command uses regular expression pattern matching to extract some substrings of the line. It pipes the resulting structured record into the loadSolr command. Finally, the loadSolr command loads the record into Solr, typically a SolrCloud. In the process, raw data or semi-structured data is transformed into structured data according to application modelling requirements.
示例中给出的用例是MapReduceIndexerTool
、Apache Flume Morphline Solr Sink
和Apache Flume MorphlineInterceptor
和Morphline Lily等生产工具HBase Indexer 作为其操作的一部分运行,如下图所示:
关于hadoop - MapReduceIndexerTool 应该如何看起来像吗啡线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49110654/