搭建hadoop和hive分析脚本

这篇具有很好参考价值的文章主要介绍了搭建hadoop和hive分析脚本。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

#实现云主机自身使用root用户ssh访问hadoop000免密登陆

搭建环境

vim /etc/hosts
hostnamectl set-hostname hadoop000
bash
ssh hadoop000
hdfs namenode -format
start-all.sh
jps
systemctl start mysqld.service
schematool -dbType mysql -initSchema
​
hive

hdfs操作

创建路径

上传

#创建文件,删除,
hadoop fs -mkdir HDFS://phonemodel
    hdfs dfs -mkdir -p /phonemodel/usergender
hadoop fs -touchz /phonemodel/userage/part-r-00000
hadoop fs -rm -r /phonemodel/userage/000000_0
hadoop fs -cat /phonemodel/userage/*
​
#-r删除文件
#上传-f强制覆盖
hadoop fs -put  -f /root/phonemodel/gender_age_train.csv /phonemodel/
hadoop fs -put /root/phonemodel/phone_brand_device_model.csv /phonemodel/
hadoop fs -put /root/demo/part-r-00000  /phonemodel/usergender/
hadoop fs -put /root/1/part-r-00000  /phonemodel/agegender/
​
​
#究极版
hadoop fs -mkdir -p /phonemodel/agegender && hadoop fs -put /root/1/part-r-00000 /phonemodel/agegender/
/root/internetlogs/journal.log上传至HDFS文件系统/input/下
hadoop fs -mkdir -p /input/ && hadoop fs -put /root/internetlogs/journal.log /input/
INSERT OVERWRITE DIRECTORY '/root/theft/result06'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
SELECT COUNT(*) 
FROM THEFT
WHERE case_subtype = '盗窃居民小区车辆';

HIVE数据库操作

创库

建表

导入数据

#建库
CREATE demo IF NOT EXISTS hive;
​
create database demo;
#创建表
CREATE EXTERNAL TABLE IF NOT EXISTS user_age (
  device_id STRING,
  gender STRING,
  age INT,
  age_group STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION 'hdfs://phonemodel/';
​
​
​
​
#导入数据-- 加载数据到表中,上传local,还是inpath
LOAD DATA INPATH 'hdfs://your_input_data_path' INTO TABLE user_data;
​
LOAD DATA INPATH '/phonemodel/gender_age_train.csv' INTO TABLE user_data;
LOAD DATA INPATH '/phonemodel/gender_age_train.csv' INTO TABLE user_data;
LOAD DATA INPATH '/phonemodel/phone_brand_device_model.csv' INTO TABLE user_data;
​

导出文件

#输出路径

先选

​
INSERT OVERWRITE DIRECTORY '/phonemodel/userage/' 
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ' '
​
​
​
SELECT age, COUNT(*) AS user_count
FROM user_age
GROUP BY age;
insert overwrite local directory '/root/theft/resulte1' #只写到文件夹
row format delimited fields terminated by '\t'
select count(report_time)num from project.theft
where substr(report_time,1,8)='2821年g5月';
数据分析校验输出

Hive会自动生成输出文件,并将结果写入这些文件中。你不需要提前创建part-r-00000文件,Hive会根据配置自动创建文件并命名

​
#计算百分比
INSERT OVERWRITE DIRECTORY '/phonemodel/usergender'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ' '
SELECT gender, COUNT(*) AS gender_count,
       CONCAT(ROUND(COUNT(*) / t.total_count * 100, 2), '%') AS percentage
FROM user_age
CROSS JOIN (SELECT COUNT(*) AS total_count FROM user_age) t
GROUP BY gender;

#

​
SELECT gender, COUNT(*) AS gender_count,
       ROUND(COUNT(*) * 100 / (SELECT COUNT(*) FROM gender_age_train), 2) AS gender_percentage
FROM gender_age_train
GROUP BY gender;
M 64.18%
F 35.82%
​

联合输出

SELECT CONCAT(age, ':', gender) AS age_gender, COUNT(*) AS user_count
FROM gender_age_train
GROUP BY CONCAT(age, ':', gender);

hadoop

#配置windows
cmd
​
C:\WINDOWS\system32\drivers\etc
172.18.39.140 hadoop000 #改成外网ip
​
创建链接
包-类
​
​
​
import java.io.IOException;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
​
public class PageViewCount {
​
    public static class PageViewMapper extends Mapper<Object, Text, Text, IntWritable> {
        private final static IntWritable ONE = new IntWritable(1);
        private Text page = new Text();
​
        public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
            String line = value.toString();
            StringTokenizer tokenizer = new StringTokenizer(line);
            if (tokenizer.hasMoreTokens()) {
                String pageName = tokenizer.nextToken();
                page.set(pageName);
                context.write(page, ONE);
            }
        }
    }
​
    public static class PageViewReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
        private IntWritable result = new IntWritable();
​
        public void reduce(Text key, Iterable<IntWritable> values, Context context)
                throws IOException, InterruptedException {
            int sum = 0;
            for (IntWritable val : values) {
                sum += val.get();
            }
            result.set(sum);
            context.write(key, result);
        }
    }
​
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        Job job = Job.getInstance(conf, "Page View Count");
        job.setJarByClass(PageViewCount.class);
        job.setMapperClass(PageViewMapper.class);
        job.setCombinerClass(PageViewReducer.class);
        job.setReducerClass(PageViewReducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);
        FileInputFormat.addInputPath(job, new Path("<输入文件路径>")); // 替换为实际的输入文件路径
        FileOutputFormat.setOutputPath(job, new Path("/root/internetlogs/pv")); // 输出到指定目录
        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}
​
​
​
​

$ javac -classpath $(hadoop classpath) PageViewCount.java $ jar cf pv.jar PageViewCount*.class

$ hadoop jar pv.jar PageViewCount <输入文件路径>

import java.io.IOException;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
​
public class BrowserIdentificationCount {
​
    public static class BrowserIdentificationMapper extends Mapper<Object, Text, Text, IntWritable> {
        private final static IntWritable ONE = new IntWritable(1);
        private Text browserIdentification = new Text();
​
        public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
            String line = value.toString();
            StringTokenizer tokenizer = new StringTokenizer(line);
            if (tokenizer.hasMoreTokens()) {
                String browserId = tokenizer.nextToken(); // 提取浏览器标识
                browserIdentification.set(browserId);
                context.write(browserIdentification, ONE);
            }
        }
    }
​
    public static class BrowserIdentificationReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
        private IntWritable result = new IntWritable();
​
        public void reduce(Text key, Iterable<IntWritable> values, Context context)
                throws IOException, InterruptedException {
            int sum = 0;
            for (IntWritable val : values) {
                sum += val.get();
            }
            result.set(sum);
            context.write(key, result);
        }
    }
​
    
Step 4. 定义主类, 描述 Job 并提交 Job
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        Job job = Job.getInstance(conf, "Browser Identification Count");
        job.setJarByClass(BrowserIdentificationCount.class);
        job.setMapperClass(BrowserIdentificationMapper.class);
        job.setCombinerClass(BrowserIdentificationReducer.class);
        job.setReducerClass(BrowserIdentificationReducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);
        FileInputFormat.addInputPath(job, new Path("<输入文件路径>")); // 替换为实际的输入文件路径
        FileOutputFormat.setOutputPath(job, new Path("/root/internetlogs/browser")); // 输出到指定目录
        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}
​
​
hadoop jar hadoop_hdfs_operate‐1.0‐SNAPSHOT.jar

WordCountMapper.java

public class WordCountMapper extends Mapper<LongWritable, Text, Text, IntWritable> {
    /**
     * Map阶段的业务逻辑需写在自定义的map()方法中
     * MapTask会对每一行输入数据调用一次我们自定义的map()方法
     */
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        //(1)将MapTask传给我们的文本内容先转换成String
        String line = value.toString();  
        //(2)根据空格将这一行切分成单词
        String[] words = line.split(" ");
        //(3)将单词输出为<单词,1>
        for (String word : words) {
            // 将单词作为key,将次数1作为value,以便后续的数据分发,可以根据单词分发,将相同单词分发到同一个ReduceTask中
            context.write(new Text(word), new IntWritable(1));
        }
    }
}

