IT_AI_DeepLearning/Hadoop Eco

[펌] Apache Hadoop이란 무엇인가?

JJun ™ 2013. 7. 16. 00:29

 


 출처: http://www.looah.com/article/view/746


 


 

Apache Hadoop has been the driving force behind the growth of the big data industry. You'll hear it mentioned often, along with associated technologies such as Hive and Pig. But what does it do, and why do you need all its strangely-named friends, such as Oozie, Zookeeper and Flume?
Apache Hadoop은 빅 데이터 산업 발전의 원동력이 되어왔습니다. Hive나 Pig같은 관련된 기술들에 대해서도 종종 들어보셨을 것입니다. 하지만 이것이 무엇이고, 왜 여러분들은 Oozie나 Zookeeper, Flume처럼 이상한 이름을 가진 것들을 써야 하는 것일까요?

 

Hadoop brings the ability to cheaply process large amounts of data, regardless of its structure. By large, we mean from 10-100 gigabytes and above. How is this different from what went before?
Hadoop은 데이터의 구조에 상관없이, 저렴한 비용으로 큰 데이터를 처리할 수 있게 해줍니다. 여기서 우리가 말하는 '크다'는 의미는, 10-100 기가바이트, 그 이상을 말합니다. Hadoop을 사용하는 방법은 우리가 전부터 행해오던 방식들과 어떻게 다를까요?

 

Existing enterprise data warehouses and relational databases excel at processing structured data and can store massive amounts of data, though at a cost: This requirement for structure restricts the kinds of data that can be processed, and it imposes an inertia that makes data warehouses unsuited for agile exploration of massive heterogenous data. The amount of effort required to warehouse data often means that valuable data sources in organizations are never mined. This is where Hadoop can make a big difference.
비용의 문제가 있지만, 기존에 존재하는 엔터프라이즈 데이터 웨어하우스와 관계형 데이터베이스는 구조화된 데이터를 처리하는데에 능숙하고, 굉장히 많은 데이터를 저장할 수 있습니다. 구조적인 요구사항이 처리할 수 있는 데이터의 종류를 제한하기 때문이죠. 그리고 이러한 특성은 데이터 웨어하우스가 엄청나게 많은 데이터를 빠르게 탐색하기 힘들게 합니다. 웨어하우스 데이터에 필요로 하는 엄청난 수고는 조직 내의 가치있는 데이터들의 원천이 방치되고 있음을 의미합니다. 이것이야말로 Hadoop이 큰 차이를 만들어낼 수 있는 부분입니다.

 

This article examines the components of the Hadoop ecosystem and explains the functions of each.
이 글은 Hadooop 생태계의 컴포넌트들에 대해 나열하고, 각각의 기능들에 대해 설명하도록 하겠습니다.

 

 

 

The core of Hadoop: MapReduce


Hadoop의 핵심 : MapReduce


Created at Google in response to the problem of creating web search indexes, the MapReduce framework is the powerhouse behind most of today's big data processing. In addition to Hadoop, you'll find MapReduce inside MPP and NoSQL databases, such as Vertica or MongoDB.
웹 검색 인덱스를 만드는 것에 대한 문제의 해결책으로 구글이 만들어낸 MapReduce 프레임워크는 오늘날 대부분의 빅 데이터 처리에 대해 매우 확고한 위치를 차지하고 있습니다. Hadoop 외에도, 여러분들은 Vertica나 MongoDB와 같은 MPP나 NoSQL 데이터베이스에서 MapReduce를 만나게 될 것입니다.

 

The important innovation of MapReduce is the ability to take a query over a dataset, divide it, and run it in parallel over multiple nodes. Distributing the computation solves the issue of data too large to fit onto a single machine. Combine this technique with commodity Linux servers and you have a cost-effective alternative to massive computing arrays.
MapReduce의 가장 중요한 혁신은 데이터셋을 나누고, 다수의 노드들에 대해 병렬적으로 실행하는 방식으로 통해 질의할 수 있는 능력입니다. 연산을 나누는 것은 하나의 머신에 대하여 지나치게 큰 데이터를 처리하는 것에 대한 문제를 해결해 줍니다. 이러한 기법들과 리눅스 서버들을 조합하여 여러분들은 대규모의 Computing Array들에 대한 비용적으로 효율적인 대안적 솔루션을 가질 수 있습니다.

 

