摘要:
JobTracker无任务时处理心跳流程 HeartBeat格式:{restarted=true,initialContact=true,acceptNewTasks=true,responseId=-1, status=TaskTrackerStatus {failures=0,trackerNa 阅读全文
posted @ 2014-05-28 08:48
lihui1625
阅读(172)
评论(0)
推荐(0)
摘要:
1.数据记录FileStatus public class FileStatus { private String filename; private long time; public FileStatus(String filename) { this.filename=filename; th 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(100)
评论(0)
推荐(0)
摘要:
1.服务器端主要类 public abstractclass Server { public static final ByteBuffer HEADER =ByteBuffer.wrap("hrpc".getBytes()); public static final byte CURRENT_VE 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(107)
评论(0)
推荐(0)
摘要:
0 <= position <= limit <= capacity Buffer.clear(): 清空数据。limit = capacity,position = 0 Buffer.flip(): 调整指针供读写。limit = position,position = 0 Buffer.rewi 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(170)
评论(0)
推荐(0)
摘要:
1. 数据记录FileStatus public class FileStatus implements Writable { private String filename; private long time; static { // register IPCFileStatus Writabl 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(182)
评论(0)
推荐(0)
摘要:
《精通正则表达式》 第401页 public static ListsplitCSV(String txt) { String reg = "\\G(?:^|,)(?:\"([^\"]*+(?:\"\"[^\"]*+)*+)\"|([^\",]*+))"; // 即 ... 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(803)
评论(0)
推荐(0)
摘要:
1.发送请求:query.getCPUStatus("Intel"); 2.传送到:RPCInvoker.invoke(Object proxy, Method method, Object[]args) 其中method:publicabstract org.hadoopinternal.ipc. 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(101)
评论(0)
推荐(0)
摘要:
两个连接请求发出后,生成ClientConnectionId对象,只要两个ClientConnectionId对象的hashcode相同,就视为一个同一个连接,从而复用ClientConnection publicRPCInvoker(Class《?extendsVersionedProtocol》 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(109)
评论(0)
推荐(0)
摘要:
两个连接请求发出后,生成ClientConnectionId对象,只要两个ClientConnectionId对象的hashcode相同,就视为一个同一个连接,从而复用ClientConnection publicRPCInvoker(Class《?extendsVersionedProtocol》 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(235)
评论(0)
推荐(0)
摘要:
1.SelectionKey.OP_ACCEPT publicclassServerListenerextendsThread{ publicServerListener(Serverserver) throwsIOException{ this.server=server; address=new 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(144)
评论(0)
推荐(0)
摘要:
1.SelectionKey.OP_ACCEPT publicclassServerListenerextendsThread{ publicServerListener(Serverserver) throwsIOException{ this.server=server; address=new 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(121)
评论(0)
推荐(0)
摘要:
1.Server的wait、notify public abstractclass Server { public synchronized void join()throws InterruptedException { while (running){ wait(); } } public sy 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(120)
评论(0)
推荐(0)
摘要:
1.Server的 callQueue 典型的生产者-消费者模式 public abstractclass Server { BlockingQueue<ServerCall> callQueue; } publicclass ServerConnection { privatevoid proce 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(121)
评论(0)
推荐(0)
摘要:
1.Server 的 running public abstract class Server { volatile boolean running =true; // true while server runs publicsynchronized void join() throwsInter 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(95)
评论(0)
推荐(0)
摘要:
1.Class类的running 用于主线程的Client 和若干 ClientConnection 线程之间 共享Client的running变量 public classClient { public AtomicBoolean running = newAtomicBoolean(true); 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(151)
评论(0)
推荐(0)
摘要:
1. ClientCall的 wait() 和 notify() public class Client { public Writablecall(Writable param, ClientConnectionId remoteId) throwsInterruptedException, IO 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(114)
评论(0)
推荐(0)
摘要:
1. RPCClientCache 中的 clients publicclass RPCClientCache { private Map<SocketFactory,Client> clients = new HashMap<SocketFactory,Client>(); synchronize 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(205)
评论(0)
推荐(0)
摘要:
待续 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(91)
评论(0)
推荐(0)
摘要:
1.数据节点储存 org.apache.hadoop.hdfs.server.datanode.DataStorage public class DataStorage extends Storage { // Constants final static String BLOCK_SUBDIR_P 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(364)
评论(0)
推荐(0)
摘要:
1. 客户端与NameNode接口 org.apache.hadoop.hdfs.protocol.ClientProtocol public interface ClientProtocol extends VersionedProtocol { public int GET_STATS_CAPA 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(197)
评论(0)
推荐(0)
摘要:
1. Hadoop 抽象文件系统 org.apache.hadoop.fs.FileSystem,具体HDFS是这个抽象类的子类 publicabstractclassFileSystemextendsConfiguredimplementsCloseable{ publicstaticfinalS 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(432)
评论(0)
推荐(0)
摘要:
待续 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(76)
评论(0)
推荐(0)
摘要:
1. Java 默认序列化 public class Block1 implements Serializable { private static finallong serialVersionUID = 1276464248616673062L; privatelong blockId; pri 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(126)
评论(0)
推荐(0)
摘要:
1.客户端 公司产品的客户端的使用阻塞式的Socket,并没有使用NIO,在Hadoop中遇到再议。 2.服务器端 2.1 阻塞式 例子程序 public class BIOServer { static class Hanlder extendsThread { privateSocket soc 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(146)
评论(0)
推荐(0)
摘要:
1. 测试wordcount,其源码如下: public class WordCount { public static classTokenizerMapper extends Mapper{ ............ } } public static classIntSumReducer ex 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(126)
评论(0)
推荐(0)
摘要:
1、对共享的JAVA对象的访问可以通过将其方法声明为同步的而被串行化.当这种对象被复制时,这种方法足以保证访问的串行化吗? 答:不能.问题是对每一个复制对象的访问是串行化的.但是对不同的复制对象可以在同一时间进行不同的操作,使得复制的实例变量不一致. 2、对于第一章所讨论的监视器,如果允许在一个复制 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(834)
评论(0)
推荐(0)
摘要:
1、说出至少三种可在WWV广播时间和在分布式系统中处理机设置内部时钟之间引入的延迟源。 答:信号在大气中的传播延迟,当机器在协调WWV接受者与以太网时的碰撞延迟,包在局域网上的传播延迟,各个处理器由于中断处理延迟和内部队列延迟所产生的延迟。 2、考虑分布式系统中的两台机器的行为。这两台机器的时钟假设 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(1060)
评论(0)
推荐(0)
摘要:
1. Q: Give an example of where an address of an entity Eneeds to be further resolved into another address to actuallyaccess E. A: IP addresses in the 阅读全文
posted @ 2014-05-28 08:47
lihui1625
阅读(396)
评论(0)
推荐(0)
摘要:
原文作者:嘟嘟博客 原文地址:http://www.xiangqian.com.cn/CCIE/262.html 此问题在以前的华三防火墙上也有遇到过,这次是在cisco防火墙上,因为彭博自建行情那个地址需要这么转换。就在网络上抄一下,按照下面的配置即可。 说来挺拗口,是大部分人都会遇到的问题。特别 阅读全文
posted @ 2014-05-28 08:46
lihui1625
阅读(394)
评论(0)
推荐(0)
摘要:
原文:http://blog.csdn.net/Code_cj/article/details/6411682 java telnet ssh 实现 2011-05-1113:17 911人阅读 评论(1) 收藏 举报 先看看telnet 和ssh的定义: Telnet协议是TCP/IP协议中的一员 阅读全文
posted @ 2014-05-28 08:46
lihui1625
阅读(655)
评论(0)
推荐(0)
浙公网安备 33010602011771号