WordCountReducer.java

public class WordCountReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
    /**
     * <Deer,1><Deer,1><Deer,1><Deer,1><Deer,1>
     * <Car,1><Car,1><Car,1><Car,1>
     * 框架在Map处理完成之后,将所有key-value对缓存起来,进行分组,然后传递一个组<key,values{}>,调用一次reduce()方法
     * <Deer,{1,1,1,1,1,1.....}>
     * 入参key,是一组相同单词kv对的key
     */
    @Override
    protected void reduce(Text key, Iterable<IntWritable> values, Context context)
            throws IOException, InterruptedException {
        //做每个单词的结果汇总
        int sum = 0;
        for (IntWritable v : values) {
            sum += v.get();
        }
        //写出最后的结果
        context.write(key, new IntWritable(sum));
    }
}

WordCount Driver

public class WordCount {
    /**
     * 该MR程序运行的入口,相当于YARN集群(分配运算资源)的客户端
     */
    public static void main(String[] args) throws Exception {
        // (1)创建配置文件对象
        Configuration conf = new Configuration();
​
        // (2)新建一个 job 任务
        Job job = Job.getInstance(conf);
​
        // (3)将 job 所用到的那些类(class)文件,打成jar包 (打成jar包在集群运行必须写)
        job.setJarByClass(WordCount.class);
​
        // (4)指定 mapper 类和 reducer 类
        job.setMapperClass(WordCountMapper.class);
        job.setReducerClass(WordCountReducer.class);
​
        // (5)指定 MapTask 的输出key-value类型(可以省略)
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(IntWritable.class);
​
        // (6)指定 ReduceTask 的输出key-value类型
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);
​
        // (7)指定该 mapreduce 程序数据的输入和输出路径
        Path inPath=new Path("/wordcount/input");
        Path outpath=new Path("/wordcount/output");
        FileSystem fs=FileSystem.get(conf);
        if(fs.exists(outpath)){
            fs.delete(outpath,true);
        }
        FileInputFormat.setInputPaths(job,inPath);
        FileOutputFormat.setOutputPath(job, outpath);
​
        // (8)最后给YARN来运行,等着集群运行完成返回反馈信息,客户端退出
        boolean waitForCompletion = job.waitForCompletion(true);
        System.exit(waitForCompletion ? 0 : 1);
    }
}
​

