HDFS Scribe Integration 【转】
It is finally here: you can configure the open source log-aggregator, scribe, to log data directly into the Hadoop distributed file system.
Many Web 2.0 companies have to deploy a bunch of costly filers to capture weblogs being generated by their application. Currently, there is no option other than a costly filer because the write-rate for this stream is huge. The Hadoop-Scribe integration allows this write-load to be distributed among a bunch of commodity machines, thus reducing the total cost of this infrastructure.
The challenge was to make HDFS be real-timeish in behaviour. Scribe uses libhdfs which is the C-interface to the HDFs client. There were various bugs in libhdfs that needed to be solved first. Then came the FileSystem API. One of the major issues was that the FileSystem API caches FileSystem handles and always returned the same FileSystem handle when called from multiple threads. There was no reference counting of the handle. This caused problems with scribe, because Scribe is highly multi-threaded. A new API FileSystem.newInstance() was introduced to support Scribe.
Making the HDFS write code path more real-time was painful. There are various timeouts/settings in HDFS that were hardcoded and needed to be changed to allow the application to fail fast. At the bottom of this blog-post, I am attaching the settings that we have currently configured to make the HDFS-write very real-timeish. The last of the JIRAS, HADOOP-2757 is in the pipeline to be committed to Hadoop trunk very soon.
What about Namenode being the single point of failure? This is acceptable in a warehouse type of application but cannot be tolerated by a realtime application. Scribe typically aggregates click-logs from a bunch of webservers, and losing *all* click log data of a website for a 10 minutes or so (minimum time for a namenode restart) cannot be tolerated. The solution is to configure two overlapping clusters on the same hardware. Run two separate namenodes N1 and N2 on two different machines. Run one set of datanode software on all slave machines that report to N1 and the other set of datanode software on the same set of slave machines that report to N2. The two datanode instances on a single slave machine share the same data directories. This configuration allows HDFS to be highly available for writes!
The highly-available-for-writes-HDFS configuration is also required for software upgrades on the cluster. We can shutdown one of the overlapping HDFS clusters, upgrade it to new hadoop software, and then put it back online before starting the same process for the second HDFS cluster.
What are the main changes to scribe that were needed? Scribe already had the feature that it buffers data when it is unable to write to the configured storage. The default scribe behaviour is to replay this buffer back to the storage when the storage is back online. Scribe is configured to support no-buffer-replay when the primary storage is back online. Scribe-hdfs is configured to write data to a cluster N1 and if N1 fails then it writes data to cluster N2. Scribe treats N1 and N2 as two equivalent primary stores.
转自:http://hadoopblog.blogspot.hk/2009/06/hdfs-scribe-integration.html
HDFS Scribe Integration 【转】的更多相关文章
- Scribe+HDFS日志收集系统安装方法
1.概述 Scribe是facebook开源的日志收集系统,可用于搜索引擎中进行大规模日志分析处理.其通常与Hadoop结合使用,scribe用于向HDFS中push日志,而Hadoop通过MapRe ...
- 【转载】scribe、chukwa、kafka、flume日志系统对比
原文地址:http://www.ttlsa.com/log-system/scribe-chukwa-kafka-flume-log-system-contrast/ 1. 背景介绍许多公司的平台每天 ...
- Scribe日志收集工具
Scribe日志收集工具 概述 Scribe是facebook开源的日志收集系统,在facebook内部已经得到大量的应用.它能够从各种日志源上收集日志,存储到一个中央存储系统(可以是NFS,分布式文 ...
- Linux System Log Collection、Log Integration、Log Analysis System Building Learning
目录 . 为什么要构建日志系统 . 通用日志系统的总体架构 . 日志系统的元数据来源:data source . 日志系统的子安全域日志收集系统:client Agent . 日志系统的中心日志整合系 ...
- syslog syslog-ng rsyslog flume scribe 各种尝试
1. syslog概念 syslog本身是一种协议, 一个用来描述系统日志格式的协议, 当前的协议包括三部分: 如下面是一个syslog消息: <30>Oct 9 22:33:20 hlf ...
- kettle连接hadoop&hdfs图文详解
1 引言: 项目最近要引入大数据技术,使用其处理加工日上网话单数据,需要kettle把源系统的文本数据load到hadoop环境中 2 准备工作: 1 首先 要了解支持hadoop的Kettle版本情 ...
- scribe、chukwa、kafka、flume日志系统对比 -摘自网络
1. 背景介绍许多公司的平台每天会产生大量的日志(一般为流式数据,如,搜索引擎的pv,查询等),处理这些日志需要特定的日志系统,一般而言,这些系统需要具有以下特征:(1) 构建应用系统和分析系统的桥梁 ...
- Loading Data into HDFS
How to use a PDI job to move a file into HDFS. Prerequisites In order to follow along with this how- ...
- 大数据应用日志采集之Scribe演示实例完全解析
大数据应用日志采集之Scribe演示实例完全解析 引子: Scribe是Facebook开源的日志收集系统,在Facebook内部已经得到大量的应用.它能够从各种日志源上收集日志,存储到一个中央存储系 ...
随机推荐
- 51nod 1105 二分答案法标准题目
二分答案法例题,用于练习二分答案的基本思想非常合适,包括了思维方式转换的内容(以前我们所做的一直是利用二分法求得数组元素对应指针之类,但是现在是直接对答案进行枚举). 思路是:首先对输入数组进行排序, ...
- 菜鸟学Linux - 文件/文件夹的隐藏属性
文件/文件夹居然还有隐藏属性?没错,隐藏属性对于文件/文件夹的安全很重要.好比如说,我们需要使用”鉴定符“来揭开装备的隐藏属性:在Linux中chattr/lsattr就是“鉴定符”. chattr基 ...
- C#入门篇6-3:字符串操作 string的ToString() Split()和Copy()方法
//ToString()方法 public static void OutPut() { //字符型转换 转为字符串 Console.WriteLine(.ToString("n" ...
- Java之基于Apache jar包的FTPClient上传
首先,准备工作: http://pan.baidu.com/s/1dD1Utwt 从以上链接下载Apache的jar包,并将其复制到工程的WEB-INF下的lib包里,在此,准备工作就已经完成了. 具 ...
- python-生成器迭代器及递归调用
生成器是一个可迭代的对象,它的执行会记住上一次返回时在函数体中的位置.对生成器第二次(或第 n 次)调用跳转至该函数上次执行位置继续往下执行,而上次调用的所有局部变量都保持不变. 生成器的特点:1.生 ...
- Notadd 2.0 全新 Node.js 版本~ (开发中) [从 PHP 到 node 的踩坑记]
对于 Notadd 我们本来期望它实现更多... 尽管我们也尝试做了很多努力,但是由于 PHP 本身的局限,以及考虑到开发环境配置的复杂程度,最终使用了折中方案.接下来,我们谈谈整个技术选型历程,也供 ...
- Linux 的日常 tools
Linux基础命令里的就不再赘述了. Table of Contents 一.下载(命令行工具,只给出常用的命令说明) wget/cURL(一般系统自带) aria2/axel多线程下载 1. ari ...
- CSS简单的四种引入方式
CSS一共有四种引入方式 (1)最简单的两种方式是直接在html标签里面引入,或者在html文件前面声明,以下是简单的代码示例 <!DOCTYPE html> <html lang= ...
- NetScaler通过DHCP服务器获取IP地址
NetScaler通过DHCP服务器获取IP地址 DHCP 选项参考 https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp ...
- Java 学习(1): windows java 运行& 环境配置
Java 文件的运行 如下,创建了一个 名为"HelloWorld.java" 的 Java 文件: public class HelloWorld { public static ...