빅데이터 하둡 프로그래밍 교육과정 ]Mapper 클래스의 메소드들
빅데이터 하둡 프로그래밍 교육과정 ]Mapper 클래스의 메소드들
실무개발자를위한 실무교육 전문교육센터학원
www.oraclejava.co.kr에 오시면 보다 다양한 강좌를 보실 수 있습니다.
Mapper 클래스의 메소드들
■ 앞서 본 map 메소드이외에도 다음 메소드들이 존재
- public void setup(Mapper.Context context)
* map 메소드에서 필요리소스를 여기서 할당
- public void cleanup(Mapper.Context context)
* setup에서 할당한 리소스를 해제.
- public void run(Mapper.Context context)
* 기본구현은 다음과 같다.
public void run(Context context) throws IOException, InterruptedException {
setup(context);
while (context.nextKeyValue()) {
map(context.getCurrentKey(), context.getCurrentValue(), context);
}
cleanup(context);
}
'빅데이터 > 빅데이터Hadoop' 카테고리의 다른 글
빅데이터 하둡 프로그래밍 교육과정 ]Mapper 출력타입 (0) | 2017.01.25 |
---|---|
빅데이터 하둡 프로그래밍 교육과정 ]Mapper 입력지정 (0) | 2017.01.25 |
빅데이터 하둡 프로그래밍 교육과정 ]실행&결과확인 (0) | 2017.01.25 |
빅데이터 하둡 프로그래밍 교육과정 ]컴파일 (0) | 2017.01.25 |
빅데이터 하둡 프로그래밍 교육과정 ]Reducer 클래스 (0) | 2017.01.23 |