Package org.cdlib.mrt.tools.loader
Class BatchLoader
java.lang.Object
org.cdlib.mrt.utility.ListProcessorBase
org.cdlib.mrt.utility.ListProcessorSimple
org.cdlib.mrt.tools.loader.BatchLoader
- All Implemented Interfaces:
ListProcessor
Run a Storage load test
- Author:
- dloy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected URLstatic booleanprotected Fileprotected Vector<LoaderInfo> protected URLstatic final Stringprotected Stringprotected Stringprotected Fileprotected URLprotected Fileprotected URLprotected Fileprotected Stringstatic booleanFields inherited from class org.cdlib.mrt.utility.ListProcessorSimple
m_clientPropertiesFields inherited from class org.cdlib.mrt.utility.ListProcessorBase
logger, m_framework, m_status, PROCESSCNT, PROCESSTIME, TOTALBYTES, TOTALTIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdumpStatus(String header, Properties statusProp) voidend()Process on EnrichmentList itemprotected Propertiesprotected PropertiesgetIngestStatus(org.apache.http.HttpResponse response) getName()Name of EnrichmentListprotected voidinitialize(TFrame fw) protected voidprotected voidstatic voidMain methodvoidprocess(String line, Properties processProp) Process an incoming line which contains 1) ark 2) sequence number Use the ark for issuing an addVersion to a storage serviceprotected PropertiessendIngest(URL ingestURL, String profile, File manifestFile) Send constructed request to ingestprotected org.apache.http.HttpResponseSend ingest requestMethods inherited from class org.cdlib.mrt.utility.ListProcessorSimple
getClientProperties, getIntProp, processListMethods inherited from class org.cdlib.mrt.utility.ListProcessorBase
getFileProperties, log, requiredProp
-
Field Details
-
NAME
-
MESSAGE
-
LS
-
DEBUG
public static boolean DEBUG -
SENDINGEST
public static boolean SENDINGEST -
checksumType
-
processList
-
extractBaseDirectory
-
outputManifestDirectoryBase
-
outputManifestBaseURL
-
componentURLBase
-
outputManifestURL
-
outputBatchFile
-
extractDirectories
-
profile
-
ingestBase
-
-
Constructor Details
-
BatchLoader
- Throws:
TException
-
-
Method Details
-
main
Main method -
initialize
- Overrides:
initializein classListProcessorSimple- Throws:
TException
-
initializeBatchLoader
- Throws:
TException
-
getName
Name of EnrichmentList- Specified by:
getNamein interfaceListProcessor- Overrides:
getNamein classListProcessorSimple- Returns:
- name to be applied for identifying process properties
-
process
Process an incoming line which contains 1) ark 2) sequence number Use the ark for issuing an addVersion to a storage service
- Specified by:
processin interfaceListProcessor- Overrides:
processin classListProcessorSimple- Parameters:
line- line containing ark and sequence numberprocessProp- runtime properties- Throws:
TException- process exception
-
log
-
end
Description copied from class:ListProcessorSimpleProcess on EnrichmentList item- Overrides:
endin classListProcessorSimple- Throws:
TException
-
sendIngest
Send constructed request to ingest- Parameters:
ingestURL- batch ingest serviceprofile- process profilemanifestInfo- batch manifest information- Returns:
- Feeder service state
- Throws:
TException- process exception
-
sendIngestMultipart
protected org.apache.http.HttpResponse sendIngestMultipart(String ingestID, URL url, File ingestPackage, String profileIn, String type) throws TException Send ingest request- Parameters:
ingestID-url- URL of ingest serviceingestPackage- batch fileprofileIn- ingest profiletype- type of ingest request- Returns:
- http client response
- Throws:
TException- process exceptions
-
getIngestStatus
- Throws:
TException
-
getDummyIngestStatus
- Throws:
TException
-
dumpStatus
-