你好,游客 登录 注册 搜索
背景:
阅读新闻

Hadoop集群之 ZooKeeper和Hbase环境搭建

[日期:2016-05-31] 来源:数盟  作者: [字体: ]

前面讲解了Hadoop完全分布式的搭建,本章主要讲解一下在Hadoop完全分布式已经搭建成功的情况下搭建ZooKeeper和Hbase环境

Hadoop

1.ZooKeeper和Hbase的简答介绍:

  1. ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。ZooKeeper的目标就是封装好复杂易出错的关键服务,将简单易用的接口和性能高效、功能稳定的系统提供给用户。
  2. HBase是一个分布式的、面向列的开源数据库,该技术来源于 Fay Chang 所撰写的Google论文“Bigtable:一个结构化数据的分布式存储系统”。就像Bigtable利用了Google文件系统(File System)所提供的分布式数据存储一样,HBase在Hadoop之上提供了类似于Bigtable的能力。HBase是Apache的Hadoop项目的子项目。HBase不同于一般的关系数据库,它是一个适合于非结构化数据存储的数据库。
  3. 两者联系:Hbase的运行依赖ZooKeeper。Hbase自身带有一个默认的ZooKeeper,本文讲解的是自己搭建ZooKeeper环境。

2.ZooKeeper环境搭建:

2.1软件下载:

我使用的是zookeeper-3.4.5.tar.gz。下载改文件后,将文件解压到/usr/local目录下:

sudomvzookeeper-3.4.5.tar.gz /usr/local
tar -xvzf  zookeeper-3.4.5.tar.gz

2.2配置

进入zookeeper-3.4.5/conf/目录:,拷贝zoo_sample.cfg生成一个新文件zoo.cfg(zk默认读取的文件)。然后修改zoo.cfg中dataDir目录地址,增加访问地址和端

cd zookeeper-3.4.6/conf/
cpzoo_sample.cfgzoo.cfg
vimzoo.cfg 
###修改如下
dataDir=/usr/local/zookeeper-3.4.6/data    ----修改此目录,可以任意
##添加如下内容
server.1=192.168.1.127:2887:3887
server.2=192.168.1.1128:2888:3888 
server.3=192.168.1.129:2889:3889

进入zookeeper-3.4.5目录,创建刚才配置中增加的data目录, 然后进入data目录,创建myid文件,输入服务器编号,比如在192.168.1.127上,myid文件就存储数字1,192.168.1.128上就存储数字2,192.168.1.129上就存储数字3.

dirdata
cddata
vimmyid
1
mkdirdata
cd data
vimmyid
1

2.3拷贝数据到其他服务器

1.复制zookeeper-3.4.5目录到其他从服务器

<spanclass="line">1</span>
<spanclass="line">2</span>
<spanclass="line">3</span>
<spanclass="line">4</span>
scp -r zookeeper-3.4.5 hadoop@192.168.1.128:~ 
scp -r zookeeper-3.4.5 hadoop@192.168.1.129:~ 
##注意在从服务器将zookeeper-3.4.5移动到/usr/local  不要这部也是没事的,只是为了保证集群环境一致
mvzookeeper-3.4.5 /usr/local

2.复制完成,登录到其他服务器,修改zookeeper-3.4.5/data/myid 文件的内容,slave1服务器就改成2,slave2服务器就改成3

2.4启动验证:

在从master,slave1,slave2依次执行zkServer.sh start 来启动 zookeeper,所有服务器启动完成后,就可以通过zkServer.sh status来查看服务器状态。没有报错说明都正常了。输入jps可以看到服务器中多了一个QuorumPeerMain服务。

<spanclass="line">1</span>
<spanclass="line">2</span>
<spanclass="line">3</span>
<spanclass="line">4</span>
<spanclass="line">5</span>
<spanclass="line">6</span>
<spanclass="line">7</span>
<spanclass="line">8</span>
<spanclass="line">9</span>
cd /zookeeper-3.4.6
shbin/zkServer.shstart
jps
输出:
 QuorumPeerMain 
###状态查询
shbin/zkServer.shstatus
leader---表示master
Mode: follower 表示是跟从

到这里zk环境搭建完毕

3.Hbase环境搭建

HBase集群需要依赖于一个Zookeeper ensemble。HBase集群中的所有节点以及要访问HBase的客户端都需要能够访问到该Zookeeper ensemble。HBase自带了Zookeeper,但为了方便其他应用程序使用Zookeeper,最好使用单独安装的Zookeeper ensemble。

此外,Zookeeper ensemble一般配置为奇数个节点,并且Hadoop集群、Zookeeper ensemble、

