com.nhncorp.neptune.client.scanner
Class MergeScanner

java.lang.Object
  extended by com.nhncorp.neptune.client.scanner.MergeScanner

public class MergeScanner
extends java.lang.Object

여러개의 Scanner에 있는 데이터를 merge하면서 scan한다. 두개의 테이블에 대해 Join 처리를 하는 경우 활용할 수 있다. 두개의 scanner에서 각각의 데이터를 가져와 rowkey를 비교하여 동일한 rowkey가 있는 Row를 모아서 한번의 next() 호출에 전달한다. 전달된 Scanner 목록에서 rowkey가 존재하지 않는 경우에는 null 값이 반환된다. (Outer join)

Author:
nhn

Nested Class Summary
static class MergeScanner.RowArray
           
 
Constructor Summary
MergeScanner(TableScanner[] scannerArray)
           
 
Method Summary
 void close()
           
 MergeScanner.RowArray nextRow()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeScanner

public MergeScanner(TableScanner[] scannerArray)
             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

nextRow

public MergeScanner.RowArray nextRow()
                              throws java.io.IOException
Throws:
java.io.IOException