服务器端server.php<?php
/*
Swoole已经内置了心跳检测功能,能自动close掉长时间没有数据来往的连接。
而开启心跳检测功能,只需要设置heartbeat_check_interval和heartbeat_idle_time即可。如下:
$this->serv->set(
array(
‘heartbeat_check_interval‘=>60,
‘he..
分类:
其他好文 时间:
2014-11-10 15:45:01
阅读次数:
179
Hadoop2NameNodeHA配置Hadoop2官方提供了两种NameNodeHA的实现方式,分别基于QJM和NFS,这里以基于QJM的HDFSHA为例。实验环境系统版本:CentOSrelease6.4(Final)Hadoop版本:ApacheHadoop2.5.1Hive版本:Hive0.13.1IP列表IPHostnameNameNodeDataNodeRMNodeManagerJournalNode192..
分类:
其他好文 时间:
2014-11-08 02:16:48
阅读次数:
322
ant -f .xml tagetjavac *.java -cp a.jar;b.jar;c.jar(跟上jar包)(Linux useradd 无效)cd vi .bash_profile 修改为PATH=$PATH:/usr/sbin/useraddyast(Linux 看GUI界面 ha.....
分类:
其他好文 时间:
2014-11-07 18:53:41
阅读次数:
191
1、用的地方不一样 where可以用在select update delete insert......into语句中 having只能用在select语句中2、执行顺序不一样 where的搜索条件是在执行语句进行分组之前应用 having的搜索条件是在分组条件之后执行的如果where和ha...
分类:
其他好文 时间:
2014-11-07 16:53:17
阅读次数:
167
#include#include#includeusing namespace std; #define HASHSIZE 7#define NULLKEY -32768 struct HashTable{ int *elem; int count;};void init(HashTable* ha...
分类:
其他好文 时间:
2014-11-05 23:04:37
阅读次数:
153
1.安装heartbeat下载需要的源:wgetftp://mirror.switch.ch/pool/1/mirror/scientificlinux/6rolling/x86_64/os/Packages/epel-release-6-5.noarch.rpm2.安装heartbeat:yum-yinstallheartbeat*3.配置heartbeat3.1.拷贝模板配置文件:cp/usr/share/doc/heartbeat-3.0.4/ha.cf/e..
分类:
其他好文 时间:
2014-10-30 19:24:48
阅读次数:
177
【题目】
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would ha...
分类:
编程语言 时间:
2014-10-30 17:02:57
阅读次数:
249
本文接上文介绍atlas的安装配置,以及借助keepalive软件实现altas的ha,避免由于atlas故障,导致数据库服务中断的情况出现:一:环境介绍Atlas主:192.168.1.12/24Atlas从:192.168.1.81/24Atlasvip:192.168.1.230/24Atlaswrite:master:192.168.1.225/24Slave1:192.168.1.226..
分类:
数据库 时间:
2014-10-29 19:36:01
阅读次数:
853
本篇文档主要解决2个问题:1. centos5通过yum安装的master版本肯定低于centos6安装的minion,所以必须升级salt-master2. zeromq版本太低会报这个错2014-10-29 14:36:04,597 [salt.master ][WARNING ] You ha...
分类:
其他好文 时间:
2014-10-29 18:33:13
阅读次数:
197
前提:使用阿里巴巴的JSON包String json = ""; //JSON字符串Map map = JSON.parseObject(json, Map.class);//遍历 Map 使用迭代器Iterator it = map.keySet().iterator();while(it.ha....
分类:
Web程序 时间:
2014-10-29 10:47:19
阅读次数:
130