HBase集群是三个互相独立的集群,并不需要部署在相同的物理节点上,他们之间是通过网

络通信的。

3.1软件下载

我下载的是hbase-0.94.16.tar.gz,hbase的版本需要与hadoop对应,查看是否对应只需要看hbase-0.94.1/lib/hadoop-core后面的版本号是否与hadoop的版本对应,如果不对应,可以将hadoop下hadoop-core文件复制过来,但是不能保证不会有问题解压到/usr/local下

3.2配置

1.配置hbase-env.sh

该文件在{HBASE_HOME}/conf目录下。

 <span class="line">vim conf/hbase-env.sh</span> <span class="line"><span class="keyword">export</span> JAVA_HOME=<span class="regexp">/usr/</span>java/jdk</span> <span class="line"><span class="keyword">export</span> HBASE_CLASSPATH=<span class="regexp">/usr/</span>local/hadoop/conf</span> <span class="line"><span class="keyword">export</span> HBASE_MANAGES_ZK=<span class="literal">false</span></span>123456<spanclass="line">vimconf/hbase-env.sh</span><spanclass="line"><spanclass="keyword">export</span>JAVA_HOME=<spanclass="regexp">/usr/</span>java/jdk</span> <spanclass="line"><spanclass="keyword">export</span>HBASE_CLASSPATH=<spanclass="regexp">/usr/</span>local/hadoop/conf</span> <spanclass="line"><spanclass="keyword">export</span>HBASE_MANAGES_ZK=<spanclass="literal">false</span></span>

其中,HBASE_CLASSPATH指向存放有Hadoop配置文件的目录,这样HBase可以找到HDFS的配置信息,由于本文Hadoop和HBase部署在相同的物理节点,所以就指向了Hadoop安

装路径下的conf目录。HBASE_MANAGES_ZK=false指示HBase使用已有的Zookeeper而不是自带的。

