部分转载,已标红源地址,本博客为本菜搭建与爬坑记录,整理版请看:

https://blog.csdn.net/the_fool_/article/details/78211166

记录:

============================================2017.8.30=====================================================

官网下载推荐的包,需要看清楚搭配的版本,hadoop对应的jdk'与spark版本是什么?spark对应的scala版本是什么?这些都需要留意好。

2017.8.30,我在官网下载了如下三个包:

hadoop-2.8.0.tar.gz

scala-2.11.4.tar

spark-2.2.0-bin-hadoop2.7.tgz

系统最开始用的wubantu 13.10.,配置过程中出了些问题,后来改用Ubuntu16.04

修改主机名:

1.修改主机名:

主节点主机名称:Hadoop-host,IP地址:192.168.1.200

//节点1:Hostname:Hadoopnode1,IP:10.10.11.254,由于搭建standalone测试,暂未配置子节点

修改/etc/host、hostname文件,注意请在host文件中一并添加hadoopnode1机器的IP地址。

192.168.1.200 Hadoop-host
//192.168.1.201 hadoopnode1
:: localhost

立即生效:sudo /etc/init.d/networking restart

jdk安装:

1、下载jdk8,目前官网不用注册可以下,有rpm和tar,gz,乌班图好像不支持rpm,所以下了tar版

2、tar -xvf  jdk8解压

3、配置环境变量:

=======================================================================

vi编辑器键盘不好用,:

教程说卸载更新:

sudo apt-get remove vi
sudo apt-get install vim

安装:由于没配置下载源,卡在这里,完蛋了。。。信了教程的邪。。。所以安装完新系统首先配置源

图形界面可以用gedit配置源,也可以直接下载tar包进行安装,注意,安装时会用到依赖包需要一并下载,所以安装完新系统首先配置源X2

=======================================================================

当时的解决过程:

下载了vim8.tar.gz解压

./configure

make

make instal 提示少lncurses  下载解压

./configure

make

make install

vim安装成功。

==========================================================================

配置jdk环境变量:

vim /etc/profile

最后加上,:是拼接的意思,拼接到path

export JAVA_HOME=/usr/jdk8/jdk1.8.0_144
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH

赶不上车了,风紧扯呼

Java -version 成功

=========================================2017.8.31===================================================

看版本:

cat /etc/issue

先配置源:

备份:sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

编辑:sudo gedit /etc/apt/sources.list 删除内容添加网易的源,保存。

更新: sudo apt-get update

安装hadoop

vim /etc/hostname  改名为hadoop-spark1

固定ip方法(摘抄自别人博客,忘记地址了,抱歉):

设置静态IP方法如下:

  #sudo vim /etc/network/interfaces

  #修改如下部分:

  auto eth0
  iface eth0 inet static
  address 192.168.0.117
  gateway 192.168.0.1 #这个地址你要确认下网关是不是这个地址
  netmask 255.255.255.0
  network 192.168.0.0
  broadcast 192.168.0.255

  因为以前是dhcp解析,所以会自动分配dns服务器地址,而一旦设置为静态ip后就没有自动获取到的dns服务器了,设置静态IP地址后,再重启后就无法解析域名。想重新设置一下DNS,有两个办法:

  • 通过/etc/network/interfaces,在它的最后增加一句:

    dns-nameservers 8.8.8.8

    8.8.8.8是Google提供的DNS服务,这里只是举一个例子,你也可以改成电信运营商的DNS。重启后DNS就生效了。

网通:202.102.134.68   202.102.128.68

电信:219.146.0.130    219.150.32.132

  • 通过修改:

    /etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)

    在里面插入:
    nameserver 8.8.8.8
    nameserver 8.8.4.4

    如果有多个DNS就一行一个,修改好保存,然后执行resolvconf -u再看/etc/resolv.conf,最下面就多了2行:

    nameserver 8.8.8.8
    nameserver 8.8.4.4

立即生效sudo /etc/init.d/networking restart或sudo service network-manager restart

关闭防火墙 #ufw disable

ufw -status  查看状态

(其他版本好像是iptable)