At its core, Hadoop is an open source MapReduce implementation. Funded by Yahoo, it emerged in 2006 and,according to its creator Doug Cutting, reached "web scale" capability in early 2008.
Hadoop의 핵심은 오픈 소스 MapReduce 구현체라고 할 수 있습니다. Yahoo가 후원하여 2006년도에 출범하였으며, 창시자 Doug Cutting에 의하면 2008년 초에 "Web Scale" 능력에 도달하였다고 합니다.

 

As the Hadoop project matured, it acquired further components to enhance its usability and functionality. The name "Hadoop" has come to represent this entire ecosystem. There are parallels with the emergence of Linux: The name refers strictly to the Linux kernel, but it has gained acceptance as referring to a complete operating system.
Hadoop 프로젝트가 성숙하면서, Hadoop은 Hadoop의 사용성과 기능성을 위한 많은 컴포넌트들을 수용하였고, "Hadoop"이라는 단어는 Hadoop, 그리고 Hadoop과 관련된 다양한 컴포넌트들을 아우르는 전반적인 생태계를 지칭하게 되었습니다. 이것은 Linux의 경우와 비슷합니다. 엄밀히 말하자면 Linux는 Linux Kernel을 지칭하는 것이지만, 결국에 Linux를 하나의 완전한 운영체제로 부르고 있는 것과 같습니다.

 

 

 

Hadoop's lower levels: HDFS and MapReduce


Hadoop의 로우 레벨들 : HDFS와 MapReduce


Above, we discussed the ability of MapReduce to distribute computation over multiple servers. For that computation to take place, each server must have access to the data. This is the role of HDFS, the Hadoop Distributed File System.
앞에서, 우리는 MapReduce부터 다수의 서버들을 통해 분산 컴퓨팅까지 논했습니다. 컴퓨팅이 일어나기 위해서는 각 서버들은 데이터를 가지고 있어야 합니다. 이것이 바로 HDFS(Hadoop Distributed File System)의 역할입니다.)

 

HDFS and MapReduce are robust. Servers in a Hadoop cluster can fail and not abort the computation process. HDFS ensures data is replicated with redundancy across the cluster. on completion of a calculation, a node will write its results back into HDFS.
HDFS와 MapReduce는 견고합니다. Hadoop 클러스터에 존재하는 서버들은 연산에 실패할 수 있고, 연산 과정을 중단할 수 없습니다. HDFS는 데이터가 복제되고 클러스터를 통해 분산될 수 있도록 해줍니다. 연산이 끝나게 되면, 노드는 연산의 결과를 HDFS에 기록합니다.

 

There are no restrictions on the data that HDFS stores. Data may be unstructured and schemaless. By contrast, relational databases require that data be structured and schemas be defined before storing the data. With HDFS, making sense of the data is the responsibility of the developer's code.
HDFS 저장소에는 데이터에 대한 제약이 존재하지 않습니다. 데이터는 구조화되지 않았을 수도 있고, 일정한 스키마가 존재하지 않을 수도 있습니다. 반면에 관계형 데이터베이스의 경우에는 반드시 데이터를 구조화 하여야 하고, 데이터를 저장하기 전에 미리 정의된 스키마들을 가지고 있어야 합니다. HDFS를 이용하면 데이터에 대한 책임은 개발자의 코드가 갖게 됩니다.

 

Programming Hadoop at the MapReduce level is a case of working with the Java APIs, and manually loading data files into HDFS.
Mapreduce 레벨에서 Hadoop을 프로그래밍하는 것은 Java API를 통해 작업을 하는 것이라 할 수 있고, HDFS 안으로 데이터를 수동적으로 데이터 파일을 HDFS로 로드해 오는 것이라 할 수 있습니다.

 

 

 

 

Improving programmability: Pig and Hive


프로그래밍능력의 향상 : Pig 와 Hive


Working directly with Java APIs can be tedious and error prone. It also restricts usage of Hadoop to Java programmers. Hadoop offers two solutions for making Hadoop programming easier.
Java API를 통해 직접 작업하는 것은 다소 지루한 작업이고, 에러가 발생하기 쉽습니다. 또한, 이것은 Java 프로그래머들에게 Hadoop의 사용법을 제한하기도 합니다. Hadoop은 Hadoop 프로그래밍을 보다 쉽게 할 수 있게 도와주는 두가지 솔루션을 제공합니다.

 

