zoukankan      html  css  js  c++  java
  • Hadoop

    集群启动

    1)整体启动/停止HDFS
    start-dfs.sh / stop-dfs.sh
    (2)整体启动/停止YARN
    start-yarn.sh / stop-yarn.sh

    hdfs文件操作

    //查看文件信息
    hadoop fs -cat /aaa/bbb/c.txt
    
    [atguigu@hadoop101 hadoop-2.7.2]$ ll
    总用量 52
    drwxr-xr-x. 2 atguigu atguigu  4096 5月  22 2017 bin
    drwxr-xr-x. 3 atguigu atguigu  4096 5月  22 2017 etc
    drwxr-xr-x. 2 atguigu atguigu  4096 5月  22 2017 include
    drwxr-xr-x. 3 atguigu atguigu  4096 5月  22 2017 lib
    drwxr-xr-x. 2 atguigu atguigu  4096 5月  22 2017 libexec
    -rw-r--r--. 1 atguigu atguigu 15429 5月  22 2017 LICENSE.txt
    -rw-r--r--. 1 atguigu atguigu   101 5月  22 2017 NOTICE.txt
    -rw-r--r--. 1 atguigu atguigu  1366 5月  22 2017 README.txt
    drwxr-xr-x. 2 atguigu atguigu  4096 5月  22 2017 sbin
    drwxr-xr-x. 4 atguigu atguigu  4096 5月  22 2017 share
    
    bin 存放Hadoop相关服务(HDFS,YARN)操作的脚本文件
    etc 存放Hadoop配置文件相关目录
    lib 存放Hadoop的本地库
    sbin 存放启动或停止Hadoop相关服务的脚本
    share 存放Hadoop依赖的jar,文档和官方案例
    

    (1)核心配置文件
    配置core-site.xml

    [atguigu@hadoop102 hadoop]$ vi core-site.xml
    在该文件中编写如下配置

    <property>
    		<name>fs.defaultFS</name>
          <value>hdfs://hadoop102:9000</value>
    </property>
    
    <!-- 指定Hadoop运行时产生文件的存储目录 -->
    <property>
    		<name>hadoop.tmp.dir</name>
    		<value>/opt/module/hadoop-2.7.2/data/tmp</value>
    </property>
    

    Hive安装mysql启动异常系列

    A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
    

    解决方式:

    进入 /hive/metastore/metastore_db, 将里面lck的几个文件 rm -rf 掉

    hive 日志目录 /tmp/username/hive.log

    本以为上面解决了,其实不是,启动后发现元数据的数据库使用的还是derby,不是mysql

    common.LogUtils (LogUtils.java:logConfigLocation(145)) - hive-site.xml not found on CLASSPATH
    

    解决方式:

    因为我在hive-en.sh中指定了 export HIVE_CONF_DIR=/opt/module/hive/conf,,将此项屏蔽后启动,发现正常

    metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(139)) - Using direct SQL, underlying DB is DERBY
    
  • 相关阅读:
    50个SQL语句(MySQL版) 问题六
    50个SQL语句(MySQL版) 问题五
    50个SQL语句(MySQL版) 问题四
    50个SQL语句(MySQL版) 问题三
    50个SQL语句(MySQL版) 问题二
    50个SQL语句(MySQL版) 问题一
    50个SQL语句(MySQL版) 建表 插入数据
    相邻元素margin的自动合并与float的坑
    STL之list
    你真的会用搜索吗?—— google 搜索技巧
  • 原文地址:https://www.cnblogs.com/cfb513142804/p/13950298.html
Copyright © 2011-2022 走看看