Class S3Provider
- java.lang.Object
-
- com.ibm.fhir.bulkdata.provider.impl.S3Provider
-
-
Constructor Summary
Constructors Constructor Description S3Provider(String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcreateSource()creates the base output location for the type.booleanexists()checks to see if the bucket exists.com.ibm.cloud.objectstorage.services.s3.AmazonS3getClient()com.ibm.cloud.objectstorage.services.s3.model.ListObjectsV2ResultgetListObject(String continuationToken)get the list of objects based on the continuation token.longgetNumberOfLoaded()longgetNumberOfParseFailures()SparkParquetWritergetParquetWriter()List<Resource>getResources()gets the read resources.longgetSize(String workItem)gets the size of the given work item.voidlistBuckets()lists the buckets when loggingvoidpushOperationOutcomes()Pushes the Operation OutcomesvoidreadResources(long numOfLinesToSkip, String workItem)reads from a given workitem (or file) in a source and skips a certain noumber of linesvoidregisterTransient(long executionId, ExportTransientUserData transientUserData, String cosBucketPathPrefix, String fhirResourceType, boolean isExportPublic)voidregisterTransient(ImportTransientUserData transientUserData)voidwriteResources(String mediaType, List<ReadResultDTO> dtos)wraps the complexity of writing FHIR Resources out to a target
-
-
-
Constructor Detail
-
S3Provider
public S3Provider(String source) throws FHIRException
- Throws:
FHIRException
-
-
Method Detail
-
exists
public boolean exists()
checks to see if the bucket exists.- Returns:
-
listBuckets
public void listBuckets()
lists the buckets when logging
-
getListObject
public com.ibm.cloud.objectstorage.services.s3.model.ListObjectsV2Result getListObject(String continuationToken) throws FHIRException
get the list of objects based on the continuation token.- Parameters:
continuationToken- null or string indicating a continuation token.- Returns:
- Throws:
FHIRException
-
getSize
public long getSize(String workItem) throws FHIRException
Description copied from interface:Providergets the size of the given work item.- Specified by:
getSizein interfaceProvider- Returns:
- Throws:
FHIRException
-
getResources
public List<Resource> getResources() throws FHIRException
Description copied from interface:Providergets the read resources.- Specified by:
getResourcesin interfaceProvider- Returns:
- Throws:
FHIRException
-
getNumberOfParseFailures
public long getNumberOfParseFailures() throws FHIRException- Specified by:
getNumberOfParseFailuresin interfaceProvider- Throws:
FHIRException
-
registerTransient
public void registerTransient(ImportTransientUserData transientUserData)
- Specified by:
registerTransientin interfaceProvider
-
getNumberOfLoaded
public long getNumberOfLoaded() throws FHIRException- Specified by:
getNumberOfLoadedin interfaceProvider- Throws:
FHIRException
-
readResources
public void readResources(long numOfLinesToSkip, String workItem) throws FHIRExceptionDescription copied from interface:Providerreads from a given workitem (or file) in a source and skips a certain noumber of lines- Specified by:
readResourcesin interfaceProvider- Throws:
FHIRException
-
pushOperationOutcomes
public void pushOperationOutcomes() throws FHIRExceptionDescription copied from interface:ProviderPushes the Operation Outcomes- Specified by:
pushOperationOutcomesin interfaceProvider- Throws:
FHIRException
-
createSource
public void createSource() throws FHIRExceptionDescription copied from interface:Providercreates the base output location for the type.- Specified by:
createSourcein interfaceProvider- Throws:
FHIRException
-
getClient
public com.ibm.cloud.objectstorage.services.s3.AmazonS3 getClient()
-
getParquetWriter
public SparkParquetWriter getParquetWriter()
-
close
public void close() throws Exception
-
writeResources
public void writeResources(String mediaType, List<ReadResultDTO> dtos) throws Exception
Description copied from interface:Providerwraps the complexity of writing FHIR Resources out to a target- Specified by:
writeResourcesin interfaceProvider- Throws:
Exception
-
registerTransient
public void registerTransient(long executionId, ExportTransientUserData transientUserData, String cosBucketPathPrefix, String fhirResourceType, boolean isExportPublic) throws Exception- Specified by:
registerTransientin interfaceProvider- Throws:
Exception
-
-