TagCloud

Friday, October 19, 2012

Apache Gora

Nutch 1.X 에서 Nutch 2.X 를 운용하기 위해 Apache Gora 에 대해서 정리합니다.

번역은 못하나 나름 의역해본 결과...
Gora  는 NoSQL 의 CAP  이론에 있어서 취약한 Consistency 를 보완해 주는 소프트웨어 프레임웍으로서의 목적을 가진 Apache Project  로 보여지며,
 NoSQL 을 위함에 목적이 있으나 제약적으로나마 관계형 데이타베이스도 지원하는것 같습니다.

Apache Gora








Apache Gora 란? 

The Apache Gora open source framework provides an in-memory data model and persistence for big data. Gora supports persisting to column stores, key value stores, document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce support.Apache Gora 는 빅데이터를 위한 인메모리데이터 모델과 일관성(persistance)를 제공하는 오픈소스 프레임웍입니다.  Gora  는 column 저장소, key value 저장소, document 저장소  그리고 RDBMS들과 Apache Hadoop 의 MapReduce를 지원하는 광대한 데이터를 분석하는데 있어서 일관성(persisting)을 지원합니다.

Gora is a object relational/non-relational mapping for arbitrary data stores including both relational (MySQL) and non-relational data stores (HBase, Cassandra, Accumulo, etc).  It was designed for Big Data applications and has support (interfaces) for Apache Pig, Apache Hive, Cascading, and generic Map/Reduce.

Gora는 관계형(MySQL) 그리고 비관계형 저장소(HBase, Cassandra, Accumulo, 등등) 모두를 포함하는 임이의 데이터저장소를 위한 관계형/비관계형 매핑 객체입니다.

Apache Gora 를 사용하는 이유


Although there are various excellent ORM frameworks for relational databases, data modeling in NoSQL data stores differ profoundly from their relational cousins. Moreover, data-model agnostic frameworks such as JDO are not sufficient for use cases, where one needs to use the full power of the data models in column stores. Gora fills this gap by giving the user an easy-to-use in-memory data model and persistence for big data framework with data store specific mappings and built in Apache Hadoop support.

비록 관걔형 데이타베이스를 위한 다양하고 훌륭한 ORM 프레임웍이 존재하지만 NoSQL 데이터모델링은 관계형데이타베이스의 그것과는 근본부터 매우 다릅니다. 더욱이 JDO와 같은 프레임웍은 컬럼기반 저장소에서의 데이터 모델링의 모든 기능을 지원하는데 있어서 충분하지 않습니다. Gora 는 인메모리데이터모델과 (특히 Apache Hadoop 를 지원하는데 있어서)빅데이터 프레임웍을 위한 일관성(persistence)를 사용자들이 쉽게 사용할 수 있도록 해 줌으로서 그러한 차이를 만족시켜줍니다.
The overall goal for Gora is to become the standard data representation and persistence framework for big data. The roadmap of Gora can be grouped as follows.
Gora 의 주 목적은 빅데이터를 위해 표준 데이터형식과 persistence framework가 되는 것입니다. Gora 의 roadmap 은 아래의 목록들과 같이 그룹화할 수 있습니다.

  • Data Persistence : Persisting objects to Column stores such as HBase, Cassandra, Hypertable; key-value stores such as Voldermort, Redis, etc; SQL databases, such as MySQL, HSQLDB, flat files in local file system of Hadoop HDFS.
  • 데이터 일관성 : HBase, Cassandra, Hypertable 과 같은 컬럼기반 저장소와 Voldport, Redis 등과 같은 Key-value 저장소, 그리고 MySQL, HSQLDB, 하둡 HDFS의 로컬시스템 flat 파일들과 같은 SQL database의 일관성(persistence)을 구현합니다.
  • Data Access : An easy to use Java-friendly common API for accessing the data regardless of its location.
  • 데이타 접근 : 위치에 관계 없어 데이터에 접근하기 위한 자바 친화적인 common API를 쉽게 사용할 수 있습니다.
  • Indexing : Persisting objects to Lucene and Solr indexes, accessing/querying the data with Gora API.
  • 인덱싱 : Gora API 를 이용하여 데이터 접근/쿼리, 루신과 솔라의 인덱스를 위한 일관성을 구현합니다.
  • Analysis : Accesing the data and making analysis through adapters for Apache Pig, Apache Hive and Cascading
  • 분석 : Apache Pig, Apache Hive와 Cascading 을 위한 어댑터를 통해 데이터를 접근하고 분석합니다.
  • MapReduce support : Out-of-the-box and extensive MapReduce (Apache Hadoop) support for data in the data store.
  • 데이터 저장소에 있는 데이터를 위해 Out-of-the-box 와 광범위한 Mapreduce(Apache Hadoop)을 지원합니다.



Apache Gora 의 배경


ORM stands for Object Relation Mapping. It is a technology which abstacts the persistency layer (mostly Relational Databases) so that plain domain level objects can be used, without the cumbersome effort to save/load the data to and from the database. Gora differs from current solutions in that:

ORM은 객체 관계의 매핑을 의미합니다. 순수 도메인 레벨의 객체가 데이타베이스로부터 데이터를 저장하고 로드하는데 어떠한 노력도 필요하지 않도록 persistency 레이어(주로 관계형 데이타베이스의)를 추상화해주는 기술입니다. Gora 는 지금까지의 솔루션들과는 다음과 같이 다릅니다.


  • Gora is specially focussed at NoSQL data stores, but also has limited support for SQL databases.
  • Gora 는 특별히 NoSQL 데이타 저장소를 다루는데 목적이 있으나, SQL 데이터베이스를 지원하는데 있어서도 제약적으로나마 지원이 가능합니다.
  • The main use case for Gora is to access/analyze big data using Hadoop.
  • Gora 의 주된 사용처는 Hadoop 을 이용한 빅데이터에 대한 접근과 분석에 있습니다. 
  • Gora uses Avro for bean definition, not byte code enhancement or annotations.
  • Gora 는 빈 정의와 코드 향상 혹은 주석 위해 Avro 를 이용합니다.
  • Object-to-data store mappings are backend specific, so that full data model can be utilized.
  • 객체에서 데이터로의 저장 매핑은 백엔드에서 지정함에 따라 모든 데이터 모델을 응용할 수 있습니다.
  • Gora is simple since it ignores complex SQL mappings.
  • Gora 는 복잡한 SQL 매핑을 무시함으로서 단순합니다. 
  • Gora will support persistence, indexing and anaysis of data, using Pig, Lucene, Hive, etc.
  • Gora 는 Pig,Lucene,Hive 등을 이용하여 persistence 와 인덱싱, 그리고 데이터의 분석을 지원할 예정입니다.











참고 자료
Apache Gora : http://gora.apache.org
Apache Nutch with Gora, Accumulo : http://www.covert.io/post/18414889381/accumulo-nutch-and-gora
no-sql 과 cap 이론 : http://i-bada.blogspot.kr/2012/05/nosql-cap.html
http://i-bada.blogspot.kr/2012/05/nosql-cap.html
http://blog.naver.com/hrk007?Redirect=Log&logNo=60165541758