Spark puas tuaj yeem nyeem cov ntaub ntawv hauv zos?
Spark puas tuaj yeem nyeem cov ntaub ntawv hauv zos?

Video: Spark puas tuaj yeem nyeem cov ntaub ntawv hauv zos?

Video: Spark puas tuaj yeem nyeem cov ntaub ntawv hauv zos?
Video: Data Science with Python! Analyzing File Types from Avro to Stata 2024, Kaum ib hlis
Anonim

Thaum Teeb txhawb nqa cov ntaub ntawv los ntawm hauv zos filesystem, nws xav tau qhov cov ntaub ntawv muaj nyob rau ntawm tib txoj kev ntawm tag nrho cov nodes hauv koj pawg. Qee lub network filesystems, zoo li NFS, AFS, thiab MapR's NFS txheej, raug rau cov neeg siv raws li cov ntaub ntawv tsis tu ncua.

Tom qab ntawd, ib tus tuaj yeem nug, Kuv yuav ua li cas thiaj li khiav taws hauv hom hauv zos?

Hauv hom hauv zos , spark hauj lwm khiav nyob rau hauv ib lub tshuab, thiab raug tua nyob rau hauv parallel siv multi-threading: qhov no txwv parallelism rau (feem ntau) tus naj npawb ntawm cores nyob rau hauv koj lub tshuab. Rau khiav hauj lwm hauv hom hauv zos , koj yuav tsum xub khaws lub tshuab los ntawm SLURM hauv kev sib tham sib hom thiab nkag mus rau nws.

Ib sab saum toj no, SC textFile yog dab tsi? textFile yog ib txoj kev ntawm ib lub org. apache. SparkContext chav kawm uas nyeem a cov ntaub ntawv los ntawm HDFS, cov ntaub ntawv hauv zos (muaj nyob rau ntawm txhua qhov), lossis ib qho Hadoop-txhawb cov ntaub ntawv kaw lus URI, thiab xa rov qab los ua RDD ntawm Strings.

Nyob rau hauv no hais txog, dab tsi yog lub txim hluav taws xob?

Cov Spark File yog ib daim ntawv uas koj khaws tag nrho koj cov tswv yim zoo. Nws tau txhais los ntawm tus sau Stephen Johnson. Yog li tsis txhob khawb cov ntawv sau rau ntawm Post-it® nyob rau nruab nrab ntawm hmo ntuj lossis mob siab rau cov ntawv sib txawv rau cov tswv yim, koj muab tag nrho koj cov ntsiab lus hauv ib qho. ntaub ntawv.

Dab tsi yog parallelized collection spark?

Peb piav qhia txog kev ua haujlwm ntawm cov ntaub ntawv faib tawm tom qab. Parallelized collections yog tsim los ntawm hu rau JavaSparkContext 's sib piv txoj hauv kev uas twb muaj lawm Sau hauv koj qhov program tsav tsheb. Cov ntsiab lus ntawm cov sau tau theej los ua ib qho kev faib cov ntaub ntawv uas tuaj yeem ua haujlwm nyob rau hauv parallel.

Pom zoo: