What do you want?81 Hadoop 개념 - Namenode/Datanode 이전 포스팅에서 언급했던 HDFS에 대한 개념에 연장선인 Namenode와 Datanode에 대해서 알아보려 한다.간단하게 정리하면 Namenode는 master역활로서 hdfs에 있는 데이터 datanode에 분산시키고 관리하는 기능을 담당한다. 즉, slaves에 해당하는 datanode에게 I/O를 담당하고 datanode의 이상유무를 체크하는 일을 처리하는 역할이다.Datanode는 자신에게 할당된 데이터 블록을 처리하는 역할을 한다. NameNodeHDFS에서의 master인 NameNode는 분산환경에서 저장기능을 담당한다. 즉, 실제 작업의 대상이 되는 파일을 블록(block)단위로 나누어서 slave node들에게 분배할 뿐만 아니라 전체적인 (분산) 파일시스템의 이상 유무도 체크하고 sl.. 2014. 11. 23. Hadoop 개념 - HDFS(Hadoop Distributed File System) 학부생에 있을때 3학년부터 4학년까지 분산처리 관련 프로젝트를 진행하며, Hadoop을 기술적으로 이용만 했을 뿐, 필요한 부분 이외에는 그 속에 남긴 의미를 이해하려하지 않았다. 하지만 2011년 Hadoop을 처음 접했을 때와 지금은 많은 부분이 달라졌다. 클라우데라(Cloudera)와 같이 CDH(Cloudera's Destributed in Apache Hadoop) 배포판으로 쉽게 하둡을 설치하고 사용 할 수 있으며, Hadoop Eco System에 포함된 전반적인 솔루션을 쉽게 설치해 사용 할 수 있다는 점이다. 서론은 여기까지 하고, 하둡에 대해 이야기 해보자. (1) HDFS (Hadoop Distributed File System)① HDFS 설계원칙데이터를 많은 사용자가 네트워크 환경.. 2014. 11. 23. 반복되지 않는 첫 번째 문자 찾기 Q. 문자열에서 처음으로 반복되지 않는ㄴ 문자를 찾아내는 효율적인 함수를 작성하라. 예를 들어 "total"에서 처음으로 등장하는 반복되지 않는 문자는 'o'이며, "teeter"에서 처음으로 등장하는 반복되지 않는 문자는 'r'이다. 자신이 작성한 알고리즘의 효율에 대해 논하라. A.1) 가장 쉬운 방법은 특정 문자를 그 문자열에 있는 다른 모든 문자와 비교하여 그 문자가 반복되는지 아는 방법이다. 하지만 이같은 풀이는 실행시간이 오래걸린다. 문자열 길이가 n이라면 최악의 경우 n개의 문자들을 모두 n번씩 비교해야 한다.(마치 버블 정렬같이) 즉, 시간복잡도 O(n^2)을 가진다. 그렇다면 더 효과적으로 해결할 수 있는 방법은 없을까? 2) 이 문제는 데이터에 대한 효율적인 검색을 할 수 있는지 유도하.. 2014. 11. 18. Codility - ArrayInversionCount https://codility.com/demo/results/demoBD476U-K6K/ Task descriptionA zero-indexed array A consisting of N integers is given. An inversionis a pair of indexes (P, Q) such that P < Q and A[Q] < A[P].Write a function:class Solution { public int solution(int[] A); }that computes the number of inversions in A, or returns −1 if it exceeds 1,000,000,000.Assume that:N is an integer within the range [0..1.. 2014. 10. 26. Codility - Equi Leader https://codility.com/demo/results/demoV3FC6D-GGH/ Task descriptionA non-empty zero-indexed array A consisting of N integers is given.The leader of this array is the value that occurs in more than half of the elements of A.An equi leader is an index S such that 0 ≤ S < N − 1 and two sequences A[0], A[1], ..., A[S] and A[S + 1], A[S + 2], ..., A[N − 1] have leaders of the same value.For example, g.. 2014. 10. 26. Codility - Domains https://codility.com/demo/results/demoHKWW2G-8TM/Task descriptionA zero-indexed array A consisting of N integers is given. Thedominator of array A is the value that occurs in more than half of the elements of A.For example, consider array A such thatA[0] = 3 A[1] = 4 A[2] = 3 A[3] = 2 A[4] = 3 A[5] = -1 A[6] = 3 A[7] = 3The dominator of A is 3 because it occurs in 5 out of 8 elements of A (namel.. 2014. 10. 26. 이전 1 ··· 7 8 9 10 11 12 13 14 다음