安装scala

vim /etc/profile

继续添加环境变量:

export JAVA_HOME=/usr/jdk8/jdk1.8.0_144
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
export SCALA_HOME=/usr/scala2.1/scala-2.11.4
export PATH=$SCALA_HOME/bin:$PATH

添加完成source生效
root@tutu-virtual-machine:~# source /etc/profile

查看版本:
root@tutu-virtual-machine:~# scala -version

安装hadoop

解压

配置环境变量:

export JAVA_HOME=/usr/jdk8/jdk1.8.0_144
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
export SCALA_HOME=/usr/scala2.1/scala-2.11.4
export PATH=$SCALA_HOME/bin:$PATH
export HADOOP_HOME=/usr/hadoop/hadoop-2.8.0
export PATH=$PATH:$HADOOP_HOME/bin

source

配置vim hadoop-env.sh文件 添加JAVA_HOME

source

hadoop version

安装完成================================================下班~

配置hadoop

补充:切换图形与命令:alt'+ctrl+F1-F7

安装ssh:由于版本对应的源过期(13.4),使用了15的源,还好能用

apt-get install ssh-server(根据提示选择了一个版本,名字不太一样)

ps -e|grep ssh显示 sshd的进程在执行,ok!

挂载u盘(只支持格式为fat32的,格式化) mount  -t vfat  /dev/sdb(这个是当前u盘名字,又命令查看,忘了,根据提示来就行)        /mnt/usb(u盘内容这里找,最开始需要创建目录)

授权:

chmod a+xrw xxx.file

递归是 -R    chmod 777 * -R

查看文件大小 du命令

==========================================================

配置hadoop的各个配置文件(包括之前配置的hadoop环境变量):

涉及的配置文件如下(下面很多是抄的,地址当时没记,自用): 
A:hadoop-2.8.0/etc/hadoop/hadoop-env.sh 
B:hadoop-2.8.0/etc/hadoop/yarn-env.sh 
C:hadoop-2.8.0/etc/hadoop/core-site.xml 
D:hadoop-2.8.0/etc/hadoop/hdfs-site.xml 
E:hadoop-2.8.0/etc/hadoop/mapred-site.xml 
F:hadoop-2.8.0/etc/hadoop/yarn-site.xml

1、创建文件夹:hadoop目录下

#mkdir tmp     hadoop临时文件

#mkdir hdfs/name   hdfsNODE

#mkdir hdfs/data      hdfsDATA

2、

A:hadoop-2.8.0/etc/hadoop/hadoop-env.sh  配置JAVA_HOME,配置完成后hadoop version 查看版本信息

B:hadoop-2.8.0/etc/hadoop/yarn-env.sh         配置JAVA_HOME 不知道哪个组件用的,这个版本没有,不需要配置
C:hadoop-2.8.0/etc/hadoop/core-site.xml      配置Hadoop的文件系统与临时文件存放

添加如下配置:

<configuration>

<property>

<name>fs.default.name</name>

<value>hdfs://localhost:9000</value>

<description>HDFS的URI,文件系统://namenode标识:端口号</description>

</property>

<property>

<name>hadoop.tmp.dir</name>

<value>/usr/hadoop/tmp</value>

<description>namenode上本地的hadoop临时文件夹</description>

</property>

</configuration>

D:hadoop-2.8.0/etc/hadoop/hdfs-site.xml 配置HDFS

<configuration>

<!—hdfs-site.xml-->

<property>

<name>dfs.name.dir</name>

<value>/usr/hadoop/hdfs/name</value>

<description>namenode上存储hdfs名字空间元数据</description>

</property>

<property>

<name>dfs.data.dir</name>

<value>/usr/hadoop/hdfs/data</value>

<description>datanode上数据块的物理存储位置</description>

</property>

<property>

<name>dfs.replication</name>

<value>1</value>

<description>副本个数,配置默认是3,应小于datanode机器数量</description>

</property>

</configuration>

E:hadoop-2.8.0/etc/hadoop/mapred-site.xml 版本不同没找到,2.8.0我配置了mapred-site.xml.template