2.配置hbase-site.xml

 <span class="line"><span class="variable"><configuration></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.rootdir<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>hdfs://192.168.1.127:9000/hbase<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span>The directory shared by region servers.<span class="variable"></description></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.hregion.max.filesize<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>1073741824<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span></span> <span class="line"> Maximum HStoreFile size. If any one of a column families' HStoreFiles has</span> <span class="line"> grown to exceed this value, the hosting HRegion is split in two.</span> <span class="line"> Default: 256M.</span> <span class="line"> <span class="variable"></description></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.hregion.memstore.flush.size<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>1073741824<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span></span> <span class="line"> Memstore will be flushed to disk if size of the memstore</span> <span class="line"> exceeds this number of bytes. Value is checked by a thread that runs</span> <span class="line"> every hbase.server.thread.wakefrequency.</span> <span class="line"> <span class="variable"></description></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.cluster.distributed<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>true<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span>The mode the cluster will be in. Possible values are</span> <span class="line"> false: standalone and pseudo-distributed setups with managed Zookeeper</span> <span class="line"> true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)</span> <span class="line"> <span class="variable"></description></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.zookeeper.property.clientPort<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>2181<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span>Property from ZooKeeper's config zoo.cfg.</span> <span class="line"> The port at which the clients will connect.</span> <span class="line"> <span class="variable"></description></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>zookeeper.session.timeout<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>120000<span class="variable"></value></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.zookeeper.property.tickTime<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>6000<span class="variable"></value></span></span> <span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.zookeeper.quorum<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>master,slave1,slave2<span class="variable"></value></span></span> <span class="line"> <span class="variable"><description></span>Comma separated list of servers in the ZooKeeper Quorum.</span> <span class="line"> For example, <span class="string">"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com"</span>.</span> <span class="line"> By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh this is the list of servers which we will start/stop ZooKeeper on.</span> <span class="line"> <span class="variable"></description></span></span> <span class="line"><span class="variable"></property></span></span> <span class="line"><span class="variable"><property></span></span> <span class="line"> <span class="variable"><name></span>hbase.tmp.dir<span class="variable"></name></span></span> <span class="line"> <span class="variable"><value></span>/usr/local/hbase/tmp<span class="variable"></value></span></span> <span class="line"><span class="variable"></property></span></span> <span class="line"><span class="variable"></configuration></span></span>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869<spanclass="line"><spanclass="variable"><configuration></span></span> <spanclass="line"><spanclass="variable"><property></span></span><spanclass="line">  <spanclass="variable"><name></span>hbase.rootdir<spanclass="variable"></name></span></span><spanclass="line">  <spanclass="variable"><value></span>hdfs://192.168.1.127:9000/hbase<span class="variable"></value></span></span><spanclass="line">  <spanclass="variable"><description></span>Thedirectorysharedbyregionservers.<spanclass="variable"></description></span></span><spanclass="line"><spanclass="variable"></property></span></span> <spanclass="line"><spanclass="variable"><property></span></span><spanclass="line">  <spanclass="variable"><name></span>hbase.hregion.max.filesize<spanclass="variable"></name></span></span><spanclass="line">  <spanclass="variable"><value></span>1073741824<spanclass="variable"></value></span></span><spanclass="line">  <spanclass="variable"><description></span></span><spanclass="line">  MaximumHStoreFilesize.Ifanyoneofacolumnfamilies' HStoreFiles has</span><span class="line">   grown to exceed this value, the hosting HRegion is split in two.</span><span class="line">   Default: 256M.</span><span class="line">   <span class="variable"></description></span></span><span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span><span class="line">   <span class="variable"><name></span>hbase.hregion.memstore.flush.size<span class="variable"></name></span></span><span class="line">   <span class="variable"><value></span>1073741824<span class="variable"></value></span></span><span class="line">   <span class="variable"><description></span></span><span class="line">   Memstore will be flushed to disk if size of the memstore</span><span class="line">   exceeds this number of bytes.  Value is checked by a thread that runs</span><span class="line">   every hbase.server.thread.wakefrequency.</span><span class="line">   <span class="variable"></description></span></span><span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span><span class="line">   <span class="variable"><name></span>hbase.cluster.distributed<span class="variable"></name></span></span><span class="line">   <span class="variable"><value></span>true<span class="variable"></value></span></span><span class="line">   <span class="variable"><description></span>The mode the cluster will be in. Possible values are</span><span class="line">     false: standalone and pseudo-distributed setups with managed Zookeeper</span><span class="line">     true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)</span><span class="line">   <span class="variable"></description></span></span><span class="line"> <span class="variable"></property></span></span> <span class="line"> <span class="variable"><property></span></span><span class="line">     <span class="variable"><name></span>hbase.zookeeper.property.clientPort<span class="variable"></name></span></span><span class="line">     <span class="variable"><value></span>2181<span class="variable"></value></span></span><span class="line">     <span class="variable"><description></span>Property from ZooKeeper'sconfigzoo.cfg.</span><spanclass="line">    Theportatwhichtheclientswillconnect.</span><spanclass="line">    <spanclass="variable"></description></span></span><spanclass="line"><spanclass="variable"></property></span></span> <spanclass="line"><spanclass="variable"><property></span></span><spanclass="line">  <spanclass="variable"><name></span>zookeeper.session.timeout<spanclass="variable"></name></span></span><spanclass="line">  <spanclass="variable"><value></span>120000<spanclass="variable"></value></span></span><spanclass="line"><spanclass="variable"></property></span></span> <spanclass="line"><spanclass="variable"><property></span></span><spanclass="line">  <spanclass="variable"><name></span>hbase.zookeeper.property.tickTime<spanclass="variable"></name></span></span><spanclass="line">  <spanclass="variable"><value></span>6000<spanclass="variable"></value></span></span><spanclass="line"><spanclass="variable"></property></span></span><spanclass="line">  <spanclass="variable"><property></span></span><spanclass="line">    <spanclass="variable"><name></span>hbase.zookeeper.quorum<spanclass="variable"></name></span></span><spanclass="line">    <spanclass="variable"><value></span>master,slave1,slave2<spanclass="variable"></value></span></span><spanclass="line">    <spanclass="variable"><description></span>CommaseparatedlistofserversintheZooKeeperQuorum.</span><spanclass="line">    Forexample,<spanclass="string">"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com"</span>.</span><spanclass="line">    Bydefaultthisissettolocalhostforlocalandpseudo-distributedmodesofoperation.Forafully-distributedsetup,thisshouldbesettoafulllistofZooKeeperquorumservers.IfHBASE_MANAGES_ZKissetinhbase-env.shthisisthelistofserverswhichwewillstart/stopZooKeeperon.</span><spanclass="line">    <spanclass="variable"></description></span></span><spanclass="line"><spanclass="variable"></property></span></span> <spanclass="line"><spanclass="variable"><property></span></span><spanclass="line">      <spanclass="variable"><name></span>hbase.tmp.dir<spanclass="variable"></name></span></span><spanclass="line">      <spanclass="variable"><value></span>/usr/local/hbase/tmp<spanclass="variable"></value></span></span><spanclass="line"><spanclass="variable"></property></span></span> <spanclass="line"><spanclass="variable"></configuration></span></span>

