<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sheperd_shu的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sheperd_shu</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sheperd_shu]]></copyright><item><title><![CDATA[facebook scribe日志搜集系统]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6688272</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6688272</guid><author>sheperd_shu</author><pubDate>Mon, 15 Aug 2011 14:04:58 +0800</pubDate><description><![CDATA[这些天一直在研究facebook的scribe，本以为可以使用的，但是与目前系统接入不太契合，所以领导打算放弃“scribe”。还是打算把最近学习笔记公开下：
 
 

Facebook Scribe 报告
1 scribe 介绍
1.1 scribe概述
scri]]></description><category></category></item><item><title><![CDATA[开源日志系统比较]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6646583</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6646583</guid><author>sheperd_shu</author><pubDate>Sat, 30 Jul 2011 14:33:51 +0800</pubDate><description><![CDATA[http://dongxicheng.org/search-engine/log-systems/]]></description><category></category></item><item><title><![CDATA[Hadoop IO]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6437845</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6437845</guid><author>sheperd_shu</author><pubDate>Sun, 22 May 2011 15:12:00 +0800</pubDate><description><![CDATA[<br /> <br />总结：<br />     本章包含了以下内容<br />     第一，数据完整性，hadoop采用CRC来检测数据是否是完整的，在写入文件时，hdfs为每个数据块都生成一个crc文件。客户端读取数据时生成一个crc与数据节点存储的crc做比对，如果不]]></description><category></category></item><item><title><![CDATA[java 动态代理]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6368831</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6368831</guid><author>sheperd_shu</author><pubDate>Thu, 28 Apr 2011 10:24:00 +0800</pubDate><description><![CDATA[<br />所谓Dynamic Proxy是这样一种class： <br />      它是在运行时生成的class，在生成它时你必须提供一组interface给它，然后该class就宣称它实现了这些interface。你当然可以把该class的实例当作这些interface中的任何一个来用。当然啦，这个Dynamic Proxy其实就是一个Proxy，它不会替你作实质性的工作，在生成它的实例时你必须提供一个handler，由它接管实际的工作。<br /> <br />package com.laos.j]]></description><category></category></item><item><title><![CDATA[java线程笔记]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6366686</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6366686</guid><author>sheperd_shu</author><pubDate>Wed, 27 Apr 2011 13:57:00 +0800</pubDate><description><![CDATA[1 线程安全（thread safety）<br />构建并发程序也要正确使用线程和锁。编写线程安全的代码，本质上就是管理对状态的访问，而且通常都是共享的、可变的状态。<br /> <br />通俗的说，一个对象的状态就是它的数据，存储在状态变量中，比如实例域或静态域。对象的状态还包括了其他附属对象的域，如HashMap的状态一部分存储到对象本身中，但同时也存储到很多Map.Entry对象中。<br /><br />共享：指一个变量可以被多个线程访问。<br />可变：指变量的值在其生命周期内可以改变。<b]]></description><category></category></item><item><title><![CDATA[软引用、弱引用、虚引用 总结]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311913</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311913</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 15:46:00 +0800</pubDate><description><![CDATA[在看‘深入JAVA虚拟机’垃圾收集这一章的时候了解有关对象的引用级别，在网上找了些资料总结备忘。（该文章大多内容为多个网站的内容合并）1、概述   在JDK1.2以前的版本中，当一个对象不被任何变量引用，那么程序就无法再使用这个对象。也就是说，只有对象处于可触及状态，程序才能使用它。这 就像在日常生活中，从商店购买了某样物品后，如果有用，就一直保留它，否则就把它扔到垃圾箱，由清洁工人收走。一般说来，如果物品已经被扔到垃圾箱，想再 把它捡回来使用就不可能了。   但有时候情况并不这么简单，你可能会遇到类似鸡肋]]></description><category></category></item><item><title><![CDATA[再谈java的内存泄露 ]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311905</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311905</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 15:41:00 +0800</pubDate><description><![CDATA[<br />这两天看了一本老书《bitter java》，第一次系统地了解了所谓“反模式”。就书的内容来说已经过于陈旧，书中提到的magic servlet、复合jsp等等反模式已经是早就熟知的编程禁忌，而如web页面不能有太多元素这样的反模式也因为ajax的出现（异步加载）变的不是那么“反模式”了，其中又讲述了很多ejb的反模式，这些在轻量级框架流行的今天也早已经过时。不过书中有一个章节倒是挺有价值，讲述的是java的内存泄露问题，我认为是我目前读的关于这方面问题比较有价值的介绍。<br />    网上]]></description><category></category></item><item><title><![CDATA[Java的内存泄漏]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311888</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311888</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 15:31:00 +0800</pubDate><description><![CDATA[<br />问题的提出<br />Java的一个重要优点就是通过垃圾收集器(Garbage Collection，GC)自动管理内存的回收，程序员不需要通过调用函数来释放内存。因此，很多程序员认为Java不存在内存泄漏问题，或者认为即使有内存泄漏也不是程序的责任，而是GC或JVM的问题。其实，这种想法是不正确的，因为Java也存在内存泄露，但它的表现与C++不同。<br />随着越来越多的服务器程序采用Java技术，例如JSP，Servlet， EJB等，服务器程序往往长期运行。另外，在很多嵌入式系统中，内]]></description><category></category></item><item><title><![CDATA[父类、子类执行顺序]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311821</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311821</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 14:55:00 +0800</pubDate><description><![CDATA[<br />先看下代码：<br /> <br />package com.laos.util.init;<br />public class Person {<br /> <br />     private CommonObj obj = new CommonObj("person private");<br /> <br /> <br />     static  CommonObj obj1 = new CommonObj("person static");<br />   <br />     pu]]></description><category></category></item><item><title><![CDATA[非静态数据域、静态数据域和构造器 执行顺序]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311799</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311799</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 14:42:00 +0800</pubDate><description><![CDATA[代码如下：package com.laos.util.init;public class Person { private CommonObj obj = new CommonObj("person private"); static  CommonObj obj1 = new CommonObj("person static"); public CommonObj obj2 = new CommonObj("person public"); public Person(){  CommonObj obj1]]></description><category></category></item><item><title><![CDATA[Java Interface]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311764</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/6311764</guid><author>sheperd_shu</author><pubDate>Sat, 09 Apr 2011 14:21:00 +0800</pubDate><description><![CDATA[java 接口的应用一直以为java 中的接口像类一样只能继承一个接口，显然我错了，而且似乎太晚了些。package com.laos.util.test;public interface Card {    //final InnerObj obj = new InnerObj();    void play();}package com.laos.util.test;public interface Cart { void play();}两个接口Card 和Cart定义了名称一直的方法。package]]></description><category></category></item><item><title><![CDATA[常用unix命令用法 - join命令]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4072241</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4072241</guid><author>sheperd_shu</author><pubDate>Tue, 14 Apr 2009 11:41:00 +0800</pubDate><description><![CDATA[join用来将来自两个分类文本文件的行连在一起。下面讲述join工作方式。这里有两个文件file1和file2，当然已经分类。每个文件里都有一些元素与另一个文件相关。由于这种关系，join将两个文件连在一起，这有点像修改一个主文件，使之包含两个文件里的共同元素。文本文件中的域通常由空格或tab键分隔，但如果愿意，可以指定其他的域分隔符。类似于数据库中的join。其一般格式为：join [o]]></description><category></category></item><item><title><![CDATA[unix中的CUT命令]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4072216</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4072216</guid><author>sheperd_shu</author><pubDate>Tue, 14 Apr 2009 11:38:00 +0800</pubDate><description><![CDATA[ cut命令用于从文件或者标准输入中读取内容并截取每一行的特定部分并送到标准输出。截取的方式有三种，一是按照字符位置，二是按照字节位置，三是使用一个分隔符将一行分割成多个field，并提取指定的fields。cut命令有5个参数，其中-c,-b,-f分别表示"character", "byte"以及"field"截取方式。当采用field模式截取时，需要用"-d"参数指定一个分]]></description><category></category></item><item><title><![CDATA[特殊目录: /dev/null and /dev/tty]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4057717</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4057717</guid><author>sheperd_shu</author><pubDate>Wed, 08 Apr 2009 17:35:00 +0800</pubDate><description><![CDATA[ unix系统提供了两个在shell编程中特别有用的目录。第一个目录，/dev/null类似一个临时容器，送到这个目录的数据又被系统丢掉了。换句话说，将数据写到该目录的程序通常会认为它成功写数据。但是事实上，它什么事都没有做。当你需要一个命令的退出状态但不输出的时候非常有用。例如判断一个文件是否包含了一个模式。if grep pattern myfile > /dev/nullthen]]></description><category></category></item><item><title><![CDATA[Linux下tr命令“字符”处理的实用例子]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4057659</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4057659</guid><author>sheperd_shu</author><pubDate>Wed, 08 Apr 2009 17:17:00 +0800</pubDate><description><![CDATA[ tr是Unix系统非常实用的工具，其实用tr做到的事情，几乎都可用sed做到，你可以把tr当作是实现sed许多基本功能的sed“简体”。我认为tr是简单的“字符”处理工具，而sed是功能非常强大的“字符串”处理工具。 【注意】tr是单个字符处理工具，而不是字符串处理工具！ 我自己用过比较实用的例子如下： 1、将文件file中出现的"abc"替换为"xyz" #]]></description><category></category></item><item><title><![CDATA[I/O重定向]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4054468</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4054468</guid><author>sheperd_shu</author><pubDate>Tue, 07 Apr 2009 15:48:00 +0800</pubDate><description><![CDATA[ 在软件工具哲学中， 标准I/O也许是最基本的概念。这种概念就是程序应该有数据源，数据接收端和报告问题的地方。这有三个涉及到的三个复合名词：标准输入，标准输出和标准误差。程序应该既不知道，也不关注在它的输入输出后是什么样的设备：磁盘文件，终端，磁带，网络连接或者甚至是另外一个正在运行的程序。程序能认为当它开始的时候，这些标准的地方已经打开并且已经准备好试用了。很多，并不是大多数unix程序]]></description><category></category></item><item><title><![CDATA[使用printf输出]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4054147</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4054147</guid><author>sheperd_shu</author><pubDate>Tue, 07 Apr 2009 14:20:00 +0800</pubDate><description><![CDATA[ echo命令的不同版本导致了unix系列机移植性最为头痛的事情，在POSIX第一轮标准化时，委员会委员就如何标准化echo没有达成一致意见，所以他们想出了一个妥协的方案。echo是POSIX 标准的一部分，但是标准并不详尽的指明echo的第一个参数的具体行为。 printf命令能够像echo命令一样输出简单的字符串：printf "Hello, world/n"主要不同之处在于不像e]]></description><category></category></item><item><title><![CDATA[shell基本结构]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4027670</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4027670</guid><author>sheperd_shu</author><pubDate>Thu, 26 Mar 2009 20:06:00 +0800</pubDate><description><![CDATA[ 1.命令与参数shell的基本功能是执行命令，这一点在用shell用来进行交互时可以得到充分的证明。你一次输入一个命令，shell就执行他们。就像下面的这个例子：$ cd work ; ls -l whizprog.c-rw-r--r--    1 tolstoy   devel       30252 Jul  9 22:52 whizprog.c这个例子表现出了unix shell行]]></description><category></category></item><item><title><![CDATA[unix学习-----自包脚本:第一行#! ]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4017658</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4017658</guid><author>sheperd_shu</author><pubDate>Mon, 23 Mar 2009 16:57:00 +0800</pubDate><description><![CDATA[      当shell 运行一个程序的时候，它会向unix内核申请一个全新的进程来运行shell中指定的程序。如果运行的是编译程序，那么内核知道该怎么处理，然而shell脚本却不是编译程序，当shell要求内核运行该shell时，内核处理失败，并返回一个错误信息：“not executable format file”--不是可执行格式的文件。shell接受到这个错误后，意识到“哇，这不是一个编]]></description><category></category></item><item><title><![CDATA[shell 编程学习---续]]></title><link>https://blog.youkuaiyun.com/sheperd_shu/article/details/4012579</link><guid>https://blog.youkuaiyun.com/sheperd_shu/article/details/4012579</guid><author>sheperd_shu</author><pubDate>Sat, 21 Mar 2009 18:27:00 +0800</pubDate><description><![CDATA[     在学习之前先介绍下CGYWIN，这是一个模拟unix命令的软件，对于那些想学unix或linux而有不想装linux系统的人来说是一个不错的选择！     让我们用一个简单的脚本来开始我们的shell之旅！ 假如你想查看当前所有登陆unix的用户，你可以用命令who，以下是我登陆unix服务器查看登陆用户的结果：$ whoroot        vty0        Mar]]></description><category></category></item></channel></rss>