流量

hdfs dfs -put /root/internetlogs/journal.log /input/
​

PageViewCount是一个Java类,它是用于实现页面访问量统计的MapReduce程序的主类。在这个类中,包含了Map函数和Reduce函数的定义,以及配置作业的相关信息。这个类负责设置作业的输入和输出路径,指定Map和Reduce函数的实现类,以及其他作业配置参数。在main方法中,创建了一个作业实例并运行它

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
​
import java.io.IOException;
​
public class PageViewCount {
    public static class PageViewMapper extends Mapper<Object, Text, Text, IntWritable> {
        private final static IntWritable one = new IntWritable(1);
        private Text resource = new Text();
​
        public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
            String[] parts = value.toString().split(" ");
            if (parts.length >= 4) {
                String resourcePath = parts[3];
                resource.set(resourcePath);
                context.write(resource, one);
            }
        }
    }
​
    public static class PageViewReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
        private IntWritable result = new IntWritable();
​
        public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
            int sum = 0;
            for (IntWritable value : values) {
                sum += value.get();
            }
            result.set(sum);
            context.write(key, result);
        }
    }
​
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        Job job = Job.getInstance(conf, "PageViewCount");
        job.setJarByClass(PageViewCount.class);
        job.setMapperClass(PageViewMapper.class);
        job.setCombinerClass(PageViewReducer.class);
        job.setReducerClass(PageViewReducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);
        FileInputFormat.addInputPath(job, new Path("/input/journal.log"));
        FileOutputFormat.setOutputPath(job, new Path("/output/pv"));
        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}