<configuration>

<property>

<name>mapreduce.framework.name</name>

<value>yarn</value>

</property>

</configuration>

F:hadoop-2.8.0/etc/hadoop/yarn-site.xml  配置map-reduce

<configuration>

<property>

<name>yarn.nodemanager.aux-services</name>

<value>mapreduce_shuffle</value>

</property>

<property>

<name>yarn.resourcemanager.webapp.address</name>

<value>IP:8099</value>

</property>

</configuration>

修改:

<configuration>

<property>    
  <name>yarn.resourcemanager.address</name>    
  <value>hadoop-host:18040</value>    
</property>    
<property>    
  <name>yarn.resourcemanager.scheduler.address</name>    
  <value>hadoop-host:18030</value>    
</property>    
<property>    
  <name>yarn.resourcemanager.webapp.address</name>    
  <value>hadoop-host:18088</value>    
</property>    
<property>    
  <name>yarn.resourcemanager.resource-tracker.address</name>    
  <value>hadoop-host:18025</value>    
</property>    
<property>    
  <name>yarn.resourcemanager.admin.address</name>    
  <value>hadoop-host:18141</value>    
</property>    
<property>    
  <name>yarn.nodemanager.aux-services</name>    
  <value>mapreduce_shuffle</value>    
</property>    
<property>    
  <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>    
  <value>org.apache.hadoop.mapred.ShuffleHandler</value>    
</property>    
</configuration>

1.修改主机名:

修改/etc/host、hostname文件,注意请在host文件中一并添加hadoopnode1机器的IP地址。

10.10.11.225 Hadoop-host
10.10.11.254 hadoopnode1
:: localhost

=============配置完成,启动==============

#hadoop namenode -format

启动报错,正常,照着配完能用就见鬼了。接下来是解决问题了,有问题怎么办,找度娘

org.xml.sax.SAXParseException; systemId: file:/usr/hadoop/hadoop-2.8.0/etc/hadoop/hdfs-site.xml; lineNumber: 21; columnNumber: 3; The content of elements must consist of well-formed character data or markup.

百度说xml内容原因,可能多打了个空格。ok,没报错。

SHUTDOWN_MSG: Shutting down NameNode at hadoop-spark1/123.129.254.12
/etc/host 对应ip

将集群中每个datanode的/hdfs/data/current中的VERSION删掉,然后执行hadoop namenode -format

重启集群,错误消失。

==================================以上都没用,推测是映射出问题了,123.129.254.12是什么鬼?卡了两小时了,不搞了20170905

无从解决,百度不到,重新安装了新版本Ubuntu16.4

遇到了新问题:关于网卡,要配置ifconfig里那个名字

配置hadoop

export JAVA_HOME=/usr/local/jdk1.8.0_144
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop-2.8.0
export PATH=$PATH:$HADOOP_HOME/bin

source /etc/profile
hadoop version

配置:摘抄地址: http://www.cnblogs.com/jizhong/p/6813882.html

/hadoop2.6/etc/hadoop/

1、=========core-site.xml

<configuration>
      
    <property>   
        <name>hadoop.tmp.dir</name>   
        <value>/usr/hadoop/tmp</value>
        <final>true</final>
        <description>A base for other temporary directories.</description>
    </property>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://192.168.1.200:9000</value>
    <!-- hdfs://Master.Hadoop:22-->
            <final>true</final>
    </property>
    <property>
         <name>io.file.buffer.size</name>
         <value>131072</value>
    </property>
    </configuration>
2===========hdfs-site.xml

<configuration>
<property>
<name>dfs.replication</name>
<value></value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/usr/local/hadoop/hdfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/usr/local/hadoop/hdfs/data</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
  cp mapred-site.xml.template mapred-site.xml

3、mapred-site.xml

    <configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

yarn-site.xml

<property>
<name>yarn.resourcemanager.address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>hadoop-host:</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>

hadoop-env.sh

export JAVA_HOME=/usr/local/jdk1.8.0_144

设置关键的分布式IP地址配置:(补充:只配置slaves文件也可以)

masters文件:

