avro 조사
DESCRIPTION
소프트웨어 마에스트로 3기 자유프로젝트 Avro조사TRANSCRIPT
APACHE AVROSoftware Maestro 3기 한진수
목차1. 소개 2. 장점 3. 지원 언어 4. Serialization 5. Example 6. 속도 7. 참고
소개
- 기존 Frameworks는 크게 protocol buffer, thrift가 있다.Doug Cutting이 만들었다.
Serialization Framework이다.File format이다.RPC format이다.
장점
thrift나 protocol buffer로 쓰고 읽을 수 있다.다양한 Language를 지원한다.generic type에 의해서 dynamic language와 쉽게 통합이 잘 된다.
지원 언어
Avro Serialization
Schema Language 가 JSON이다 (모든 언어는 JSON Parser가 존재하기때문)주어진 언어로 데이터 읽고 쓰기가 구현이 가능하다.
Avro Serialization - Primitive Types
Type Descnull no value
boolean a binary valueint long
long 64-bit signed integerfloat single precision (32-bit) IEEE 754 floating point number
double double precision (64-bit) IEEE 754 floating-point number
bytes sequence of 8-bit unsigned bytesstring unicode character sequence
{ “type” : “string” } 의 꼴로 표현된다.
Avro Serialization - Complex Types
Type Desc
Recodes Use the type name “recode”
Enums Use the type name “enum”
Arrays Use the type name “array”
Maps Use the type name “map”
Unions Unions are represented using JSON arrays. Unisons my not contain more than one schema with the same type
Fixed Use the type name “fixed”
진짜로 Complex하다. 맨뒤 레퍼런스 참고.
Example - Avro 독립 예제
Example - Avro + FlumeExample.conf 파일
avro로 localhost에 포트 33333에서 받을 거에요
Example - Avro + FlumeExample.conf 파일
avro로 localhost에 포트 33333에서 받을 거에요
log4j로 기록할 것이고요
Example - Avro + Flume
client 실행
agent 실행 -> 대기
잘 받아서 저장했다.
Example - Avro + Flume2
Agent
Source SinkChannel
Agent
Source SinkChannel
Client
Avro
File Rolling
Example - Avro + Flume2
속도 - Total
썩 빠른 편은 아니다.
속도 - Size
작다.
참고Apache Avro : http://avro.apache.org Slideshare : http://www.slideshare.net/ChicagoHUG/avro-chug-20120416
http://www.slideshare.net/hadoopusergroup/3-avro-hug20100721
Types : http://avro.apache.org/docs/current/spec.html#schema_primitive Avro-RPC-Quickstart : https://github.com/phunt/avro-rpc-quickstart benchmarking : https://code.google.com/p/thrift-protobuf-compare/wiki/BenchmarkingV2