​
#编译
hadoop com.sun.tools.javac.Main PageViewCount.java
​
​
​
​
#执行jar包
​
hadoop jar pv.jar PageViewCount /input/journal.log /output/pv
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
​
import java.io.IOException;
​
public class IPCountMapper extends Mapper<Object, Text, Text, IntWritable> {
    private final static IntWritable one = new IntWritable(1);
    private Text ipAddress = new Text();
​
    public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        String[] parts = value.toString().split(" ");
        if (parts.length >= 1) {
            String ip = parts[0];
            ipAddress.set(ip);
            context.write(ipAddress, one);
        }
    }
}
​
​
​
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
​
import java.io.IOException;
​
public class IPCountReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
    private IntWritable result = new IntWritable();
​
    public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
        int sum = 0;
        for (IntWritable value : values) {
            sum += value.get();
        }
        result.set(sum);
        context.write(key, result);
    }
}
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
​
public class IPCount {
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        Job job = Job.getInstance(conf, "IPCount");
        job.setJarByClass(IPCount.class);
        job.setMapperClass(IPCountMapper.class);
        job.setCombinerClass(IPCountReducer.class);
        job.setReducerClass(IPCountReducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);
        FileInputFormat.addInputPath(job, new Path("/input/journal.log"));
        FileOutputFormat.setOutputPath(job, new Path("/output/ip"));
        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}
Step 5: 编译和打包程序,将其生成为一个JAR文件。
​
Step 6: 将journal.log文件上传到HDFS的输入目录,例如/input/journal.log。
​
Step 7: 运行MapReduce作业,将结果保存到指定的输出目录,例如/output/ip。
​
Step 8: 将结果从HDFS中复制到本地目录/root/internetlogs/ip/下的part-00000文件。

打包执行

在hdfs文件系统上创建输入文件的目录

上传输入文件到目录中,上传后查看文件是否在该目录下存在文章来源地址https://www.toymoban.com/news/detail-603845.html

javac -classpath /usr/local/hadoop/share/hadoop/common/hadoop-common-2.7.1.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.7.1.jar:/usr/local/maven/lib/commons-cli-1.2.jar WordCount.java
 jar -cvf WordCount/WordCount.jar *.class
hadoop fs -mkdir /input
hadoop fs -put 1.txt /input
./hadoop jar /usr/local/hadoop/bin/WordCount/WordCount.jar org.apache.hadoop.examples.WordCount /input /output
收起

mysql

#见表
CREATE TABLE attendance (
  id INT NOT NULL,
  check_date DATE NOT NULL,
  emp_id INT NOT NULL,
  clock_in TIMESTAMP,
  clock_out TIMESTAMP,
  PRIMARY KEY (id),
  UNIQUE KEY uk_attendance (check_date, emp_id)
);
#导入数据,用navicat
​
LOAD DATA local INFILE '/root/mysq1/employee/employee.csv'
INTO TABLE employee
FIELDS TERMINATED BY
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
​
​
4. 查询“系乐”和“姚欣然”的共同好友信息(ID),结果存入视图table4。(字段:user_name1,user_name2,friend_id)(8.80 / 10分)
操作环境: qingjiao
​
CREATE VIEW table4 AS
SELECT u1.user_name AS user_name1, u2.user_name AS f_name, f.friend_id
FROM friend f
JOIN user u1 ON f.user_id = u1.user_id
JOIN user u2 ON f.friend_id = u2.user_id
WHERE (u1.user_name = '系乐' OR u1.user_name = '姚欣然')
  AND (u2.user_name = '系乐' OR u2.user_name = '姚欣然');