Pig is a programming language that simplifies the common tasks of working with Hadoop: loading data, expressing transformations on the data, and storing the final results. Pig's built-in operations can make sense of semi-structured data, such as log files, and the language is extensible using Java to add support for custom data types and transformations.
Pig는 Hadoop의 공통 Task들(데이터를 로드해오거나, 데이터 변환을 표현하는 방법, 마지막 결과를 저장하는 방법 등)을 단순화 시켜놓은 프로그래밍 언어입니다. Pig의 내장 연산들은 마치 로그 파일 같은 반 구조화된 데이터라 할 수 있습니다. 그리고 Pig는 Java를 통해 확장이 가능하고, 커스텀 데이터 타입이나 변환 등을 제공할 수 있습니다.

 

Hive enables Hadoop to operate as a data warehouse. It superimposes structure on data in HDFS and then permits queries over the data using a familiar SQL-like syntax. As with Pig, Hive's core capabilities are extensible.
Hive는 Hadoop을 데이터 웨어하우스처럼 사용할 수 있게 해줍니다. Hive는 HDFS에 있는 데이터를 구조화 시키고, SQL과 유사한 문법으로 데이터를 질의할 수 있도록 해줍니다. Pig처럼 Hive의 핵심 요소들은 확장 가능합니다.

 

Choosing between Hive and Pig can be confusing. Hive is more suitable for data warehousing tasks, with predominantly static structure and the need for frequent analysis. Hive's closeness to SQL makes it an ideal point of integration between Hadoop and other business intelligence tools.
Hive와 Pig 중에 무엇을 선택해야할지 혼란스러울 것입니다. Hive는 데이터 웨어하우징 작업, 정적 데이터, 빈번한 분석이 요구되는 경우에 적합합니다. Hive의 SQL에 가까운 문법은 Hadoop과 다른 비즈니스 도구들과의 통합에 이상적일 것입니다.

 

Pig gives the developer more agility for the exploration of large datasets, allowing the development of succinct scripts for transforming data flows for incorporation into larger applications. Pig is a thinner layer over Hadoop than Hive, and its main advantage is to drastically cut the amount of code needed compared to direct use of Hadoop's Java APIs. As such, Pig's intended audience remains primarily the software developer.
보다 큰 어플리케이션들의 결합을 위한 데이터의 변환 과정을 간결한 스크립트로 개발이 가능하게 함으로서 Pig는 개발자들에게 보다 빠르게 많은 데이터 셋을 탐색할 수 있게 해줍니다. Pig는 Hadoop 위에 Hive에 비하여 얇은 레이어를 형성하는데, Pig를 사용함으로서 Hadoop의 Java API를 직접 사용 하여 코드를 작성하는 것보다 더 적은 코드만으로도 동일한 작업을 수행할 수 있게 해줍니다. 따라서, Pig의 주된 사용자는 주로 소프트웨어 개발자가 될 것입니다.

 

 

 

Improving data access: HBase, Sqoop and Flume


데이터 접근의 향상 : HBase, Sqoop and Flume


At its heart, Hadoop is a batch-oriented system. Data are loaded into HDFS, processed, and then retrieved. This is somewhat of a computing throwback, and often, interactive and random access to data is required.
태생적으로, Hadoop은 Batch 기반 시스템입니다. 데이터들은 HDFS로 로드되어지고, 처리되며, 검색됩니다. 이는 다소 구식의 방식이고, 종종 대화식으로 작업되거나 랜덤 엑세스가 되어야 하기도 합니다.

 

Enter HBase, a column-oriented database that runs on top of HDFS. Modeled after Google's BigTable, the project's goal is to host billions of rows of data for rapid access. MapReduce can use HBase as both a source and a destination for its computations, and Hive and Pig can be used in combination with HBase.
HBase는 HDFS의 위에서 동작하는 컬럼 기반 데이터베이스입니다. Google의 BigTable이 설계된 후, 프로젝트의 목표는 매우 많은 데이터를 빠른 속도로 접근하는 것이 되었습니다. MapReduce는 HBase를 MapReduce 연산을 시작에서부터 끝까지 사용할 수 있습니다. 그리고, Hive와 Pig는 HBase와 조합하여 사용되어질 수 있습니다.

 

