Learn something new and grow stronger every day, hehe.
One: Java reading and writing
Read the file:
FileInputStreamCreate a FileInputStream by opening a connection to the actual file that passes through the path name in the file system
Name
Main content:1. Initial file operation2. Read-only (R,RB)3. Write only (W,WB)4. Append (A, AB)5. Read and write (r+)6. Write-read (w+)7. Additional write read (A +)8. Other methods of operation9. File modification and another way to open a file
continue to learn the Redis source data related file code analysis, today I see a file called AoF, the letter is append only file abbreviation, meaning only append file operation. In order to record the change of data operation, the data of this
The common patterns for opening files are:
R, read-only mode "default"
W, write-only mode "unreadable; not exist" created; empty content;
A, append mode "readable; not present, create; append content only;"
"+" means you can
Hadoop version
Hbase version
Compatible?
0.20.2 release
0.90.2
No
0.20-append
0.90.2
Yes
0.21.0 release
0.90.2
No
0.22.x (in development)
0.90.2
No
It can be seen that hbase0.90.
1. after open is used to open a file, remember to call the close () method of the file object. For example, you can use the tryfinally statement to ensure that the file can be closed at last. File_objectopen(thefile.txt) try: all_the_textfile_object.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.