Class BulkImport
- java.lang.Object
-
- org.apache.accumulo.master.tableOps.MasterRepo
-
- org.apache.accumulo.master.tableOps.bulkVer1.BulkImport
-
- All Implemented Interfaces:
Serializable,ReadOnlyRepo<Master>,Repo<Master>
public class BulkImport extends MasterRepo
Bulk import makes requests of tablet servers, and those requests can take a long time. Our communications to the tablet server may fail, so we won't know the status of the request. The master will repeat failed requests so now there are multiple requests to the tablet server. The tablet server will not execute the request multiple times, so long as the marker it wrote in the metadata table stays there. The master needs to know when all requests have finished so it can remove the markers. Did it start? Did it finish? We can see that *a* request completed by seeing the flag written into the metadata table, but we won't know if some other rogue thread is still waiting to start a thread and repeat the operation. The master can ask the tablet server if it has any requests still running. Except the tablet server might have some thread about to start a request, but before it has made any bookkeeping about the request. To prevent problems like this, an Arbitrator is used. Before starting any new request, the tablet server checks the Arbitrator to see if the request is still valid.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringFAILURES_TXT
-
Constructor Summary
Constructors Constructor Description BulkImport(TableId tableId, String sourceDir, String errorDir, boolean setTime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Repo<Master>call(long tid, Master master)longisReady(long tid, Master master)static StringprepareBulkImport(ServerContext master, VolumeManager fs, String dir, TableId tableId, long tid)voidundo(long tid, Master environment)-
Methods inherited from class org.apache.accumulo.master.tableOps.MasterRepo
getDescription, getReturn
-
-
-
-
Field Detail
-
FAILURES_TXT
public static final String FAILURES_TXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
isReady
public long isReady(long tid, Master master) throws Exception- Specified by:
isReadyin interfaceReadOnlyRepo<Master>- Overrides:
isReadyin classMasterRepo- Throws:
Exception
-
prepareBulkImport
public static String prepareBulkImport(ServerContext master, VolumeManager fs, String dir, TableId tableId, long tid) throws Exception
- Throws:
Exception
-
-