到了这里,关于搭建hadoop和hive分析脚本的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【hive】单节点搭建hadoop和hive

    需要使用hive远程debug,尝试使用无hadoop部署hive方式一直失败,无果,还是使用有hadoop方式。最终查看linux内存占用 6GB ,还在后台运行docker的mysql( bitnami/mysql:8.0 ),基本满意。 版本选择: (1)hive2 hadoop2 和hive3和hadoop3需要搭配使用,不能像chd的hive2和hadoop3搭配使用,容易出现

    2024年04月10日
    浏览(28)
  • Hadoop——Hive运行环境搭建

    Windows:10         JDK:1.8         Apache Hadoop:2.7.0 Apache Hive:2.1.1         Apache Hive src:1.2.2         MySQL:5.7 1、下载 Hadoop搭建 Apache Hive 2.1.1:https://archive.apache.org/dist/hive/hive-2.1.1/apache-hive-2.1.1-bin.tar.gz Apache Hive 1.2.2 src:https://archive.apache.org/dist/hive/hive-1.2.2/apache-hive-1.

    2024年02月16日
    浏览(28)
  • hadoop集群搭建+hive安装

    VMware-workstation:VMware-workstation-full-16.2.3 ubuntu:ubuntu-21.10 hadoop:hadoop2.7.2 mysql:mysql-connector-java-8.0.19 jdk:jdk-8u91-linux-x64.tar(注意要是linux版本的,因为是在linux系统中创建虚拟机) hive:hive1.2.1 小技巧: 右键单击可以paste 1.选择典型即可 2.将ubuntu镜像文件导入: 3.用户名要记住

    2024年02月05日
    浏览(92)
  • hadoop搭建、mysql、hive部署

    一、 HDFS安装搭建 1.1 关闭虚拟机防火墙 在之后的学习、操作中,经常会遇到在宿主机中通过程序去访问虚拟机中的相关软件,但是默认情况下,虚拟机的防火墙是不允许访问,这是需要开启一个一个的端口号,比较麻烦,所以在教学过程中,为了提高教学、学习的效率,直

    2024年02月08日
    浏览(33)
  • docker搭建hadoop和hive集群

    安装docker教程 https://www.runoob.com/docker/centos-docker-install.html 只要在终端输入: 后出现如下图的内容就证明安装docker成功了 在终端输入: 在终端输入:sudo docker images,可以看到刚刚拉取的两个镜像 每次执行docker语句都要在前面加sudo,比较麻烦,直接将hadoop用户加入docker用户组

    2024年02月01日
    浏览(46)
  • 分布式搭建(hadoop+hive+spark)

    hadoop-master 192.168.43.141 hadoop-slave1 192.168.43.142 hadoop-slave2 192.168.43.143 链接:https://pan.baidu.com/s/1OwKLvZAaw8AtVaO_c6mvtw?pwd=1234 提取码:1234 MYSQL5.6:wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm Scale:wget https://downloads.lightbend.com/scala/2.12.4/scala-2.12.4.tgz

    2024年02月12日
    浏览(32)
  • Hive 服务管理脚本

    2024年02月10日
    浏览(25)
  • 单机搭建hadoop环境(包括hdfs、yarn、hive)

    单机可以搭建伪分布式hadoop环境,用来测试和开发使用,hadoop包括: hdfs服务器, yarn服务器,yarn的前提是hdfs服务器, 在前面两个的基础上,课可以搭建hive服务器,不过hive不属于hadoop的必须部分。 过程不要想的太复杂,其实挺简单,这里用最糙最快最直接的方法,在我的单

    2024年02月20日
    浏览(42)
  • Hadoop 之 Hive 4.0.0-alpha-2 搭建(八)

    Hive 是基于 Hadoop 的数据仓库工具,可以提供类 SQL 查询能力 Hive 官网 Hive 下载地址(自选版本) MySQL Java 驱动下载 1.解压并配置 HIVE 2.修改 hive-site.xml 初始化元数据 查看库 Hive 3.修改 hadoop 的 core-site.xml 4.启动 1.Pom依赖 2.Yarm 配置文件 3.启动类 4.配置类 5.测试类 如果插入或查询

    2024年02月14日
    浏览(24)
  • 大数据环境搭建 Hadoop+Hive+Flume+Sqoop+Azkaban

    Hadoop:3.1.0 CentOS:7.6 JDK:1.8 这里网上教程很多,就不贴图了 【内存可以尽量大一些,不然Hive运行时内存不够】 创建tools目录,用于存放文件安装包 将Hadoop和JDK的安装包上传上去 创建server目录,存放解压后的文件 解压jdk 配置环境变量 配置免密登录 配置映射,配置ip地址和

    2024年02月09日
    浏览(29)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包