- 浏览: 285470 次
- 性别:
- 来自: 上海
最新评论
-
zhengalways:
samwalt 写道zhengalways 写道samwalt ...
“程序包com.sun.image.codec.jpeg不存在”问题解决 -
samwalt:
zhengalways 写道samwalt 写道zhengal ...
“程序包com.sun.image.codec.jpeg不存在”问题解决 -
zhengalways:
samwalt 写道zhengalways 写道博主你好,刚用 ...
“程序包com.sun.image.codec.jpeg不存在”问题解决 -
samwalt:
zhengalways 写道博主你好,刚用idea,切换成jr ...
“程序包com.sun.image.codec.jpeg不存在”问题解决 -
zhengalways:
博主你好,刚用idea,切换成jre也不行啊,崩溃
“程序包com.sun.image.codec.jpeg不存在”问题解决
文章列表
hadoop性能调优
- 博客分类:
- hadoop
1 选择Mapper的数量
Hadoop处理大量小文件的性能比较逊色,主要由于生成的每个分片都是一整个文件,Map操作时只会处理很少的输入数据,但是会产生很多Map任务,每个Map任务的运行都包括产生、调度和结束时间,大量的 ...
rails 3.1.0.rc4遇到的若干错误
- 博客分类:
- ruby
安装了rails 3.1.0.rc4,启动rails时遇到了javascript的运行时问题,
原因是缺少了javascript运行时环境。运行时环境见execjs的项目主页:
https://github.com/sstephenson/execjs
therubyracer - Google V8 embedded within Ruby
therubyrhino - Mozilla Rhino embedded within JRuby
Johnson - Mozilla SpiderMonkey embedded within Ruby
Mustang ...
nokogiri是解析html的插件,安装出错信息:
libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
解决方法:
sudo apt-get install libxslt-dev libxml2-dev
1、hadoop-root-datanode-master.log 中有如下错误:
ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in
导致datanode启动不了。
原因:每次namenode format会重新创建一个namenodeId,而dfs.data.dir参数配置的目录中包含 ...
ruby 1.9.2
rails 3.1.0
will_paginate 3.0.1
Gemfile里添加
gem 'will_paginate', '3.0.1'
改写controller,
@products = Product.paginate(:per_page => 2, :page => params[:page])
改写index.html.erb
加上
<%= will_paginate @products %>
ok
1、error_messages_for方法用到的插件dynamic_form,
https://github.com/rails/dynamic_form
gem install dynamic_form
2、支持mysql enum类型的插件enum_column
https://github.com/electronick/enum_column
不支持rails3
rails 3.0.7
ruby 1.9.2
ubuntu 10.04
错误提示:no such file to load -- openssl
解决:
sudo apt-get install libssl-dev
到ruby源代码目录的 ext/openssl目录中
ruby extconf.rb
make
sudo make install
如果这条语句执行出错
ruby extconf.rb
安装openssl的开发包
sudo apt-get install libglobus-openssl-dev
此错误也可以用上面的方法解决,Unable to require op ...
ruby 1.9.2
rails 2.3.3 -> 3.0.7
ruby script/server 启动应用
出现错误:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- script/../config/boot (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/server:2:in `<main>'
解决方法: ...
源代码
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.i ...
1、安装Exuberant Ctags
下载ctags-5.8.tar.gz
tar -zxf ctags-5.8.tar.gz
cd ctags-5.8
./configure --prefix=/usr/local/ctags
make
sudo make install
进入源代码目录,生成tag文件
cd ~/code/
ctags -R
用vim打开某个源代码文件,在vim中运行命令:
:set tags=~/code/tags
2、安装TagList
下载taglist_45.zip
把plugin中的文件解压到/usr/share/vim/vim72/plugin
...
两台机器组成一个小实验集群,一台master,一台slave1。
OS: Red Hat Enterprise Linux 5
Java: jdk1.6
hadoop: 0.20.2
master机器的配置情况:
编辑/etc/hosts文件,加上master和slave1的ip地址
编辑hadoop-0.20.2/conf/masters文件,加上"master"
编辑hadoop-0.20.2/conf/slaves文件,加上"slave1"
编辑hadoop-0.20.2/conf/hadoop-env.sh文件,
加上JAVA_HOME路径:
...
ubuntu 10.04
ruby 1.8.7
rubygems 1.3.7
解决方法:
安装zlib1g-dev包
sudo apt-get install zlib1g-dev
到ruby1.8.7源码的ext/zlib目录下
ruby extconf.rb
make
sudo make install
解决了
File.open("filename", "r") do |file|
file.each_line do |line|
puts line
end
end
例如:
set classpath
set path
classpath和path是环境变量
或者
echo %classpath%
echo %path%