hadoop测试环境sqoop使用

news2025/2/27 4:37:58

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

Sqoop看这篇文章就够了_must contain '$conditions' in where clause._SoWhat1412的博客-CSDN博客

大数据环境

C:\Windows\System32\drivers\etc

修改ip和hostname的对应关系

127.0.0.1 view-localhost # view localhost server

192.168.52.150  hadoop01  hadoop01.itcast.cn

192.168.52.151  hadoop02  hadoop02.itcast.cn

检查环境

ping 通环境测试

检查hadoop的版本

[root@hadoop01 ~]# hadoop version

Hadoop 3.0.0-cdh6.2.1

Source code repository http://github.com/cloudera/hadoop -r 7ce7dcdb76fd7f700cd7749bbc6390f76ff2abae

Compiled by jenkins on 2019-09-11T08:04Z

Compiled with protoc 2.5.0

From source with checksum b6cc25ff15ff575f159489abbee34c5

This command was run using /opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/hadoop-common-3.0.0-cdh6.2.1.jar

检查hive的版本

[root@hadoop01 ~]# hive --version

WARNING: Use "yarn jar" to launch YARN applications.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Hive 2.1.1-cdh6.2.1

Subversion file:///container.redhat7/build/cdh/hive/2.1.1-cdh6.2.1/rpm/BUILD/hive-2.1.1-cdh6.2.1 -r fc0582dc4d2e2342d1eef8cb702bad68e1e2cdd2

Compiled by jenkins on Wed Sep 11 01:31:00 PDT 2019

From source with checksum 6bf22b68335469e1b010bcfecc8ea570

检查 hive服务是否启动了

[root@hadoop01 ~]# hive

WARNING: Use "yarn jar" to launch YARN applications.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/hive-common-2.1.1-cdh6.2.1.jar!/hive-log4j2.properties Async: false

WARNING: Hive CLI is deprecated and migration to Beeline is recommended.

hive>

WARNING: Hive CLI is deprecated and migration to Beeline is recommended.

hive>

    >

    >

    > show databases;

OK

default

test

Time taken: 4.039 seconds, Fetched: 2 row(s)

hive>

    >

检查  sqoop是否安装

[root@hadoop01 ~]# sqoop help

Warning: /opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

23/09/20 13:48:09 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7-cdh6.2.1

usage: sqoop COMMAND [ARGS]

Available commands:

  codegen            Generate code to interact with database records

  create-hive-table  Import a table definition into Hive

  eval               Evaluate a SQL statement and display the results

  export             Export an HDFS directory to a database table

  help               List available commands

  import             Import a table from a database to HDFS

  import-all-tables  Import tables from a database to HDFS

  import-mainframe   Import datasets from a mainframe server to HDFS

  job                Work with saved jobs

  list-databases     List available databases on a server

  list-tables        List available tables in a database

  merge              Merge results of incremental imports

  metastore          Run a standalone Sqoop metastore

  version            Display version information

See 'sqoop help COMMAND' for information on a specific command.

检查mysql数据库

[root@hadoop01 ~]# mysql -uroot -p123456

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 70

Server version: 5.7.26 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| hive               |

| hue                |

| mysql              |

| nev                |

| oozie              |

| performance_schema |

| scm                |

| sys                |

| test               |

+--------------------+

10 rows in set (0.00 sec)

sqoop list-databases --connect jdbc:mysql://192.168.52.150:3306/ --username root --password 123456

测试sqoop数据库的连接  

[root@hadoop01 ~]# sqoop list-databases --connect jdbc:mysql://192.168.52.150:3306/ --username root --password 123456

Warning: /opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1425774/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

23/09/20 13:54:17 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7-cdh6.2.1

23/09/20 13:54:17 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.

23/09/20 13:54:17 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

Wed Sep 20 13:54:18 CST 2023 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

information_schema

hive

hue

mysql

nev

oozie

performance_schema

scm

sys

test

[root@hadoop01 ~]#

练习环境部分信息

页面部分的补充

http://hadoop01:7180/cmf/home

admin/admin

http://hadoop02:8889/hue/

http://hadoop02:8889/hue/

hue/hue

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1027260.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

将本地项目上传至Github详解

目录 1 前言2 本地代码上传2.1 命令行方法2.2 图形界面法2.3 结果 1 前言 GitHub是一个面向开源及私有软件项目的托管平台,因为只支持Git作为唯一的版本库格式进行托管,故名GitHub 。开发者常常将github作为代码管理平台,方便代码存储、版本…

统计物理学复习----热力学的基本规律

General Laws of thermodynamics 热力学系统常识 单位制 1大气压强 101325 Pa 基本概念与专业英语 状态参量 pressurevolumetemperature Extensive quantityIntensive quantityMechanicalVPThermal ST Helmholtz Free EnergyEnthalpyInternal EnergyGibbs Free Energy 准…

ChunJun(OldNameIsFlinkX)

序言 ChunJun主要是基于Flink实时计算框架,封装了不同数据源之间的数据导入与导出功能.我们只需要按照ChunJun的要求提供原始与目标数据源的相关信息给Chunjun,然后它会帮我们生成能运行与Flink上的算子任务执行,这样就避免了我们自己去根据不同的数据源重新编辑读入与读出的方…

模块化开发_php中使用redis

redis 介绍和安装 redis数据库,支持数据持久化,常用与分布式锁,支持事务,持久化,非关心型数据库 区别: 关系型数据库:硬盘,安全,结构简单,易于理解,浪费空间…

Mac环境下jupyter添加nbextension插件

1、没有插件的状态 2、在窗口运行命令 pip install jupyter_contrib_nbextensions 安装成功 3、添加 jupyter contrib nbextension install --user 运行后 报错 No module named notebook.base 更新版本后再添加 pip install jupyter notebook6.1.0 jupyter contrib nb…

vim缓存-交换文件

Catf1agCTF靶场 web swp 题目链接:http://catf1ag.cn/ 个人博客:https://sword-blogs.com/ 题目考点: vim在编辑文档的过程中如果异常退出,会产生缓存文件 vim 交换文件名 参考文章:vim手册 https://yianwillis.…

从零学习开发一个RISC-V操作系统(二)丨GCC编译器和ELF格式

本篇文章的内容 一、GCC(GUN Compiler Collection)1.1 GCC的命令格式1.2 GCC的主要执行步骤1.3 GCC涉及的文件类型 二、ELF简介2.1 ELF文件格式图2.2 ELF文件处理的相关工具2.3 练习 本系列是博主参考B站课程学习开发一个RISC-V的操作系统的学习笔记&…

只需4步使用Redis缓存优化Node.js应用

介绍 通过API获取数据时,会向服务器发出网络请求,收到响应数据。但是,此过程可能非常耗时,并且可能会导致程序响应时间变慢。 我们使用缓存来解决这个问题,客户端程序首先向API发送请求,将返回的数据存储…

数据库:Hive转Presto(一)

本人因为工作原因,经常使用hive以及presto,一般是编写hive完成工作,服务器原因,presto会跑的更快一些,所以工作的时候会使用presto验证结果,所以就要频繁hive转presto,为了方便,我用…

Shader实战(2):在unity中实现物体材质随时间插值渐变

目录 前言 一、shader代码 二、材质准备 三、控制代码 前言 最近想做一个物体两套材质随时间插值渐变的效果,本以为可以通过unity自带的Material.Lerp()实现,后来发现这个方法只适用于纯色的情况,其实与Color.Lerp()是同样的效果&#xf…

深度分析Oracle中的NULL

【squids.cn】 全网zui低价RDS,免费的迁移工具DBMotion、数据库备份工具DBTwin、SQL开发工具等 关键点 特殊值NULL意味着没有数据,它声明了该值是未知的事实。默认情况下,任何类型的列和变量都可以取这个值,除非它们有一个NOT N…

阿里云产品试用系列-云桌面电脑

无影云电脑(WUYING Workspace),是一种易用、安全、高效的云上桌面服务。它支持快速便捷的桌面环境创建、部署、统一管控与运维。无需前期传统硬件投资,帮您快速构建安全、高性能、低成本的企业桌面办公体系。可广泛应用于具有高数…

[Linux入门]---文本编辑器vim使用

文章目录 1.Linux编辑器-vim使用2.vim的基本概念4.vim正常模式命令集从正常模式进入插入模式从插入模式转换为命令模式移动光标删除文字复制替换撤销更改跳至指定行 5.vim末行模式命令集5.总结 1.Linux编辑器-vim使用 vi/vim作为Linux开发工具之一,从它的键盘操作图…

(VS报错)已在 xxxxx.exe 中执行断点指令(__debugbreak()语句或类似调用)-解决方法C++创建对象四种方式

上述报错困扰了我好几天,在网上搜了一天,到最后还是没有解决问题 试过通过项目属性->C/C>代码生成->启用增强指令集->选择AVX,这种方法也没用 但问题出现在创建对象时内存分配问题上 方法一: 如果是这样创建对象&a…

Linux学习-HIS系统(1)

Git安装 #安装中文支持(选做) [rootProgramer ~]# echo $LANG #查看当前系统语言及编码 en_US.UTF-8 [rootProgramer ~]# yum -y install langpacks-zh_CN.noarch #安装中文支持 [rootProgramer ~]# vim /etc/locale.co…

将docker镜像打成tar包

# 打包 docker save -o zookeeper.tar bitnami/zookeeper:3.9.0-debian-11-r11# 解压 docker load -i zookeeper.tar

Jenkins学习笔记2

Jenkins下载安装: 从清华源开源镜像站上下载jenkins的安装包: 安装的是这个版本。 关于软件的版本,尽量使用LTS,长期支持。 首先是安装openjdk: yum install fontconfig java-11-openjdk[rootlocalhost soft]# java …

springcloudalibaba和nacos版本对应关系

文章目录 一、背景二、解决bug历程 一、背景 因为公司项目需要升级springcloud的版本,升级后服务启动时连接不上nacos(如下图) 二、解决bug历程 历程一 一开始直接百度“Client not connected, current status:STARTING”这个错误&#x…

【基于Thread多线程+随机数(Random)+java版本JDBC手动提交事务+EasyExcel读取excel文件,向数据库生成百万级别模拟数据】

基于Thread多线程随机数(Random)java版本JDBC手动提交事务EasyExcel读取excel文件,向数据库生成百万级别模拟数据 基于Thread多线程随机数(Random)java版本JDBC手动提交事务EasyExcel读取excel文件,向数据库…

最佳实践:TiDB 业务写变慢分析处理

作者:李文杰 数据架构师,TUG 广州地区活动组织者 在日常业务使用或运维管理 TiDB 的过程中,每个开发人员或数据库管理员都或多或少遇到过 SQL 变慢的问题。这类问题大部分情况下都具有一定的规律可循,通过经验的积累可以快速的定…