不应该是F:\cygwin\usr\local\lib,而应该是所有jar文件用分号隔开的形式:
F:\cygwin\usr\local\lib\a.jarF:\cygwin\usr\local\lib\b.jar
cygwin elasticsearch java需要安装哪些包1.critical:每次允许一个线程执行
2.single:只由一个线程执行一次
3.automic:功能类似critical,不过所属指令为简单的表达式,这样减少开销
4.master:仅由主线程执行
5.omp_set_num_threads:设置线程数,用在程序中
6.omp_get_num_threads:获取线程总数
7.omp_get_thread_num:获取当前线程序号id
8.OMP_NUM_THREADS:环境变量级别的线程总数限定,优先级最低,omp_set_num_threads是程序级别的,优先级较高;子句num_threads(i)是block级别,优先级最高
环境及软件准备:win7(64位)
cygwin 1.7.9-1
jdk-6u25-windows-x64.zip
hadoop-0.20.2.tar.gz
1.安装jdk,并置java环境变量包括:JAVA_HOME,PATH,CLASSPATH
2.安装Hadoop,版本为0.20.2,我是直接放到/home目录下,并解压
tar –zxvf
hadoop-0.20.2.tar.gz
3.配置Hadoop,需要修改hadoop的配置文件,它们位于conf子目录下,分别是hadoop-env.sh、core-site.xml、hdfs-site.xml
和mapred-site.xml
(1) 修改hadoop-env.sh:
只需要将JAVA_HOME 修改成JDK 的安装目录即可
export
JAVA_HOME=/cygdrive/d/java/jdk1.6.0_25
(注意:路径不能是windows 风格的目录d:\java\jdk1.6.0_25,而是LINUX
风格/cygdrive/d/java/jdk1.6.0_25)
(2) 修改core-site.xml:(指定namenode)
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
(3)修改hdfs-site.xml(指定副本为1)
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
(4) 修改mapred-site.xml (指定jobtracker)
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
4.验证安装是否成功,并运行Hadoop
(1) 验证安装
$ bin/hadoop
Usage: hadoop [--config confdir] COMMAND
where COMMAND is one of:
namenode -format format the DFS filesystem
secondarynamenode run the DFS secondary namenode
namenode run the DFS namenode
datanode run a DFS datanode
dfsadmin run a DFS admin client
mradmin run a Map-Reduce admin client
fsck run a DFS filesystem checking utility
fs run a generic filesystem user client
balancer run a cluster balancing utility
jobtracker run the MapReduce job Tracker node
pipes run a Pipes job
tasktracker run a MapReduce task Tracker node
job manipulate MapReduce jobs
queue get information regarding JobQueues
version print the version
jar <jar>run a jar file
distcp <srcurl><desturl>copy file or directories recursively
archive -archiveName NAME <src>* <dest>create a hadoop archive
daemonlog get/set the log level for each daemon
or
CLASSNAME run the class named CLASSNAME
Most commands print help when invoked w/o parameters.
(2) 格式化并启动Hadoop
bi
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)