重启大数据
在学校学习大数据一年之后,学的很浅 很乱 打算进行自己的系统性学习
- 关于环境
走进大数据 最开始的就是hadoop生态圈 (以后有机会在做hadoop的相关配置以及hdfs的简单使用) hadoop版本 hadoop 3.2.0 编辑器 notepad++ IntelliJ IDEA Community Edition 2021.2.1 maven apache-maven-3.0.5
IDEA破解教程可自行网上搜索 不会破解的就在官网下载社区版 链接: https://www.jetbrains.com/idea/download/#section=windows.
打开IDEA 新建Maven项目
p.s. maven要在windows中配置环境变量 pom文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>db_hadoop</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>3.2.0</version>
<scope>provided</scope>
</dependency>
<!-- log4j的依赖 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<build>
<plugins>
<!-- compiler插件, 设定JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase> <!-- packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
注:配置文件需要根据个人的hadoop版本在 链接: https://mvnrepository.com/?cf_chl_captcha_tk=pmd_iEQyZjhzfSSmBM6ODSy.9Pezb_lQmS2UR53R9WiVclQ-1630239914-0-gqNtZGzNAuWjcnBszQh9. 中进行搜索复制 例如 hadoop-client 在配置maven以及pom.xml文件时会遇到很多坑 要有耐心,多查找资料
|