- 博客(13)
- 资源 (4)
- 收藏
- 关注
原创 MapReduce 工作机制
本文主要内容MapReduce作业的执行流程错误处理机制作业调度机制Shuffle和排序任务执行1.MapReduce任务执行总流程 一个MapReduce作业的执行流程是:代码编程--->job configuration--->提交作业--->Mapper任务的分配执行--->处理中间结果--->Reduce任务分配执行--->完成。如下图:(援引google 图片)
2013-11-29 17:38:32 1366
原创 浅谈Hadoop容错机制
简单介绍一下Hadoop中数据存储的可靠性和完整性,其中包括HDFS的容错机制、NameNode(元数据结点)的单点失效解决机制、Block数据块的多副本存储机制、NameNode与DataNode之间的心跳检测机制、数据存储等。(一)HDFS中NameNode单点问题HDFS这种分布式的存储系统,存在中心结点,那么这个中心结点的可靠性就是整个集群的可靠性的关键,对于版本0.20.x的
2013-11-22 14:26:44 6665
原创 MapReduce 编程之 倒排索引
本文调试环境: ubuntu 10.04 , hadoop-1.0.2 hadoop装的是伪分布模式,就是只有一个节点,集namenode, datanode, jobtracker, tasktracker...于一体。本文实现了简单的倒排索引,单词,文档路径,词频,重要的解释都会在代码注视中。第一步,启动hadoop, 开发环境主要是用eclipse. 在本地文件系统中新建三个
2013-11-19 22:23:12 1822
原创 【LeetCode】Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key.Th
2013-11-07 20:05:50 762
原创 【LeetCode】Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited numb
2013-11-07 16:18:31 1199
原创 【LeetCode】Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [
2013-11-06 15:16:49 956
原创 【LeetCode】Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti
2013-11-06 14:01:41 2699
原创 【LeetCode】Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the
2013-11-05 15:50:15 2448
原创 【LeetCode】Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[1,1,2], [1,2,1], and [2,1,1].
2013-11-05 15:16:52 982
原创 【LeetCode】Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible o
2013-11-04 13:24:03 2481
原创 【LeetCode】Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3,
2013-11-04 11:03:00 957
原创 【LeetCode】Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.java code :/** * Definition for singly-linked list. * public class ListNode { *
2013-11-04 10:21:34 1032
原创 【LeetCode】 Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?解法一: 哈希,需要O(n)的空间复杂度,时间复杂度是O(n)/**
2013-11-01 14:44:38 3147 7
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人