DistCp hauv Hadoop yog dab tsi?
DistCp hauv Hadoop yog dab tsi?

Video: DistCp hauv Hadoop yog dab tsi?

Video: DistCp hauv Hadoop yog dab tsi?
Video: Pub thawj sib tua tuag ua dab scary 3/17/2020 2024, Kaum ib hlis
Anonim

DistCp (distributed the copy) yog ib lub cuab yeej siv rau kev luam ntawv loj inter/intra-cluster. Nws siv MapRub los cuam tshuam nws kev faib khoom, kev ua yuam kev thiab kev rov qab los, thiab tshaj tawm. Nws nthuav tawm cov npe ntawm cov ntaub ntawv thiab cov ntawv teev npe rau hauv cov tswv yim rau daim ntawv qhia kev ua haujlwm, txhua tus yuav luam ib qho kev faib ntawm cov ntaub ntawv teev tseg hauv daim ntawv teev npe.

Ib yam li ntawd ib tug yuav nug, puas Distcp overwrite?

Kuv kuj yuav tsum tau piav qhia qee qhov thiab piav qhia qhov ntawd ua discp - sau dua yuav sau dua cov ntaub ntawv tsis muaj teeb meem seb qhov loj npaum li cas los yog tsis. Qhov no yuav hloov kho tag nrho cov ntaub ntawv hauv hdfs-nn2 uas tsis phim qhov loj ntawm hdfs-nn1, nrog rau tshem tawm cov ntaub ntawv extraneous.

Ib yam li ntawd, Hadoop FS hais kom ua yog dab tsi? Cov ntaub ntawv System ( FS ) plhaub suav nrog ntau lub plhaub zoo li lus txib uas ncaj qha cuam tshuam nrog cov Hadoop Distributed File System ( HDFS ) nrog rau lwm cov ntaub ntawv systems uas Hadoop kev txhawb nqa, xws li Local FS , HFTP FS , S3 FS , thiab lwm yam.

Ua li no, kuv yuav hloov cov ntaub ntawv ntawm ib Hdfs mus rau lwm Hdfs li cas?

Hadoop fs cp – Yooj yim tshaj txoj kev luam cov ntaub ntawv los ntawm ib tug qhov chaw directory rau lwm . Siv cov haoop ua fs -cp [qhov chaw] [destination]. Hadoop fs copyFromLocal - Xav tau luam cov ntaub ntawv los ntawm cov ntaub ntawv hauv zos rau hauv HDFS ? Siv cov haoop ua fs -copyFromLocal [qhov chaw] [destination].

Yuav ua li cas luam ib pawg ntawm ib pawg mus rau lwm qhov?

Luam cov ntaub ntawv nruab nrab pawg . Koj ua tau luam cov ntaub ntawv los yog directory ntawm txawv pawg los ntawm kev siv hadoop distcp hais kom ua. Koj yuav tsum suav nrog daim ntawv pov thawj ntaub ntawv hauv koj luam thov kom qhov chaw pawg tuaj yeem lees paub tias koj tau authenticated rau qhov chaw pawg thiab lub hom phiaj pawg.

Pom zoo: