自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 Yarn通信协议与工作流程

一. Yarn通信协议 在 YARN 中,任何两个需相互通信的组件之间仅有一个 RPC 协议,而对于任何一个 RPC 协议,通信双方有一端是 Client,另一端为 Server,且 Client 总是主动连接 Server 的,因此,YARN 实际上采用的是拉式(pull-based)通信模型。如图所示,箭头指向的组件是 RPC Server,而箭头尾部的组件是 RPC Client,YARN

2016-07-29 16:53:46 785

原创 Yarn设计思想

一. Yarn 产生背景 1.YARN 是在 MRv1 基础上演化而来的,它克服了 MRv1 中的各种局限性。MRv1 主要有以下缺点: 扩展性差。在 MRv1 中,JobTracker 同时兼备了资源管理和作业控制两个功能,这成为系统的一个最大瓶颈,严重制约了 Hadoop 集群扩展性。可靠性差。MRv1 采用了 master/slave 结构,其中,master 存在单点故障问题

2016-07-28 21:23:08 1082

原创 75. Sort Colors

题目: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the

2016-07-28 17:36:50 168

原创 41. First Missing Positive(Sort)

题目: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses

2016-07-28 11:42:25 192

原创 148. Sort List

题目: Sort a linked list in O(n log n) time using constant space complexity. 归并排序: //得到中间节点 private ListNode getMiddleNode(ListNode head) { ListNode fast =head; ListNode slow = head;

2016-07-27 22:47:14 162

原创 147. Insertion Sort List

题目: Sort a linked list using insertion sort. 对链表进行插入排序。 public ListNode insertionSortList(ListNode head) { if(head == null || head.next == null) return head; ListNode newnode =new List

2016-07-27 21:34:55 153

原创 java序列化

序列化:把对象转换为字节序列的过程称为对象的序列化。 反序列化:把字节序列恢复为对象的过程称为对象的反序列化。 意义: 1.将对象持久化到磁盘 2.便于对象网络传输 jdk序列化api分为两部分: java.io.ObjectOutputStream代表对象输出流,它的writeObject(Object obj)方法可对参数指定的obj对象进行序列化,把得到的字节

2016-07-25 13:37:45 220

原创 java动态代理

一 .代理模式代理模式(Proxy Pattern)是GoF 23种Java常用设计模式之一。使用代理模式创建代理对象,让代理对象控制目标对象的访问(目标对象可以是远程的对象、创建开销大的对象或需要安全控制的对象),并且可以在不改变目标对象的情况下添加一些额外的功能。Subject:抽象主题角色,抽象主题类可以是抽象类,也可以是接口,是一个最普通的业务类型定义,无特殊要求。 RealSubject

2016-07-24 23:30:56 221

原创 21. Merge Two Sorted Lists(Sort)

题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Subscribe to see which companies asked thi

2016-07-24 11:40:22 176

原创 88. Merge Sorted Array(Sort)

题目: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 给定两个排序数组,合并排序数组,时间复杂度要求O(m+n),空间复杂度O(1) public void merge(int[] nums1, int m, int[] nu

2016-07-24 10:56:15 243

原创 145. Binary Tree Postorder Traversal(Tree)

题目: Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. 二叉树后序遍历: 方法

2016-07-22 12:54:48 260

原创 94. Binary Tree Inorder Traversal(Tree)

题目: Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,3,2]. 二叉树中序遍历: 方法一

2016-07-18 11:00:28 161

原创 144. Binary Tree Preorder Traversal(Tree)

题目: Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. 二叉树的前遍历,三种解法:

2016-07-18 00:17:19 190

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除