Restore columnId without getting it first
This commit is contained in:
parent
bb9e9ad33c
commit
9729704bb9
@ -63,15 +63,7 @@ public class Migrate {
|
|||||||
System.out.println("parsed documents");
|
System.out.println("parsed documents");
|
||||||
var protocol = new TBinaryProtocol(transport);
|
var protocol = new TBinaryProtocol(transport);
|
||||||
var client = new RocksDB.Client(protocol);
|
var client = new RocksDB.Client(protocol);
|
||||||
long columnId;
|
long columnId = client.createColumn(columnName, columnSchema);
|
||||||
|
|
||||||
long tmpColumnId;
|
|
||||||
try {
|
|
||||||
tmpColumnId = client.getColumnId(columnName);
|
|
||||||
} catch (TApplicationException ex) {
|
|
||||||
tmpColumnId = client.createColumn(columnName, columnSchema);
|
|
||||||
}
|
|
||||||
columnId = tmpColumnId;
|
|
||||||
var encoder = new BasicBSONEncoder();
|
var encoder = new BasicBSONEncoder();
|
||||||
long nn = 0;
|
long nn = 0;
|
||||||
long total = documentMap.size();
|
long total = documentMap.size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user