In order to grant random access to the data, HBase does impose a few restrictions: Hive performance with HBase is 4-5 times slower than with plain HDFS, and the maximum amount of data you can store in HBase is approximately a petabyte, versus HDFS' limit of over 30PB.
데이터에 대한 랜덤 엑세스를 허용하기 위하여, HBase는 몇가지 제약을 가합니다. HBase와 Hive를 같이 사용하는 경우의 퍼포먼스는 일반 HDFS에 비하여 4-5배 느리고, HBase에 저장할 수 있는 최대 데이터는 대략 1 페타바이트 정도 되는 반면, HDFS의 최대 용량은 30페타 바이트입니다.

 

HBase is ill-suited to ad-hoc analytics and more appropriate for integrating big data as part of a larger application. Use cases include logging, counting and storing time-series data.
HBase는 ad-hoc 분석에 적합하지 않고, 큰 어플리케이션의 파트로서 빅 데이터를 통합하는데에 더 적합합니다. 주된 유스케이스로는 로깅이나 카운팅, 시간순 데이터를 저장하는 것이 있겠습니다.

 

 

 

The Hadoop Bestiary


Hadoop의 조각들


Ambari Deployment, configuration and monitoring
Ambari : 디플로이, 환경설정, 모니터링

Flume Collection and import of log and event data
Flume : 수집 및 로그/이벤트 데이터 임포트

HBase Column-oriented database scaling to billions of rows
HBase : 수 억만 로우의 데이터를 스케일링 할 수 있는 컬럼 기반 데이터베이스

HCatalog Schema and data type sharing over Pig, Hive and MapReduce
HCatalog : Pig와 Hive, MapReduce간의 스키마와 데이터 타입을 공유하게 하는 도구

HDFS Distributed redundant file system for Hadoop
HDFS : Hadoop을 위한 분산 복제 파일 시스템

Hive Data warehouse with SQL-like access
Hive : SQL 스타일로 접근할 수 있는 데이터 웨어하우스

Mahout Library of machine learning and data mining algorithms
Mahout : 머신러닝과 데이터 마이닝 알고리즘 라이브러리

MapReduce Parallel computation on server clusters
MapReduce : 서버 클러스터 기반의 병렬 컴퓨팅을 위한 솔루션

Pig High-level programming language for Hadoop computations
Pig : Hadoop 컴퓨팅을 위한 고수준 프로그래밍 언어

Oozie Orchestration and workflow management
Oozie : 오케스트레이션 및 워크플로우 관리

Sqoop Imports data from relational databases
Sqoop : 관계형 데이터베이스에서 데이터를 임포트하기 위한 솔루션

Whirr Cloud-agnostic deployment of clusters
Whirr : 클러스터들의 클라우드 불가지론 배포

Zookeeper Configuration management and coordination
Zookeeper : 환경설정 관리 및 코디네이션을 위한 솔루션

 

 

 

Getting data in and out


데이터를 집어넣고 가져오기


Improved interoperability with the rest of the data world is provided by Sqoop and Flume. Sqoop is a tool designed to import data from relational databases into Hadoop, either directly into HDFS or into Hive. Flume is designed to import streaming flows of log data directly into HDFS.
Sqoop와 Flume을 통해 수많은 데이터들간의 상호 운용성을 획득할 수 있습니다. Sqoop은 관계형 데이터베이스들의 데이터를 Hadoop으로 가져오기 위해 고안된 도구이고, HDFS나 Hive로 직접 가져오게 할 수도 있습니다. Flume은 HDFS로 직접 로그 데이터들을 스트리밍할 수 있게 고안된 도구입니다.

 

Hive's SQL friendliness means that it can be used as a point of integration with the vast universe of database tools capable of making connections via JBDC or ODBC database drivers.
Hive의 유사 SQL은 Hive가 다양한 데이터베이스 도구들의 통합에 사용될 수 있고, JDBC나 ODBC 데이터베이스 드라이버를 통해 커넥션을 만들 수 있음을 의미합니다.

 

 

 

Coordination and workflow: Zookeeper and Oozie


협동과 작업흐름 : Zookeeper와 Oozie


With a growing family of services running as part of a Hadoop cluster, there's a need for coordination and naming services. As computing nodes can come and go, members of the cluster need to synchronize with each other, know where to access services, and know how they should be configured. This is the purpose ofZookeeper.
Hadoop 클러스터의 부분으로서 실행중인 서비스들이 많아지면, 코디네이션과 네이밍 서비스가 필요해질 것입니다. 컴퓨팅 노드가 들어오고 나가면서, 클러스터의 멤버들간에 동기화가 이루어질 필요가 생길 것이고, 어느 서비스로 접근해야 할 것인지 알아야 할 것이며, 어떻게 조정하게 될 것인지에 대해서도 알아야 할 것입니다. 이것이 Zookeeper의 임무입니다.

 