参数介绍:

 <span class="line"><span class="number">1</span>,hbase.rootdir:hbase所使用的文件系统为HDFS,根目录为hdfs:<span class="comment">//192.168.1.127:9000/hbase,该目录应该由HBase自动创建,只需要指定到正确的HDFS NameNode上即可。</span></span> <span class="line"><span class="number">2</span>,hbase<span class="class">.hregion</span><span class="class">.max</span><span class="class">.filesize</span>:设置HStoreFile的大小,当 大于这个数时,就会split 成两个文件</span> <span class="line"><span class="number">3</span>,hbase<span class="class">.hregion</span><span class="class">.memstore</span><span class="class">.flush</span><span class="class">.size</span>:设置memstore的大小,当大于这个值时,写入磁盘</span> <span class="line"><span class="number">4</span>,hbase<span class="class">.cluster</span><span class="class">.distributed</span>:指定hbase为分布式模式</span> <span class="line"><span class="number">5</span>,hbase<span class="class">.zookeeper</span><span class="class">.property</span><span class="class">.clientPort</span>:指定zk的连接端口</span> <span class="line"><span class="number">6</span>,zookeeper<span class="class">.session</span><span class="class">.timeout</span>:RegionServer与Zookeeper间的连接超时时间。当超时时间到后,ReigonServer会被Zookeeper从RS集群清单中移除,HMaster收到移除通知后,会对这台server负责的regions重新balance,让其他存活的RegionServer接管.</span> <span class="line"><span class="number">7</span>,hbase<span class="class">.zookeeper</span><span class="class">.property</span><span class="class">.tickTime</span></span> <span class="line"><span class="number">8</span>,hbase<span class="class">.zookeeper</span><span class="class">.quorum</span>:默认值是 localhost,列出zookeepr的master,slave1,slave2</span> <span class="line"><span class="number">9</span>,hbase<span class="class">.tmp</span><span class="class">.dir</span>:指定HBase将元数据存放路径</span>1234567891011121314151617<spanclass="line"><spanclass="number">1</span>,hbase.rootdir:hbase所使用的文件系统为HDFS,根目录为hdfs:<spanclass="comment">//192.168.1.127:9000/hbase,该目录应该由HBase自动创建,只需要指定到正确的HDFS NameNode上即可。</span></span> <spanclass="line"><spanclass="number">2</span>,hbase<spanclass="class">.hregion</span><spanclass="class">.max</span><spanclass="class">.filesize</span>:设置HStoreFile的大小,当大于这个数时,就会split成两个文件</span> <spanclass="line"><spanclass="number">3</span>,hbase<spanclass="class">.hregion</span><spanclass="class">.memstore</span><spanclass="class">.flush</span><spanclass="class">.size</span>:设置memstore的大小,当大于这个值时,写入磁盘</span> <spanclass="line"><spanclass="number">4</span>,hbase<spanclass="class">.cluster</span><spanclass="class">.distributed</span>:指定hbase为分布式模式</span> <spanclass="line"><spanclass="number">5</span>,hbase<spanclass="class">.zookeeper</span><spanclass="class">.property</span><spanclass="class">.clientPort</span>:指定zk的连接端口</span> <spanclass="line"><spanclass="number">6</span>,zookeeper<spanclass="class">.session</span><spanclass="class">.timeout</span>:RegionServer与Zookeeper间的连接超时时间。当超时时间到后,ReigonServer会被Zookeeper从RS集群清单中移除,HMaster收到移除通知后,会对这台server负责的regions重新balance,让其他存活的RegionServer接管.</span> <spanclass="line"><spanclass="number">7</span>,hbase<spanclass="class">.zookeeper</span><spanclass="class">.property</span><spanclass="class">.tickTime</span></span> <spanclass="line"><spanclass="number">8</span>,hbase<spanclass="class">.zookeeper</span><spanclass="class">.quorum</span>:默认值是localhost,列出zookeepr的master,slave1,slave2</span> <spanclass="line"><spanclass="number">9</span>,hbase<spanclass="class">.tmp</span><spanclass="class">.dir</span>:指定HBase将元数据存放路径</span>

3.配置regionservers 相当于hadoop的slave

 <span class="line"><span class="title">vim</span> conf/regionservers </span> <span class="line"><span class="number">192.168.1.127</span></span> <span class="line"><span class="number">192.168.1.128</span></span>123<spanclass="line"><spanclass="title">vim</span>conf/regionservers</span><spanclass="line"><spanclass="number">192.168.1.127</span></span><spanclass="line"><spanclass="number">192.168.1.128</span></span>

