|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nhncorp.neptune.client.NTable
public class NTable
테이블의 데이터를 관리하기 위해 클라이언트에서 사용되는 메인 클래스
하나의 NTable 객체는 하나의 테이블에 대한 처리만 수행한다.
NTable 객체는 Thread safe를 보장하지 않는다. 따라서 동시에 여러 테이블
또는 여러개의 rowKey에 대해 트렌젝션을 수행할 경우 별도의 NTable 객체를 이용해야 한다.
| Field Summary |
|---|
| Method Summary | |
|---|---|
void |
addColumn(java.lang.String addedColumnName)
테이블에 컬럼을 추가한다. |
TabletInfo |
addTablet(Row.Key endRowKey)
테이블에 새로운 Tablet을 추가한다 |
void |
clear()
|
static void |
createTable(NConfiguration conf,
TableSchema tableSchema)
테이블을 생성한다. |
static void |
createTable(NConfiguration conf,
TableSchema tableSchema,
Row.Key[] endRowKeys)
NTable에 설정된 TableInfo를 이용하여 테이블을 생성한다. |
TableSchema |
descTable()
테이블의 상세 정보를 조회한다. |
void |
dropTable()
테이블을 drop한다. |
static void |
dropTable(NConfiguration conf,
java.lang.String tableName)
테이블을 drop 한다. |
static boolean |
existsTable(NConfiguration conf,
java.lang.String tableName)
테이블이 존재하는지 여부를 확인한다. |
boolean |
get(java.util.Collection<Row.Key> rowKeys,
java.util.List<CellFilter> cellFilters,
AsyncDataReceiver dataReceiver,
int numOfThread,
int timeout)
async하게 데이터를 조회할 경우 사용한다. |
boolean |
get(java.util.Collection<Row.Key> rowKeys,
java.lang.String[] columnNames,
AsyncDataReceiver dataReceiver,
int numOfThread,
int timeout)
async하게 데이터를 조회할 경우 사용한다. |
Row |
get(Row.Key rowKey)
row에 있는 모든 컬럼, 컬럼내의 모든 데이터를 조회한다. |
Row |
get(Row.Key rowKey,
java.lang.String columnName)
데이터를 조회한다. |
Row |
get(Row.Key rowKey,
java.lang.String[] columnNames)
데이터를 조회한다. |
byte[] |
get(Row.Key rowKey,
java.lang.String columnName,
Cell.Key cellKey)
데이터를 조회한다. |
Row |
get(RowFilter rowFilter)
Filter 조건에 맞는 데이터를 조회한다.여러 row에 걸친 작업은 수행하지 않는다. |
java.lang.String[] |
getColumnsArray()
테이블의 컬럼 목록을 반환한다. |
NConfiguration |
getConf()
Neptune configuration 객체를 반환한다. |
Row.Key[] |
getSplitedRowKeyRanges(TabletInfo tabletInfo,
int splitPerTablet)
|
java.lang.String |
getTableName()
현재 오픈되어 있는 테이블명을 반환한다. |
TableSchema |
getTableSchema()
|
java.lang.String[] |
getTabletAllActions(TabletInfo tabletInfo)
Tablet에 현재 수행중인 작업을 조회한다. |
TabletInfo |
getTabletInfo(java.lang.String tabletName)
|
TabletReport |
getTabletReport(TabletInfo tabletInfo)
Tablet의 현재 상황을 모니터링한다. |
boolean |
hasValue(java.lang.String columnName,
Row.Key rowKey)
특정 rowkey의 값이 존재하는지 여부를 조회한다. |
TabletInfo[] |
listTabletInfos()
특정 테이블의 Tablet 목록을 가져온다. |
static TabletInfo |
lookupTargetTablet(NConfiguration conf,
java.lang.String tableName,
Row.Key rowKey)
특정 Row를 서비스하는 Tablet을 찾는다. |
TabletInfo |
lookupTargetTablet(Row.Key rowKey)
BatchUpload를 종료한다. |
static void |
main(java.lang.String[] args)
|
DirectUploader |
openDirectUploader(java.lang.String[] columnNames)
대량의 데이터를 업로딩하는 BatchUploader를 오픈한다. |
static NTable |
openTable(NConfiguration conf,
java.lang.String tableName)
NTable 객체를 가져온다. |
static NTable |
openTable(NConfiguration conf,
TableSchema tableSchema,
boolean create)
NTable 객체를 가져온다. |
void |
put(Row row)
테이블에 데이터를 저장한다. |
void |
put(Row row,
boolean systemTimestamp)
|
void |
remove(Row.Key rowKey,
java.lang.String columnName,
Cell.Key cellKey)
특정 cellKey에 해당하는 값을 삭제한다. |
void |
removeRow(Row.Key rowKey,
long timestamp)
row의 모든 컬럼 데이터를 삭제한다. |
void |
truncateColumn(java.lang.String columnName)
테이블의 특정 컬럼의 모든 데이터를 삭제한다. |
void |
truncateTable()
테이블의 모든 데이터를 삭제한다. |
void |
truncateTable(boolean clearPartitionInfo)
테이블의 모든 데이터를 삭제한다. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static NTable openTable(NConfiguration conf,
java.lang.String tableName)
throws java.io.IOException
conf - tableName -
java.io.IOException
public static NTable openTable(NConfiguration conf,
TableSchema tableSchema,
boolean create)
throws java.io.IOException
conf - tableSchema - create - table이 존재하지 않는 경우 생성한다.
java.io.IOException
public static boolean existsTable(NConfiguration conf,
java.lang.String tableName)
throws java.io.IOException
conf - tableName -
java.io.IOException
public void put(Row row)
throws java.io.IOException
row -
java.io.IOException
public void put(Row row,
boolean systemTimestamp)
throws java.io.IOException
java.io.IOException
public void removeRow(Row.Key rowKey,
long timestamp)
throws java.io.IOException
timestamp - 삭제처리를 수행하는 timestamp. 동시에 여러 row를 삭제하는 경우 하나의 timestamp내에 여러 건을 처리할 수 있기 때문에 사용자가 지정할 수 있도록 하였음
java.io.IOException
public void remove(Row.Key rowKey,
java.lang.String columnName,
Cell.Key cellKey)
throws java.io.IOException
rowKey - columnName - cellKey -
java.io.IOException
public boolean hasValue(java.lang.String columnName,
Row.Key rowKey)
throws java.io.IOException
columnName - rowKey -
java.io.IOException
java.io.IOException
public byte[] get(Row.Key rowKey,
java.lang.String columnName,
Cell.Key cellKey)
throws java.io.IOException
rowKey - columnName - cellKey -
java.io.IOException
public Row get(Row.Key rowKey)
throws java.io.IOException
rowKey -
java.io.IOException
java.io.IOException
public Row get(Row.Key rowKey,
java.lang.String[] columnNames)
throws java.io.IOException
rowKey - columnNames -
java.io.IOException
java.io.IOException
public boolean get(java.util.Collection<Row.Key> rowKeys,
java.util.List<CellFilter> cellFilters,
AsyncDataReceiver dataReceiver,
int numOfThread,
int timeout)
throws java.io.IOException
rowKeys - cellFilters - dataReceiver - numOfThread - timeout -
java.io.IOException
public boolean get(java.util.Collection<Row.Key> rowKeys,
java.lang.String[] columnNames,
AsyncDataReceiver dataReceiver,
int numOfThread,
int timeout)
throws java.io.IOException
rowKeys - columnNames - dataReceiver - timeout -
java.io.IOException
public Row get(Row.Key rowKey,
java.lang.String columnName)
throws java.io.IOException
rowKey - columnName -
java.io.IOException
public Row get(RowFilter rowFilter)
throws java.io.IOException
rowFilter -
java.io.IOException
public static void createTable(NConfiguration conf,
TableSchema tableSchema)
throws java.io.IOException
conf - tableSchema -
java.io.IOException
public static void createTable(NConfiguration conf,
TableSchema tableSchema,
Row.Key[] endRowKeys)
throws java.io.IOException
endRowKeys -
java.io.IOException
public static void dropTable(NConfiguration conf,
java.lang.String tableName)
throws java.io.IOException
conf - tableName -
java.io.IOException
public void dropTable()
throws java.io.IOException
java.io.IOException
public void truncateTable(boolean clearPartitionInfo)
throws java.io.IOException
clearPartitionInfo - 테이블 파티션 정보까지 삭제한다.
java.io.IOException
public void truncateTable()
throws java.io.IOException
java.io.IOException
public void truncateColumn(java.lang.String columnName)
throws java.io.IOException
columnName -
java.io.IOException
public TableSchema descTable()
throws java.io.IOException
java.io.IOException
public void addColumn(java.lang.String addedColumnName)
throws java.io.IOException
addedColumnName -
java.io.IOException
public TabletInfo addTablet(Row.Key endRowKey)
throws java.io.IOException
tableName - endRowKey -
java.io.IOException
public TabletInfo[] listTabletInfos()
throws java.io.IOException
java.io.IOException
public DirectUploader openDirectUploader(java.lang.String[] columnNames)
throws java.io.IOException
columnNames -
java.io.IOException
public java.lang.String[] getTabletAllActions(TabletInfo tabletInfo)
throws java.io.IOException
tabletInfo -
java.io.IOException
public TabletReport getTabletReport(TabletInfo tabletInfo)
throws java.io.IOException
tabletInfo -
java.io.IOException
public TabletInfo lookupTargetTablet(Row.Key rowKey)
throws java.io.IOException
tabletInfo - columnNames - mapFileIds - mapFilePaths -
java.io.IOException
public static TabletInfo lookupTargetTablet(NConfiguration conf,
java.lang.String tableName,
Row.Key rowKey)
throws java.io.IOException
hashRow.Key -
java.io.IOExceptionpublic java.lang.String getTableName()
public NConfiguration getConf()
public java.lang.String[] getColumnsArray()
throws java.io.IOException
java.io.IOExceptionpublic void clear()
public TabletInfo getTabletInfo(java.lang.String tabletName)
throws java.io.IOException
java.io.IOExceptionpublic TableSchema getTableSchema()
public Row.Key[] getSplitedRowKeyRanges(TabletInfo tabletInfo,
int splitPerTablet)
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||