Building Go 1.5 on the Raspberry Pi

This is a short post to describe my recommended method for building Go on the Raspberry Pi. This method has been tested on the Raspberry Pi 2 Model B (900Mhz, 1Gb ram) and the older Raspberry Pi 1 Model B+ (700Mhz, 512Mb ram). This method will build Go 1.5 into you home directory, /usr/local/go. As […]

protoc –version’ did not return a version

按照hadoop官方网站的文档,路径为http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-common/SingleCluster.html.用svn co http://svn.apache.org/repos/asf/hadoop/common/trunk下载资源,使用 mvn clean install -DskipTests 进行编译时候,抛出异常 INFO] ———————————————————————— [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: ‘protoc –version’ did not return a version -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable […]

Hadoop快速入门

目的 这篇文档的目的是帮助你快速完成单机上的Hadoop安装与使用以便你对Hadoop分布式文件系统(HDFS)和Map-Reduce框架有所体会,比如在HDFS上运行示例程序或简单作业等。   先决条件   支持平台 GNU/Linux是产品开发和运行的平台。 Hadoop已在有2000个节点的GNU/Linux主机组成的集群系统上得到验证。 Win32平台是作为开发平台支持的。由于分布式操作尚未在Win32平台上充分测试,所以还不作为一个生产平台被支持。   所需软件 Linux和Windows所需软件包括: JavaTM1.5.x,必须安装,建议选择Sun公司发行的Java版本。 ssh 必须安装并且保证 sshd一直运行,以便用Hadoop 脚本管理远端Hadoop守护进程。 Windows下的附加软件需求 Cygwin – 提供上述软件之外的shell支持。   安装软件 如果你的集群尚未安装所需软件,你得首先安装它们。 以Ubuntu Linux为例: $ sudo apt-get install ssh $ sudo apt-get install rsync 在Windows平台上,如果安装cygwin时未安装全部所需软件,则需启动cyqwin安装管理器安装如下软件包: openssh – Net 类   下载 为了获取Hadoop的发行版,从Apache的某个镜像服务器上下载最近的 稳定发行版。   运行Hadoop集群的准备工作 解压所下载的Hadoop发行版。编辑 conf/hadoop-env.sh文件,至少需要将JAVA_HOME设置为Java安装根路径。 尝试如下命令: $ bin/hadoop 将会显示hadoop 脚本的使用文档。 现在你可以用以下三种支持的模式中的一种启动Hadoop集群: […]

5 Steps to Take Care of Your MongoDB Performance

Do you face some performance issues in your MongoDB setup? In this case follow these steps to provide some first aid to your system and gain some space for a long term architecture (such as Sharding). Step 1: Enable Slow Queries Get intelligence about your system behavior and performance bottlenecks. Usually there is a high correlation between the […]

Getting Started With Hubot

You will need node.js and npm. Joyent has an excellent blog post on how to get those installed, so we’ll omit those details here. Once node and npm are ready, we can install the hubot generator: % npm install -g yo generator-hubot This will give us the hubot yeoman generator. Now we can make a […]

resin-pro-4.0.43 crack 破解文件下载

resin-pro-4.0.43 crack 破解文件下载 resin-pro-4.0.43 破解文件下载pro.jar resin pro 4.0.43 Full Cracked download. 下载pro.jar文件,覆盖原来lib目录的pro.jar文件即可。 仅供学习使用,请在下载后24时间内删除。

resin-pro-4.0.42 crack 破解文件下载

resin-pro-4.0.42 crack 破解文件下载 resin-pro-4.0.42 破解文件下载pro.jar resin pro 4.0.42 Full Cracked download. 下载pro.jar文件,覆盖原来lib目录的pro.jar文件即可。 仅供学习使用,请在下载后24时间内删除。

用bash解决hadoop的磁盘空间检查性能问题

项目使用的hadoop已经存放了3000W+的文件, 为了节省成本,当时抢建平台时,使用了组装服务器+普通硬盘 hadoop每次做du操作都非常耗时,于是把hadoop代码改了一个 使用一个bash脚本替代原来du操作。 bash: #/bin/sh mydf=$(df $2 | grep -vE ‘^Filesystem|tmpfs|cdrom’ | awk ‘{ print $3 }’) echo -e “$mydf\t$2” java:hadoop\src\core\org\apache\hadoop\fs\DU.java:168行的toString()及getExecString()方法 public String toString() { return “mydu -sk ” + dirPath +”\n” + used + “\t” + dirPath; } protected String[] getExecString() { return new String[] {“mydu”, “-sk”, dirPath}; } 改造后,原来的du操作其他不耗时。 只是存在统计不准确的问题,不过并不影响hadoop运作。

mongodb数据迁移2种方式比较

尝试了2种方式对数据进行迁移,一种是rsync,直接拉取数据;另一种是使用mongodump/mongorestore 1.rsync 操作步骤: 1.2: [mongodb] path = /data1/mongodb/data hosts allow = 192.168.1.0/24 read only = no write only = no 1.3: rsync -avz [email protected]::mongodb/dbname /data/mongodb-linux-x86_64-1.8.1/data/ chown -R mongodb:mongodb /data/mongodb-linux-x86_64-1.8.1/data/ 使用时间:50分钟 到目标服务器数据:50G 优点:使用时间短 缺点:需要配置rsync,数据占用的空间大(数据原封不动的拉取过来,包括碎片) 2.mongodump/mongorestore 操作步骤: mongodump: /data/PRG/mongodb/bin/mongodump –host 192.168.1.2:27017 -d dbname -uuername -ppasswd -o /data/mongodb-linux-x86_64-1.8.1/data/ –directoryperdb mongorestore: /data/mongodb-linux-x86_64-1.8.1/bin/mongorestore –dbpath /data/mongodb-linux-x86_64-1.8.1/data/ –directoryperdb /data/dbname/ chown -R mongodb:mongodb […]

mongodb sharding cluster(分片集群)

MongoDB的auto-sharding功能是指mongodb通过mongos自动建立一个水平扩展的数据库集群系统,将数据库分表存储在sharding的各个节点上。 通过把Sharding和Replica Sets相结合,可以搭建一个分布式的,高可用性,自动水平扩展的集群。 要构建MongoDB Sharding Cluster,需要三种角色: Shard Server: mongod 实例, 使用 Replica Sets,确保每个数据节点都具有备份、自动容错转移、自动恢复能力。用于存储实际的数据块,实际生产环境中一个shard server角色可由几台机器组个一个relica set承担,防止主机单点故障 Config Server: mongod 实例,使用 3 个配置服务器,确保元数据完整性(two-phase commit)。存储了整个 Cluster Metadata,其中包括 chunk 信息。 Route Server: mongos 实例,配合 LVS,实现负载平衡,提高接入性能(high performance)。前端路由,客户端由此接入,且让整个集群看上去像单一数据库,前端应用可以透明使用。 环境如下: 192.168.198.131 shard1:10001 shard2:10002 shard3:10003 config1:20000 192.168.198.129 shard1:10001 shard2:10002 shard3:10003 config2:20000 192.168.198.132 shard1:10001 shard2:10002 shard3:10003 config3:20000 192.168.198.133 mongos:27017 分别在三台服务器上安装mongod服务,安装如下: # wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.3.tgz # […]