|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nhncorp.neptune.client.DirectUploader
public class DirectUploader
DirectUploader is used to upload large data set.
DirectUploader uploads large data to FileSystem and adds file list to TabletServer.
DirectUploader uploader = null;
try {
uploader = ntable.openDirectUploader(new String[]{"Column1", "Column2"});
for(...) {
Row row = new Row(...);
row.addCell(...);
uploader.put(row);
}
uploader.close();
} catch (Exception e) {
if(uploader != null) {
uploader.rollback();
}
}
Table must be partitioned before using DirectUploader. And datas for a single DirectUploader must have similar rowkey range.
| Method Summary | |
|---|---|
void |
close()
Send data to DFS, and add data file to TabletServer. |
static void |
main(java.lang.String[] args)
|
void |
put(Row row)
Put data to DirectUploader |
void |
rollback()
Rollback uploaded datas. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void put(Row row)
throws java.io.IOException
rowKey - columnValues -
java.io.IOException
public void rollback()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||