• 大数据相关积累


    HADOOP运维命令

    hdfs haadmin -getServiceState nn2 查看namenode是standby还是active
    hdfs haadmin -transitionToActive nn2 转换到ative
    hadoop-daemon.sh start zkfc 打开zkfc自行判断节点active
    hdfs dfsadmin -report 查看hdfs报告
    start-all.sh 开启hadoop集群
    hadoop配置文件在/etc/hadoop下nn配置文件在hdfs-site.xml

    参考:
    Operation category READ is not supported in state standby 故障解决
    http://www.manongjc.com/detail/15-miehvceeqedzgtp.html

    HIVE

    hive元数据
    nohup hive --service metastore -p 9083 &!

    修改元数据的hive-site

    
    
    <configuration>
     <property>
            <name>javax.jdo.option.ConnectionUserNamename>
            <value>rootvalue>
        property>
        <property>
            <name>javax.jdo.option.ConnectionPasswordname>
            <value>root@123value>
        property>
       <property>
            <name>javax.jdo.option.ConnectionURLname>
    <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true&useUnicode=true&characterEnconding=UTF-8value>       
    property>
        <property>
            <name>javax.jdo.option.ConnectionDriverNamename>
            <value>com.mysql.jdbc.Drivervalue>
        property>
    <property>  
      <name>hive.metastore.localname> 
      <value>truevalue>  
    property> 
    configuration>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    hive服务./hive --service hiveserver2 &

    修改hive服务的hive-site

    
    
    <configuration>
        <property>  
            <name>hive.metastore.urisname> 
            <value>thrift://ctyun7:9083value>  
        property>
    <property>  
      <name>hive.metastore.localname>
      <value>falsevalue>  
    property>  
    
            <property>
                     <name>hive.server2.thrift.portname>
                     <value>10238value>
            property>
    
            <property>
                    <name>hive.server2.thrift.bind.hostname>
                    <value>ctyun9value>
            property>
    configuration>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22

    hive数据库初始化
    schematool -dbType mysql -initSchema

    hive基础语句
    create database txt1;
    Show databases;
    describe database txt1;
    drop database txt1;
    desc database extended 库名;
    查看数据库创建的详细信息,包括配置的参数

    namenode启动命令
    namenode启动命令 ./hadoop-daemon.sh start namenode

    hive连接
    beeline -u jdbc:hive2://master:10000 -n root
    beeline -u jdbc:hive2://master:10000 -n root -p password
    user database;
    create table table (id int, name string);

    参考
    🐎🐎hive安装配置 Mysql 安装
    https://blog.csdn.net/weixin_49471910/article/details/110786293
    Hive MetaStore 启动配置
    https://blog.csdn.net/qq_35260875/article/details/124731725
    NameNode在安全模式safe mode
    https://blog.csdn.net/weixin_41986096/article/details/109525886
    Hadoop端口8020 9000 50070
    https://blog.csdn.net/qq_46416934/article/details/124247205
    HIVE修改默认端口 指定端口
    https://blog.csdn.net/weixin_43159039/article/details/122080027
    Hive概念、架构、启动方式、基本命令
    https://blog.csdn.net/weixin_52923290/article/details/124084012
    Hive 学习笔记(启动方式,内置服务)
    https://blog.51cto.com/u_14286115/3324890
    Hive常用命令详解
    https://www.modb.pro/db/491762
    处理Linux中大量ESTABLISHED进程
    https://blog.csdn.net/qq_40907977/article/details/103878127
    https://blog.csdn.net/Molianna/article/details/118069525
    https://blog.csdn.net/bluetjs/article/details/80965967/
    linux中tcp连接不释放怎么办
    https://www.php.cn/linux-493794.html

  • 相关阅读:
    css实现椭圆绕圈动画
    算法 - 正方形数量
    【7.28】代码源 - 【Fence Painting】【合适数对(数据加强版)】
    ROS参数名称设置
    QT之UDP通信
    Flutter 状态管理之Bloc
    JavaWeb中的VUE快速入门
    Vue axios和vue-axios的关系及使用区别
    实现一个Prometheus exporter
    22-06-27 西安redis(01) linux上安装redis、redis5种常见数据类型的命令
  • 原文地址:https://blog.csdn.net/weixin_38689747/article/details/127635301