Production systems utilizing Hadoop can often contain complex pipelines of transformations, each with dependencies on each other. For example, the arrival of a new batch of data will trigger an import, which must then trigger recalculations in dependent datasets. TheOozie component provides features to manage the workflow and dependencies, removing the need for developers to code custom solutions.
Hadoop을 설정하는 생산 시스템은 종종 상호간에 의존성을 갖는 복잡한 변환 처리들을 위한 파이라인을 포함합니다. 이를테면 새로운 데이터 배치 작업은 데이터 임포트를 실행하게 하고, 임포트 작업은 의존되는 데이터셋을 다시 연산해야 하는 식으로 말입니다. Oozie 컴포넌트는 워크플로우와 의존성을 관리하는 기능을 제공하고, 개발자로 하여금 커스텀 솔루션 코드를 수정해야하는 필요를 줄여줍니다.

 

 

 

Management and deployment: Ambari and Whirr


관리와 배포 : Ambari 와 Whirr


One of the commonly added features incorporated into Hadoop by distributors such as IBM and Microsoft is monitoring and administration. Though in an early stage, Ambari aims to add these features to the core Hadoop project. Ambari is intended to help system administrators deploy and configure Hadoop, upgrade clusters, and monitor services. Through an API, it may be integrated with other system management tools.
IBM과 Microsoft 같은 기업들이 추가한 기능들은 보통 모니터링이나 관리 도구입니다. 초기에는 Ambari는 이러한 특징들을 Hadoop의 핵심 프로젝트로 포함하는데에 집중했었습니다. Ambari는 Hadoop을 설정하고, 배포하고, 클러스터를 업그레이드하거나, 모니터 서비스를 제공하여 시스템 관리자에게 도움이 될 수 있는 시스템으로 만드는 것을 목표로 하였습니다. 이것들은 API를 통해서 다른 시스템 관리 도구들과 합쳐질 수 있을 것입니다.

 

Though not strictly part of Hadoop, Whirr is a highly complementary component. It offers a way of running services, including Hadoop, on cloud platforms. Whirr is cloud neutral and currently supports the Amazon EC2 and Rackspace services.
비록 Hadoop의 어느 파트로 정해진 것은 아니지만, Whirr은 매우 상호 보완적인 컴포넌트입니다. Whirr은 클라우드 시스템에서 Hadoop을 포함하여 서비스들을 실행하는 방법을 제공합니다. Whirr은 클라우드에 특화되어 있고, 현재 Amazon EC2와 Rackspace 서비스를 지원하고 있습니다.

 

 

 

Machine learning: Mahout


기계 학습 : Mahout


Every organization's data are diverse and particular to their needs. However, there is much less diversity in the kinds of analyses performed on that data. The Mahout project is a library of Hadoop implementations of common analytical computations. Use cases include user collaborative filtering, user recommendations, clustering and classification.
모든 조직의 데이터는 다양하고 그들만의 수요에 특화되어 있습니다. 그러나 데이터를 분석하는데에 있어서는 그다지 다양한 종류의 데이터가 필요하지는 않습니다. Mahout 프로젝트는 일반적인 분석적 컴퓨팅에 관한 Hadoop의 구현체입니다. 주된 유스케이스는 사용자간의 필터링이나 사용자 추천, 클러스터링, 분류 등이 있습니다.

 

 

 

Using Hadoop


Hadoop의 사용


Normally, you will use Hadoop in the form of a distribution. Much as with Linux before it, vendors integrate and test the components of the Apache Hadoop ecosystem and add in tools and administrative features of their own.
일반적으로 여러분들을 Hadoop을 분산된 형태로 사용하고자 할 것입니다. Linux가 그러했던 것처럼, 수많은 벤더들이 Apache Hadoop 생태계의 컴포넌트들을 통합하고 테스트할 것입니다. 그리고 그들 나름대로의 도구나 관리 정책을 만들어낼 것입니다.

 

Though not per se a distribution, a managed cloud installation of Hadoop's MapReduce is also available through Amazon's Elastic MapReduce service.
비록 Hadoop이 하나의 정형화된 배포판으로 제공되어지고 있지 않지만, 클라우드로 관리되는 설치 방법으로는 Hadoop의 MapReduce는 Amazon의 Elastic MapReduce 서비스를 통해 제공되어지고 있습니다.