Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Software Engineering
- agile
- RFID
- web
- Python
- Malaysia
- Italy
- AI
- essay
- Java
- comic agile
- django
- program
- Linux
- Book review
- leadership
- France
- Kuala Lumpur
- QT
- MySQL
- history
- management
- hadoop
- programming_book
- Book
- Artificial Intelligence
- Programming
- ubuntu
- hbase
- erlang
Archives
- Today
- Total
file write to hdfs 본문
어떤 size 단위로 hdfs에 file write을 하는 경우 FSDataOutputStream 사용(http://wiki.apache.org/hadoop/HadoopDfsReadWriteExample)
FileSystem#append를 사용하는 건 아직 불안정하다고 함. Xmx option을 사용해도 조금 더 오래 동작하다가 오류 발생 http://stackoverflow.com/questions/15609909/error-java-heap-space
StringBuffer의 append로 String을 모아 일정 size를 넘으면 한 번 file write을 하고, 기존의 object를 재활용하는 방식을 했더니 StringBuffer에서 heap OutOfMemory가 발생
sb.length(0)를 사용했지만 소용 없음 http://stackoverflow.com/questions/2242471/java-clearing-the-string-buffer-after-loop
Comments