HbaseBased on hadoop, if hbase uses the release version of hadoop directly, data may be lost. hbase needs to use hadoop-append. For more information, seeHbaseOfficial website materials
The following uses hbase-0.90.2 as an example to introduce the
The HDFs design does not support appending content to the file, so the design has its background (if you want to learn more about the append of HDFs , refer to the file appends in HDFs: http://blog.cloudera.com/blog/2009/07/file-appends-in-hdfs/),
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.
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
Allows programs to open data files in the specified folder as if they were in the current folder. If used without parameters, the append command displays a list of additional directories.
Grammar
append [;] [[drive:]path[;.]]
I often see some forums talking about java code optimization and talking about changing the "+" character string connection operation to StringBuilder (or StringBuffer. For the sake of simplicity, refer only to StringBuilder) in order to improve the
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
log4j default is to keep the log content appended to the log file;Here is a property Append default is true;If we set false to not append directly overwrite the previous content;Let's test it out:Log4j.rootlogger=debug, Console,
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
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.