10.10.11.225

slaves文件:

10.10.11.254
10.10.11.225

如果在slaves文件里面没有包含Hadoop主机IP,那么启动时会只有一个datanode.

至此Hadoop配置工作告一段落。

最后,利用命令:scp –r /usr/hadoop root@hadoopnode1 :/usr/,将hadoop配置分发至hadoopnode1节点计算机。

hadoop namenode -format

/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ubuntu/219.146.13.36

/*********************************************************

名称数不对的,改了名字为hadoop-host,重启下看看

/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at Hadoop-host/127.0.1.1
************************************************************/

发现存放hdfs配置文件创建的目录不对(手冻疮的的三个目录地址),修改

配置文件详解:http://www.cnblogs.com/yinghun/p/6230436.html

没有报错信息,没头绪

-===============================================================================================================

root@Hadoop-host:/usr/local/hadoop-2.8.0/etc# hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

17/09/13 05:01:42 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   user = root
STARTUP_MSG:   host = Hadoop-host/127.0.1.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 2.8.0
STARTUP_MSG:   classpath = /usr/local/hadoop-2.8.0/etc/hadoop:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/hadoop-annotations-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jets3t-0.9.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/json-smart-1.1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jetty-sslengine-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/asm-3.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/slf4j-api-1.7.10.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/gson-2.2.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-collections-3.2.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jersey-server-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/junit-4.11.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jersey-core-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jsch-0.1.51.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jsp-api-2.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jsr305-3.0.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/netty-3.6.2.Final.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/avro-1.7.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jetty-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/nimbus-jose-jwt-3.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/stax-api-1.0-2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-configuration-1.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/xz-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-io-2.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/mockito-all-1.8.5.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-logging-1.1.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/xmlenc-0.52.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-math3-3.1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/curator-recipes-2.7.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/zookeeper-3.4.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jersey-json-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/hadoop-auth-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/httpcore-4.4.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-lang-2.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-codec-1.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/curator-framework-2.7.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-net-3.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/curator-client-2.7.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jettison-1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/paranamer-2.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-compress-1.4.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-digester-1.8.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/hamcrest-core-1.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jetty-util-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/commons-cli-1.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/httpclient-4.5.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/guava-11.0.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/jcip-annotations-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/servlet-api-2.5.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/activation-1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/log4j-1.2.17.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/lib/htrace-core4-4.0.1-incubating.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/hadoop-common-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/hadoop-common-2.8.0-tests.jar:/usr/local/hadoop-2.8.0/share/hadoop/common/hadoop-nfs-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/asm-3.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/hadoop-hdfs-client-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/okhttp-2.4.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/okio-1.4.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jsr305-3.0.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/xml-apis-1.3.04.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-io-2.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/netty-all-4.0.23.Final.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/guava-11.0.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/xercesImpl-2.9.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/lib/htrace-core4-4.0.1-incubating.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-client-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-nfs-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-2.8.0-tests.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.0-tests.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-client-2.8.0-tests.jar:/usr/local/hadoop-2.8.0/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/objenesis-2.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/asm-3.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-collections-3.2.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jersey-server-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/guice-3.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jersey-core-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jsr305-3.0.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jetty-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/zookeeper-3.4.6-tests.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/javassist-3.18.1-GA.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/fst-2.24.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/xz-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-io-2.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/javax.inject-1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jersey-json-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-lang-2.6.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-codec-1.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/curator-test-2.7.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/aopalliance-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/curator-client-2.7.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jettison-1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-cli-1.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/guava-11.0.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/jersey-client-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/commons-math-2.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/servlet-api-2.5.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/activation-1.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/lib/log4j-1.2.17.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-client-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-tests-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-common-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-api-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-registry-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-server-common-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/hadoop-annotations-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/asm-3.2.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/guice-3.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/junit-4.11.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/xz-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/javax.inject-1.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.8.0.jar:/usr/local/hadoop-2.8.0/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.0-tests.jar:/usr/local/hadoop-2.8.0/contrib/capacity-scheduler/*.jar:/usr/local/hadoop-2.8.0/contrib/capacity-scheduler/*.jar
STARTUP_MSG:   build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r 91f2b7a13d1e97be65db92ddabc627cc29ac0009; compiled by 'jdu' on 2017-03-17T04:12Z
STARTUP_MSG:   java = 1.8.0_144
************************************************************/
17/09/13 05:01:42 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
17/09/13 05:01:42 INFO namenode.NameNode: createNameNode [-format]
17/09/13 05:01:44 WARN common.Util: Path /usr/local/hadoop-2.8.0/hdfs/name should be specified as a URI in configuration files. Please update hdfs configuration.
17/09/13 05:01:44 WARN common.Util: Path /usr/local/hadoop-2.8.0/hdfs/name should be specified as a URI in configuration files. Please update hdfs configuration.
Formatting using clusterid: CID-558fe878-aea0-4f65-a0b0-34db4c6ca4ce
17/09/13 05:01:44 INFO namenode.FSEditLog: Edit logging is async:false
17/09/13 05:01:44 INFO namenode.FSNamesystem: KeyProvider: null
17/09/13 05:01:44 INFO namenode.FSNamesystem: fsLock is fair: true
17/09/13 05:01:44 INFO namenode.FSNamesystem: Detailed lock hold time metrics enabled: false
17/09/13 05:01:44 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
17/09/13 05:01:44 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
17/09/13 05:01:44 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
17/09/13 05:01:44 INFO blockmanagement.BlockManager: The block deletion will start around 2017 Sep 13 05:01:44
17/09/13 05:01:44 INFO util.GSet: Computing capacity for map BlocksMap
17/09/13 05:01:44 INFO util.GSet: VM type       = 64-bit
17/09/13 05:01:44 INFO util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
17/09/13 05:01:44 INFO util.GSet: capacity      = 2^21 = 2097152 entries
17/09/13 05:01:44 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
17/09/13 05:01:44 INFO blockmanagement.BlockManager: defaultReplication         = 1
17/09/13 05:01:44 INFO blockmanagement.BlockManager: maxReplication             = 512
17/09/13 05:01:44 INFO blockmanagement.BlockManager: minReplication             = 1
17/09/13 05:01:44 INFO blockmanagement.BlockManager: maxReplicationStreams      = 2
17/09/13 05:01:44 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
17/09/13 05:01:44 INFO blockmanagement.BlockManager: encryptDataTransfer        = false
17/09/13 05:01:44 INFO blockmanagement.BlockManager: maxNumBlocksToLog          = 1000
17/09/13 05:01:44 INFO namenode.FSNamesystem: fsOwner             = root (auth:SIMPLE)
17/09/13 05:01:44 INFO namenode.FSNamesystem: supergroup          = supergroup
17/09/13 05:01:44 INFO namenode.FSNamesystem: isPermissionEnabled = false
17/09/13 05:01:44 INFO namenode.FSNamesystem: HA Enabled: false
17/09/13 05:01:44 INFO namenode.FSNamesystem: Append Enabled: true
17/09/13 05:01:45 INFO util.GSet: Computing capacity for map INodeMap
17/09/13 05:01:45 INFO util.GSet: VM type       = 64-bit
17/09/13 05:01:45 INFO util.GSet: 1.0% max memory 966.7 MB = 9.7 MB
17/09/13 05:01:45 INFO util.GSet: capacity      = 2^20 = 1048576 entries
17/09/13 05:01:45 INFO namenode.FSDirectory: ACLs enabled? false
17/09/13 05:01:45 INFO namenode.FSDirectory: XAttrs enabled? true
17/09/13 05:01:45 INFO namenode.NameNode: Caching file names occurring more than 10 times
17/09/13 05:01:45 INFO util.GSet: Computing capacity for map cachedBlocks
17/09/13 05:01:45 INFO util.GSet: VM type       = 64-bit
17/09/13 05:01:45 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
17/09/13 05:01:45 INFO util.GSet: capacity      = 2^18 = 262144 entries
17/09/13 05:01:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
17/09/13 05:01:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
17/09/13 05:01:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension     = 30000
17/09/13 05:01:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10
17/09/13 05:01:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10
17/09/13 05:01:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25
17/09/13 05:01:45 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
17/09/13 05:01:45 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
17/09/13 05:01:45 INFO util.GSet: Computing capacity for map NameNodeRetryCache
17/09/13 05:01:45 INFO util.GSet: VM type       = 64-bit
17/09/13 05:01:45 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
17/09/13 05:01:45 INFO util.GSet: capacity      = 2^15 = 32768 entries
17/09/13 05:01:45 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1249050919-127.0.1.1-1505304105628
17/09/13 05:01:45 INFO common.Storage: Storage directory /usr/local/hadoop-2.8.0/hdfs/name has been successfully formatted.
17/09/13 05:01:45 INFO namenode.FSImageFormatProtobuf: Saving image file /usr/local/hadoop-2.8.0/hdfs/name/current/fsimage.ckpt_0000000000000000000 using no compression
17/09/13 05:01:45 INFO namenode.FSImageFormatProtobuf: Image file /usr/local/hadoop-2.8.0/hdfs/name/current/fsimage.ckpt_0000000000000000000 of size 321 bytes saved in 0 seconds.
17/09/13 05:01:45 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
17/09/13 05:01:45 INFO util.ExitUtil: Exiting with status 0

