2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
In the previous section, we completed the following:
Here are three public cloud servers, each with 2C4G, used to build a Hadoop learning environment for me to study.
I have built it once on a VM virtual machine before, but I didn't leave any notes. This time, I took advantage of the three machines I got a few days ago and tried to build it on the public Internet to experience it.
Apache Sqoop 于 2021 年 6 月迁入 Attic。
Apache Sqoop's mission is to create and maintain large-scale data transfer software related to Apache Hadoop and structured data stores.
Although the project may be outdated, if you have enough time, you can study it properly, it may be helpful to you!!!
sqoop import
--connect jdbc:mysql://h122.wzk.icu:3306/sqoop
--username hive
--password [email protected]
--target-dir /root
--append
-m 1
--fields-terminated-by "t"
--query 'select gname, serialNumber, price, stock_number,
create_time from goodtbl where price>88 and $CONDITIONS;'
上述参数的解释:
You can observe that Sqoop has started the MapReduce task.
At this point, the task has begun to allocate Map -> Reduce
You can see that the task has been completed.
sqoop import
--connect jdbc:mysql://h122.wzk.icu:3306/sqoop
--username hive
--password [email protected]
--target-dir /root
--delete-target-dir
--num-mappers 1
--fields-terminated-by "t"
--columns gname,serialNumber,price
--table goodtbl
上述参数的解释:
Consistent with the above content, I will not repeat the content and only extract part of it.
sqoop import
--connect jdbc:mysql://h122.wzk.icu:3306/sqoop
--username hive
--password [email protected]
--target-dir /root
--delete-target-dir
-m 1
--fields-terminated-by "t"
--table goodtbl
--where "price>=68"
Consistent with the above, the content and results are basically repeated, so they are not included.