3.3拷贝数据到其他服务器

1.复制hbase目录到其他从服务器

 <span class="line">scp -r hbase hadoop<span class="variable">@192</span>.<span class="number">168.1</span>.<span class="number">128</span><span class="symbol">:~</span> </span> <span class="line">scp -r hbase hadoop<span class="variable">@192</span>.<span class="number">168.1</span>.<span class="number">129</span><span class="symbol">:~</span> </span> <span class="line"><span class="comment">##注意在从服务器将hbase移动到/usr/local 不要这部也是没事的,只是为了保证集群环境一致</span></span> <span class="line">mv hbase /usr/local</span>1234<spanclass="line">scp-rhbasehadoop<spanclass="variable">@192</span>.<spanclass="number">168.1</span>.<spanclass="number">128</span><spanclass="symbol">:~</span></span><spanclass="line">scp-rhbasehadoop<spanclass="variable">@192</span>.<spanclass="number">168.1</span>.<spanclass="number">129</span><spanclass="symbol">:~</span></span><spanclass="line"><spanclass="comment">##注意在从服务器将hbase移动到/usr/local  不要这部也是没事的,只是为了保证集群环境一致</span></span><spanclass="line">mvhbase/usr/local</span>

3.4启动验证:

注意需要先启动Hadoop

 <span class="line"><span class="comment">##启动Hadoop</span></span> <span class="line"><span class="literal">start</span>-all.sh</span> <span class="line"><span class="comment">##启动Hbase</span></span> <span class="line">cd hbase</span> <span class="line">bin/<span class="literal">start</span>-hbase.sh</span> <span class="line">jps</span> <span class="line">输出:<span class="constant">H</span>RegionServer</span>1234567<spanclass="line"><spanclass="comment">##启动Hadoop</span></span><spanclass="line"><spanclass="literal">start</span>-all.sh</span><spanclass="line"><spanclass="comment">##启动Hbase</span></span><spanclass="line">cdhbase</span><spanclass="line">bin/<spanclass="literal">start</span>-hbase.sh</span><spanclass="line">jps</span><spanclass="line">输出:<spanclass="constant">H</span>RegionServer</span>

通过浏览器查看:在浏览器中输入 : http://192.168.1.127:60010/

 <span class="line"><span class="comment">##停止</span></span> <span class="line">bin/<span class="literal">stop</span>-hbase.sh</span>123<spanclass="line"><spanclass="comment">##停止</span></span> <spanclass="line">bin/<spanclass="literal">stop</span>-hbase.sh</span>

3.5hbase简答测试:

 
bin/hbaseshell
 
HBaseShell; enter 'help<RETURN>' for listofsupportedcommands.
 
Type "exit<RETURN>" to leavetheHBaseShell
 
Version 0.94.12, r1524863, FriSep 20 04:44:41 UTC 2013
 
hbase(main):001:0>
 
##创建一个名为 small的表,这个表只有一个 columnfamily 为 cf。可以列出所有的表来检查创建情况,然后插入些值。
 
hbase(main):003:0> create 'small', 'cf'
0 row(s) in 1.2200 seconds
hbase(main):003:0> list
small
1 row(s) in 0.0550 seconds
hbase(main):004:0> put 'small', 'row1', 'cf:a', 'value1'
0 row(s) in 0.0560 seconds
hbase(main):005:0> put 'small', 'row2', 'cf:b', 'value2'
0 row(s) in 0.0370 seconds
hbase(main):006:0> put 'small', 'row3', 'cf:c', 'value3'
0 row(s) in 0.0450 seconds
 
##检查插入情况.Scan这个表
 
hbase(main):005:0> scan 'small'
 
Get一行,操作如下
 
hbase(main):008:0> get 'small', 'row1'
 
disable 再 drop 这张表,可以清除你刚刚的操作
 
hbase(main):012:0> disable 'small'
0 row(s) in 1.0930 seconds
hbase(main):013:0> drop 'small'
0 row(s) in 0.0770 seconds
 
##导出与导入
 
bin/hbaseorg.apache.hadoop.hbase.mapreduce.Driverexportsmallsmall
 
导出的表,在hadoop文件系统的当前用户目录下,small文件夹中。例如,导出后在hadoop文件系统中的目录结构:
 
bin/hadoopdfs -ls
 
Found 1 items
 
drwxr-xr-x  - hadoopsupergroup        /small

 

本章介绍到这里来自伊豚(wpeace.cn)





收藏 推荐 打印 | 录入:elainebo | 阅读:
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数
点评:
       
评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款