<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/lmh12506</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; lmh12506]]></copyright><item><title><![CDATA[Spark作业执行流程]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/48632045</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/48632045</guid><author>lmh12506</author><pubDate>Mon, 21 Sep 2015 19:54:01 +0800</pubDate><description><![CDATA[Spark作业执行流程

Local模式

运行Spark最简单的方法是通过Local模式（即伪分布式模式）。

    运行命令为：./bin/run-example org.apache.spark.examples.SparkPi local

基于standalone的Spark架构与作业执行流程

Standalone模式下，集群启动时包括Master与Worker，]]></description><category></category></item><item><title><![CDATA[Spark TaskScheduler和DagScheduler介绍]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/48177161</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/48177161</guid><author>lmh12506</author><pubDate>Wed, 02 Sep 2015 13:50:37 +0800</pubDate><description><![CDATA[开始研究神奇的spark。会陆续将研究的心得放上来。 

在Spark中一个核心的是模块就是调度器（Scheduler），在spark中Scheduler有两种TaskScheduler（是低级的调度器接口），DagScheduler（是高级的调度） 

我们在创建SparkContext对象的时候，sparkcontext内部就会创建TaskScheduler和DagScheduler，]]></description><category></category></item><item><title><![CDATA[数据挖掘的几个基本概念]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/48007685</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/48007685</guid><author>lmh12506</author><pubDate>Wed, 26 Aug 2015 18:28:27 +0800</pubDate><description><![CDATA[True Positive （真正, TP）被模型预测为正的正样本；

True Negative（真负 , TN）被模型预测为负的负样本 ；

False Positive （假正, FP）被模型预测为正的负样本；

False Negative（假负 , FN）被模型预测为负的正样本；


True Positive Rate（真正率 , TPR）或灵敏度（sensitivi]]></description><category></category></item><item><title><![CDATA[C++虚函数实现原理详解]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/46928001</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/46928001</guid><author>lmh12506</author><pubDate>Fri, 17 Jul 2015 15:21:45 +0800</pubDate><description><![CDATA[前言

C++中的虚函数的作用主要是实现了多态的机制。关于多态，简而言之就是用父类型别的指针指向其子类的实例，然后通过父类的指针调用实际子类的成员函数。这种技术可以让父类的指针有“多种形态”，这是一种泛型技术。所谓泛型技术，说白了就是试图使用不变的代码来实现可变的算法。比如：模板技术，RTTI技术，虚函数技术，要么是试图做到在编译时决议，要么试图做到运行时决议。

关于虚函数的使用方法，我]]></description><category></category></item><item><title><![CDATA[字符串比较函数汇总]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/46516033</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/46516033</guid><author>lmh12506</author><pubDate>Tue, 16 Jun 2015 11:26:17 +0800</pubDate><description><![CDATA[字符串比较函数汇总



char *strchr(const char *string, int c);

查找字符c在字符串string中首次出现的位置, NULL结束符也包含在查找中.

返回一个指针, 指向字符c在字符串string中首次出现的位置, 如果没有找到, 则返回NULL.

char *strrchr(const char *string, int c);

查找字符c]]></description><category></category></item><item><title><![CDATA[epoll网络编程实例]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/45221595</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/45221595</guid><author>lmh12506</author><pubDate>Thu, 23 Apr 2015 14:46:20 +0800</pubDate><description><![CDATA[在前面已经经过了PPC、TPC、select之类( TPC就是使用进程处理data，TPC就是使用线程处理 ),前面两个的缺点大家应该都是知道的是吧，对于select( 其实poll和他差不多 )，缺点是能同时连接的fd是在是不多，在linux中一般是1024/2048，对于很大的服务器来说是不够的！当然我们可以自己修改其值！但是效率上就会下降！

       对于改进poll的epoll来]]></description><category></category></item><item><title><![CDATA[__attribute__((packed))的作用]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/25641853</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/25641853</guid><author>lmh12506</author><pubDate>Mon, 12 May 2014 17:45:55 +0800</pubDate><description><![CDATA[__attribute__((packed))的作用  

在结构体变量的声明中，经常可以看到__attribute__((packed))修饰符。这是做什么用的呢？请看一下程序：

#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned int

int main()
{
    struct {
]]></description><category></category></item><item><title><![CDATA[linuxIO刷新机制fsync和fdatasync详解]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/25604793</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/25604793</guid><author>lmh12506</author><pubDate>Mon, 12 May 2014 11:26:19 +0800</pubDate><description><![CDATA[前言：

        Linux，unix在内核中设有 缓冲区高速缓冲或页面高速缓冲，大多数磁盘I/O都通过缓冲进行，采用延迟写技术。
sync:将所有修改过的快缓存区排入写队列，然后返回，并不等待实际写磁盘操作结束
fsync：只对有文件描述符制定的单一文件起作用，并且等待些磁盘操作结束，然后返回。
fdatasync：类似fsync，但它只影响文件的数据部分。fsync还会同步更]]></description><category></category></item><item><title><![CDATA[C++匿名命名空间]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/17586179</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/17586179</guid><author>lmh12506</author><pubDate>Thu, 26 Dec 2013 16:37:28 +0800</pubDate><description><![CDATA[C++匿名命名空间
今天得到来自google的老大的指点，学习了一个新的用法：匿名命名空间。


C++另外有一种匿名的命名空间,来保证生成的符号是局部的,这样对于匿名空间中的变量等,外部都是不可见的.

//test3.cpp

static void bar(){}

namespace //匿名的命名空间
{
    float bar2;
    int foo;
}

//tes]]></description><category></category></item><item><title><![CDATA[mysql链接多线程安全问题]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/16840605</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/16840605</guid><author>lmh12506</author><pubDate>Wed, 20 Nov 2013 10:41:34 +0800</pubDate><description><![CDATA[如果你用线程的编程，你应该用--with-thread-safe-client编译MySQL C API，这将使C API线程对每个连接更安全。你可以让2个线程共享相同的连接，只要如果你做下列事情：

两个线程不能同时在同一个连接上发送查询到MySQL。特别是你必须保证在一个mysql_query()和mysql_store_result()之间没有其他线程正在使用同一个连接。

许多线程]]></description><category></category></item><item><title><![CDATA[深入理解C++的动态绑定和静态绑定]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/11595835</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/11595835</guid><author>lmh12506</author><pubDate>Thu, 12 Sep 2013 11:00:07 +0800</pubDate><description><![CDATA[为了支持c++的多态性，才用了动态绑定和静态绑定。理解他们的区别有助于更好的理解多态性，以及在编程的过程中避免犯错误，需要理解四个名词：
1、对象的静态类型：对象在声明时采用的类型。是在编译期确定的。
2、对象的动态类型：目前所指对象的类型。是在运行期决定的。

对象的动态类型可以更改，但是静态类型无法更改。关于对象的静态类型和动态类型，看一个示例：
class B
{
}
class ]]></description><category></category></item><item><title><![CDATA[如何写mysql存储引擎]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9855921</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9855921</guid><author>lmh12506</author><pubDate>Fri, 09 Aug 2013 15:01:56 +0800</pubDate><description><![CDATA[在MySQL 5.1中开发一个存储引擎已经是比较方便了。所谓存储引擎实际上是按照MySQL的约定，提供某些接口的实现而已，如MySQL插入一条记录时将调用write_row方法，通过索引检索时将调用index_read和index_next方法等。MySQL与存储引擎之间的接口主要由两个类/结构约定，分别是在sql/handler.h中定义的handlerton结构和handler类。handle]]></description><category></category></item><item><title><![CDATA[数据库中DDL、DML、DCL和TCP概念]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9850653</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9850653</guid><author>lmh12506</author><pubDate>Fri, 09 Aug 2013 10:28:58 +0800</pubDate><description><![CDATA[1.DDL（Data Definition
 Language）数据库定义语言statements
 are used to define the database structure or schema.

DDL是SQL语言的四大功能之一。
用于定义数据库的三级结构，包括外模式、概念模式、内模式及其相互之间的映像，定义数据的完整性、安全控制等约束
DDL不需要commit.
CR]]></description><category></category></item><item><title><![CDATA[tcp_tw_recycle和tcp_timestamps导致connect失败问题]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9372305</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9372305</guid><author>lmh12506</author><pubDate>Thu, 18 Jul 2013 19:30:08 +0800</pubDate><description><![CDATA[近来线上陆续出现了一些connect失败的问题，经过分析试验，最终确认和proc参数tcp_tw_recycle/tcp_timestamps相关； 
1. 现象 
    第一个现象：模块A通过NAT网关访问服务S成功，而模块B通过NAT网关访问服务S经常性出现connect失败，抓包发现：服务S端已经收到了syn包，但没有回复synack；另外，模块A关闭了tcp timestamp，而模]]></description><category></category></item><item><title><![CDATA[如何设计一个LRU cache]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9235913</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9235913</guid><author>lmh12506</author><pubDate>Wed, 03 Jul 2013 17:32:38 +0800</pubDate><description><![CDATA[如何设计一个LRU Cache？

Google和百度的面试题都出现了设计一个Cache的题目，什么是Cache，如何设计简单的Cache，通过搜集资料，本文给出个总结。

 通常的问题描述可以是这样：

Question：

[1] Design a layer in front of a system which cache the last n requests and th]]></description><category></category></item><item><title><![CDATA[linux下安装MySQLdb模块]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9198661</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9198661</guid><author>lmh12506</author><pubDate>Fri, 28 Jun 2013 17:19:50 +0800</pubDate><description><![CDATA[linux下安装MySQLdb模块


1，查看是否已安装MySQLdb模块

   进入python的命令行，输入 import MySQLdb 如果没有报错，证明此模块已经安装，可以跳过以下步骤。

2，下载最新的MySQLdb安装包：

   wget -O python-1.2.3c1.tar.gz  http://cdnetworks-kr-1.dl.sourcefor]]></description><category></category></item><item><title><![CDATA[std::map::erase的用法及陷阱]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/9167653</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/9167653</guid><author>lmh12506</author><pubDate>Tue, 25 Jun 2013 10:22:17 +0800</pubDate><description><![CDATA[方法一：





[cpp] view
 plaincopy






std::map mapTest;  
bool TestVal(const std::string & val);  
  
......  
std::map::iterator it = mapTest.begin();  
while(it != mapTest.end())]]></description><category></category></item><item><title><![CDATA[vector的内存分配行为]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/8939499</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/8939499</guid><author>lmh12506</author><pubDate>Fri, 17 May 2013 14:01:01 +0800</pubDate><description><![CDATA[/* 结论:    vector的存在可以使开发者不必关心内存的申请和释放。但是，vector背后的内存分配是按照2的倍数分配内存的。当当前容量对插入元素不够时，分配一块新的内存，这块内存的容量是原vector容量的2倍大小，然后复制旧内存，释放旧内存，可能多次涉及拷贝构造函数和析构函数，而这也正是vector的劣势所在。*/





在使用cocos2d-x引擎的时候，多次调用cc]]></description><category></category></item><item><title><![CDATA[MySQL Create Table语句的应用与语法]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/8901510</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/8901510</guid><author>lmh12506</author><pubDate>Wed, 08 May 2013 17:38:36 +0800</pubDate><description><![CDATA[MySQL Create Table语句的应用与语法





以下的文章主要介绍的是MySQL Create Table语句的实际用法与MySQL Create Table语句的基本语法的介绍，如果你对其具体的操作步骤感兴趣的话，你就可以对以下的文章来一个“大阅兵”。

MySQL中create table语句的基本语法是：




CREATE [TEMPORARY]]]></description><category></category></item><item><title><![CDATA[Boost智能指针——shared_ptr]]></title><link>https://blog.youkuaiyun.com/lmh12506/article/details/8897015</link><guid>https://blog.youkuaiyun.com/lmh12506/article/details/8897015</guid><author>lmh12506</author><pubDate>Tue, 07 May 2013 20:14:40 +0800</pubDate><description><![CDATA[Boost智能指针——shared_ptr




boost::scoped_ptr虽然简单易用，但它不能共享所有权的特性却大大限制了其使用范围，而boost::shared_ptr可以解决这一局限。顾名思义，boost::shared_ptr是可以共享所有权的智能指针，首先让我们通过一个例子看看它的基本用法：
#include 
#include 
#include 

c]]></description><category></category></item></channel></rss>