17/09/13 05:01:45 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at Hadoop-host/127.0.1.1
************************************************************/
纠结=================================================20170913

提问了,花了五积分悬赏,重赏之下,遇一侠客曰:已经初始化成功了!!!17/09/13 05:01:45 INFO common.Storage: Storage directory /usr/local/hadoop-2.8.0/hdfs/name has been successfully formatted.

启动  sudo sbin/start-all.sh

提示ssh公钥啥的

3.SSH面密码登录设置
首先生成rsa密匙与公匙,ssh-keygen -t  rsa,一路回车后生成。
然后利用命令:ssh-copy-id -i  ~/.ssh/id_rsa.pub  lvfk@10.16.1.99,然后输入密码后搞定。
 
http://blog.csdn.net/yy243/article/details/53243948
提示需要密码:
参考连接http://blog.csdn.net/u011763190/article/details/50828410
解决办法:
生成秘钥:如果本地环境有则不需要
ssh-keygen -t rsa -P “”
实现本地登录免密码登录,因为搭建的时候,我们做了对其他主机的免密码登录,但是本地ssh连接本地没有
所以,讲本地的公钥导入私钥就可以
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
 
启动完成,输入http://localhost:50070/ 查看运行情况。
入门辣!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1哈哈哈哈哈哈哈啊哈哈

