Practical exercise unit 7 Topic : MapReduce program in Java Work purpose : Display function, convolution function and the assignment perform the code study


Download 398.17 Kb.
bet8/12
Sana26.03.2023
Hajmi398.17 Kb.
#1296788
1   ...   4   5   6   7   8   9   10   11   12
Bog'liq
2-deadline

Data writing get
File system class files of creation one how many methods own into takes _ Most simple method Path object takes created file and data written exit flow returns :
public FSDataOutputStream create(Path f) throws IOException.
This of the method too much except loaded versions there is files for mandatory replacement flag , files replication write the coefficient clipboard the size of the file of the block size and access permissions installation enable gives _

append operation one writing get source already writing received the file to change possibility gives ; Of this for file will open and data maximum offset with is written . With this API infinite in length files which creates applications ( eg magazine _ files ) from closing after there is to the file information to add can _ Add operation all Hadoop files systems by done is not increased .
For example , add HDFS supports _ _ but S 3 files systems does not support .
Hadoop file to the system how to copy shows . of the operation to go show for we each Let's point to the progress() method in Hadoop calls - this each a 64K data package data node to the pipe written after happen will be ( Attention give it _ special behavior in the API unspecified _ therefore for it 's Hadoop future versions change can ).
Hadoop file systems now to write progress () during don't call Later on knowing , in MapReduce applications of the operation to go about information get important role plays _
File from the system information get
File metadata: FileStatus
Any _ file system directory from the structure transition and in it saved files and catalogs about information get ability support need _ FileStatus class Files and catalogs about file system metadata , including file _ length , block size , replication factor , change time , the owner information and access permits cover takes _ FileSystem of the class getFileStatus () method FileStatus object get method present is enough one file or directory for . Usage example in the list shown .

If the argument file If it shows , the method the most simple version FileStatus objects line returns _ length 1. If the argument is a directory in the directory files and catalogs expressive zero or from him over ¬ FileStatus objects will be returned .
Too bad except loaded versions files and catalogs choose for the filter defines PathFilter from the object pass can _ An example is in the "Path-Filter" section given , with . 108. Finally , one series roads in transfer the result equivalent " one path " method listStatus to call for simplified is a sign . FileStatus objects of arrays accumulation with each one road for consecutively one in the array . An example for , this feature file system of the tree different from the parts files the list Create for useful to be can _ Listing 3.6, this of your opinion simple demonstration gives _ ¬ FileUtil from the stat 2 Paths() method of class to use attention give FileStatus objects line rotate for Path objects to array .


Download 398.17 Kb.

Do'stlaringiz bilan baham:
1   ...   4   5   6   7   8   9   10   11   12




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling