Class BulkSerialize
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.bulk.BulkSerialize
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BulkSerialize.Input
static interface
BulkSerialize.Output
-
Constructor Summary
Constructors Constructor Description BulkSerialize()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LoadMappingIterator
getUpdatedLoadMapping(String bulkDir, TableId tableId, BulkSerialize.Input input)
Read in both maps and change all the file names in the mapping to the new names.static LoadMappingIterator
readLoadMapping(String bulkDir, TableId tableId, BulkSerialize.Input input)
Read Json array of Bulk.Mapping into LoadMappingIteratorstatic Map<String,String>
readRenameMap(String bulkDir, BulkSerialize.Input input)
Reads the serialized rename file.static void
writeLoadMapping(SortedMap<KeyExtent,Bulk.Files> loadMapping, String sourceDir, BulkSerialize.Output output)
Serialize bulk load mapping to "loadmap.json"static void
writeRenameMap(Map<String,String> oldToNewNameMap, String bulkDir, BulkSerialize.Output output)
Writes rename file to JSON.
-
-
-
Method Detail
-
writeLoadMapping
public static void writeLoadMapping(SortedMap<KeyExtent,Bulk.Files> loadMapping, String sourceDir, BulkSerialize.Output output) throws IOException
Serialize bulk load mapping to "loadmap.json"- Throws:
IOException
-
readLoadMapping
public static LoadMappingIterator readLoadMapping(String bulkDir, TableId tableId, BulkSerialize.Input input) throws IOException
Read Json array of Bulk.Mapping into LoadMappingIterator- Throws:
IOException
-
writeRenameMap
public static void writeRenameMap(Map<String,String> oldToNewNameMap, String bulkDir, BulkSerialize.Output output) throws IOException
Writes rename file to JSON. This file maps all the old names to the new names for the BulkImportMove FATE operation.- Throws:
IOException
-
readRenameMap
public static Map<String,String> readRenameMap(String bulkDir, BulkSerialize.Input input) throws IOException
Reads the serialized rename file. This file maps all the old names to the new names for the BulkImportMove FATE operation.- Throws:
IOException
-
getUpdatedLoadMapping
public static LoadMappingIterator getUpdatedLoadMapping(String bulkDir, TableId tableId, BulkSerialize.Input input) throws IOException
Read in both maps and change all the file names in the mapping to the new names. This is needed because the load mapping file was written with the original file names before they were moved by BulkImportMove- Throws:
IOException
-
-