【hadoop+spark】搭建spark过程的更多相关文章

  1. Hadoop zookeeper hbase spark phoenix (HA)搭建过程

    环境介绍: 系统:centos7 软件包: apache-phoenix-4.14.0-HBase-1.4-bin.tar.gz  下载链接:http://mirror.bit.edu.cn/apac ...

  2. 沉淀,再出发——在Hadoop集群的基础上搭建Spark

    在Hadoop集群的基础上搭建Spark 一.环境准备 在搭建Spark环境之前必须搭建Hadoop平台,尽管以前的一些博客上说在单机的环境下使用本地FS不用搭建Hadoop集群,可是在新版spark ...

  3. Windows下搭建Spark+Hadoop开发环境

    Windows下搭建Spark+Hadoop开发环境需要一些工具支持. 只需要确保您的电脑已装好Java环境,那么就可以开始了. 一. 准备工作 1. 下载Hadoop2.7.1版本(写Spark和H ...

  4. hadoop+hive+spark搭建(一)

    1.准备三台虚拟机 2.hadoop+hive+spark+java软件包 传送门:Hadoop官网 Hive官网 Spark官网      一.修改主机名,hosts文件 主机名修改 hostnam ...

  5. 剖析Hadoop和Spark的Shuffle过程差异

    一.前言 对于基于MapReduce编程范式的分布式计算来说,本质上而言,就是在计算数据的交.并.差.聚合.排序等过程.而分布式计算分而治之的思想,让每个节点只计算部分数据,也就是只处理一个分片,那么 ...

  6. 剖析Hadoop和Spark的Shuffle过程差异(一)

    一.前言 对于基于MapReduce编程范式的分布式计算来说,本质上而言,就是在计算数据的交.并.差.聚合.排序等过程.而分布式计算分而治之的思想,让每个节点只计算部分数据,也就是只处理一个分片,那么 ...

  7. hadoop和spark搭建记录

    因玩票需要,使用三台搭建spark(192.168.1.10,192.168.1.11,192.168.1.12),又因spark构建在hadoop之上,那么就需要先搭建hadoop.历经一个两个下午 ...

  8. Spark应用(app jar)发布到Hadoop集群的过程

    记录了Spark,Hadoop集群的开启,关闭,以及Spark应用提交到Hadoop集群的过程,通过web端监控运行状态. 1.绝对路径开启集群 (每次集群重启,默认配置的hadoop集群中tmp文件 ...

  9. hadoop的mapReduce和Spark的shuffle过程的详解与对比及优化

    https://blog.csdn.net/u010697988/article/details/70173104 大数据的分布式计算框架目前使用的最多的就是hadoop的mapReduce和Spar ...

  10. Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录

    Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录     Hadoop 2.6 的安装与配置(伪分布式) 下载并解压缩 配置 .bash_profile : ...

随机推荐

  1. REST = HTTP动词(GET POST PUT DELETE)操作 + 服务器暴露资源URI,最后返回状态码(充分利用HTTP自身的特征,而不仅仅是把HTTP当作传输协议。Rest协议是面向资源的,SOAP是面向服务的),表现形式可以是JSON XML BIN,举例很清楚

    好处是,操作系统或者浏览器,可以重复利用它们内置的缓存机制等等. 增删改查都是一个地址,具体靠http头部信息判断. 利用HTTP协议语义构建的语义化.可缓存的接口. URL定位资源,用HTTP动词( ...

  2. Delphi 快速获取文件大小(使用_lopen和FileSeek,此函数可以快速获取文件大小,即使文件已经被其它程序锁定)

    function GetFileSize(const fName: AnsiString): Int64; var hFile: THandle; begin hFile := _lopen(PAns ...

  3. sklearn、theano、TensorFlow 以及 theras 的理解

    sklearn ⇒ 机器学习算法和模型: theras theano TensorFlow 1. 理解模型以及函数,参数返回值的实际意义 一定要注意模型的构造函数,接收的参数列表,以及该模型本身所要解 ...

  4. 《菊与刀》original 的阅读

    0. 词汇 foe:敌人,反对者,危害物: rigid:严格的,僵硬的,死板的, they are incomparably rigid in their behavior, innovation:革 ...

  5. WPF无边框捕获消息改变窗口大小

    原文:WPF无边框捕获消息改变窗口大小 文章大部分转载自http://blog.csdn.net/fwj380891124,如有问题,请联系删除  最近一直在学习 WPF,看着别人做的WPF程序那么漂 ...

  6. matlab 可变参数与默认参数设置

    1. 基本思路 矩阵矢量化编程,而不是循环和遍历: GPU 并行计算: 使用稀疏矩阵: 2. 实践 可变长输入参数,输出参数,需要解析(使用大括号进行索引): varargin varargout 函 ...

  7. Java之nio性能比较

    结果:used time:53574684used time:1800077620used time:12563690可见MappedByteBuffer读写数据是最快的, 其次是FileChanne ...

  8. WPF 4 日期选择器(DatePicker)

    原文:WPF 4 日期选择器(DatePicker)      前一篇<WPF 4 日历控件(Calendar)> 中我们对日历控件的使用方式有了基本了解,本篇将继续介绍WPF 4 中另一 ...

  9. jquery 选择标题标签

    <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...

  10. Telnet协议详解(远程登陆协议)

    1. 概述 Telnet协议是TCP/IP协议族中的一员,是Internet远程登陆服务的标准协议.Telnet协议的目的是提供一个相对通用的,双向的,面向八位字节的通信方法,允许界面终端设备和面向终 ...