Skip to content

Commit

Permalink
- Forkwrite ensure dict also for remote.
Browse files Browse the repository at this point in the history
- Create directories fix for S3 (only create last element, but needs less access writes).
- Test tuning.
  • Loading branch information
gmagnu committed Dec 25, 2024
1 parent c066fb5 commit 6ca408a
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.oracle.bmc.objectstorage.responses.HeadObjectResponse;
import com.oracle.bmc.objectstorage.responses.PutObjectResponse;
import org.gorpipe.base.streams.LimitedOutputStream;
import org.gorpipe.exceptions.GorException;
import org.gorpipe.exceptions.GorResourceException;
import org.gorpipe.exceptions.GorSystemException;
import org.gorpipe.gor.binsearch.GorIndexType;
Expand All @@ -25,13 +24,14 @@
import org.gorpipe.gor.driver.providers.stream.RequestRange;
import org.gorpipe.gor.driver.providers.stream.sources.StreamSource;
import org.gorpipe.gor.driver.providers.stream.sources.StreamSourceMetadata;
import org.gorpipe.gor.table.util.PathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.services.s3.model.NoSuchKeyException;

import java.io.*;
import java.net.MalformedURLException;
import java.util.concurrent.ExecutionException;
import java.nio.file.attribute.FileAttribute;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -140,11 +140,7 @@ private InputStream openRequest(GetObjectRequest request) {
Thread.currentThread().interrupt();
throw new GorSystemException(e);
} catch (Exception e) {
Throwable ex = e;
if (e instanceof ExecutionException || e instanceof UncheckedExecutionException) {
ex = e.getCause();
}
throw new GorResourceException("Failed to open S3 object: " + sourceReference.getUrl(), sourceReference.getUrl(), ex).retry();
throw new GorResourceException("Failed to open S3 object: " + sourceReference.getUrl(), sourceReference.getUrl(), e).retry();
}
}

Expand Down Expand Up @@ -180,23 +176,15 @@ private StreamSourceMetadata createMetaData(String bucket, String key) {
Thread.currentThread().interrupt();
throw new GorSystemException(e);
} catch (Exception e) {
Throwable ex = e;
if (e instanceof ExecutionException || e instanceof UncheckedExecutionException) {
ex = e.getCause();
}
throw new GorResourceException("Failed to load metadata for " + bucket + "/" + key, getName(), ex).retry();
throw new GorResourceException("Failed to load metadata for " + bucket + "/" + key, getName(), e).retry();
}
}

private StreamSourceMetadata loadMetadataFromCache(String bucket, String key) {
try {
return metadataCache.get(bucket + key, () -> createMetaData(bucket, key));
} catch (ExecutionException | UncheckedExecutionException e) {
var cause = e.getCause() != null ? e.getCause() : e;
if (cause instanceof GorException) {
throw (GorException) cause;
}
throw new GorResourceException("Failed to load metadata from cache for " + bucket + "/" + key, getName(), cause).retry();
} catch (Exception e) {
throw new GorResourceException("Failed to load metadata from cache for " + bucket + "/" + key, getName(), e).retry();

Check failure on line 187 in drivers/src/main/java/org/gorpipe/oci/driver/OCIObjectStorageSource.java

View workflow job for this annotation

GitHub Actions / Junit Tests - integrationTest

org.gorpipe.oci.driver.ITestOCIBvlTestSuite ► testGorz

Failed test found in: drivers/build/test-results/integrationTest/TEST-org.gorpipe.oci.driver.ITestOCIBvlTestSuite.xml Error: org.gorpipe.exceptions.GorResourceException: Failed to load metadata from cache for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
Raw output
org.gorpipe.exceptions.GorResourceException: Failed to load metadata from cache for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
Cause: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.237Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.238Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.237Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.297Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadataFromCache(OCIObjectStorageSource.java:187)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadata(OCIObjectStorageSource.java:154)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.fileExists(OCIObjectStorageSource.java:218)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.exists(OCIObjectStorageSource.java:212)
	at app//org.gorpipe.gor.driver.providers.stream.StreamSourceProvider.findIndexFileFromFileDriver(StreamSourceProvider.java:325)
	at app//org.gorpipe.gor.driver.providers.stream.StreamSourceProvider.createIterator(StreamSourceProvider.java:255)
	at app//org.gorpipe.gor.driver.PluggableGorDriver.createIterator(PluggableGorDriver.java:137)
	at app//org.gorpipe.gor.driver.PluggableGorDriver.createIterator(PluggableGorDriver.java:122)
	at app//org.gorpipe.gor.driver.utils.TestUtils.assertFullGor(TestUtils.java:81)
	at app//org.gorpipe.gor.driver.providers.stream.datatypes.BvlTestSuite.testGorz(BvlTestSuite.java:127)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at app//org.junit.contrib.java.lang.system.internal.LogPrintStream$1$1.evaluate(LogPrintStream.java:30)
	at app//org.junit.contrib.java.lang.system.internal.PrintStreamHandler$3.evaluate(PrintStreamHandler.java:48)
	at app//org.junit.contrib.java.lang.system.internal.LogPrintStream$1.evaluate(LogPrintStream.java:26)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at app//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at app//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at app//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at app//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at app//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:112)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:54)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:53)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy2/jdk.proxy2.$Proxy6.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:183)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.237Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.238Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2086)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
	at org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadataFromCache(OCIObjectStorageSource.java:185)
	... 58 more
Caused by: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/bvl_min_gor/derived/raw_bam_to_gor/BVL_INDEX_SLC52A2.bam.gorz.gori
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.237Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.352Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.createMetaData(OCIObjectStorageSource.java:179)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.lambda$loadMetadataFromCache$0(OCIObjectStorageSource.java:185)
	at app//com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903)
	at app//com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574)
	at app//com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)
	at app//com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2190)
	at app//com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
	... 61 more
Caused by: java.util.concurrent.ExecutionException: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.237Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.gorpipe.oci.driver.OCIObjectStorageSource.createMetaData(OCIObjectStorageSource.java:168)
	... 67 more
Caused by: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:V9MXt-JikVotVPPZ8fe-OgHqTkBiiL0OGoph7T5z48-GyyAM6ZdTUEFelu9DTnSC)
Timestamp: 2024-12-25T21:14:21.369Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fbvl_min_gor%2Fderived%2Fraw_bam_to_gor%2FBVL_INDEX_SLC52A2.bam.gorz.gori
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
	at app//com.oracle.bmc.http.internal.ResponseErrorBmcExceptionFactory.createRuntimeException(ResponseErrorBmcExceptionFactory.java:58)
	at app//com.oracle.bmc.http.internal.ResponseErrorBmcExceptionFactory.createRuntimeException(ResponseErrorBmcExceptionFactory.java:17)
	at app//com.oracle.bmc.http.internal.ClientCall.lambda$checkError$15(ClientCall.java:802)
	at [email protected]/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at [email protected]/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at [email protected]/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:144)
	at app//com.oracle.bmc.http.internal.ClientCall.thenCompose(ClientCall.java:1159)
	at app//com.oracle.bmc.http.internal.ClientCall.checkError(ClientCall.java:798)
	at app//com.oracle.bmc.http.internal.ClientCall.transformResponse(ClientCall.java:665)
	at [email protected]/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	at [email protected]/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at [email protected]/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at app//org.glassfish.jersey.client.JerseyInvocation$InvocationResponseCallback.completed(JerseyInvocation.java:1029)
	at app//org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:229)
	at app//org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62)
	at app//org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:173)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at app//org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
	at app//org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:173)
	at app//org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:278)
	at app//org.glassfish.jersey.client.ClientRuntime.lambda$null$6(ClientRuntime.java:182)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at app//org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
	at app//org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$7(ClientRuntime.java:156)
	at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at [email protected]/java.lang.Thread.run(Thread.java:840)

Check failure on line 187 in drivers/src/main/java/org/gorpipe/oci/driver/OCIObjectStorageSource.java

View workflow job for this annotation

GitHub Actions / Junit Tests - integrationTest

org.gorpipe.oci.driver.ITestOCICommonStreamTests ► testExists

Failed test found in: drivers/build/test-results/integrationTest/TEST-org.gorpipe.oci.driver.ITestOCICommonStreamTests.xml Error: org.gorpipe.exceptions.GorResourceException: Failed to load metadata from cache for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
Raw output
org.gorpipe.exceptions.GorResourceException: Failed to load metadata from cache for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
Cause: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.647Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.648Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.647Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.652Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadataFromCache(OCIObjectStorageSource.java:187)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadata(OCIObjectStorageSource.java:154)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.fileExists(OCIObjectStorageSource.java:218)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.exists(OCIObjectStorageSource.java:212)
	at app//org.gorpipe.gor.driver.providers.stream.sources.CommonStreamTests.testExists(CommonStreamTests.java:288)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at app//org.junit.contrib.java.lang.system.internal.LogPrintStream$1$1.evaluate(LogPrintStream.java:30)
	at app//org.junit.contrib.java.lang.system.internal.PrintStreamHandler$3.evaluate(PrintStreamHandler.java:48)
	at app//org.junit.contrib.java.lang.system.internal.LogPrintStream$1.evaluate(LogPrintStream.java:26)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at app//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at app//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at app//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at app//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at app//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:112)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:54)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:53)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy2/jdk.proxy2.$Proxy6.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:183)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.647Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.648Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2086)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
	at org.gorpipe.oci.driver.OCIObjectStorageSource.loadMetadataFromCache(OCIObjectStorageSource.java:185)
	... 52 more
Caused by: org.gorpipe.exceptions.GorResourceException: Failed to load metadata for gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
URI: oci://gdb_gor_test_data_dev/csa_test_data/data_sets/gor_driver_testfiles/no_such_file
Cause: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.647Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.653Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.

	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.createMetaData(OCIObjectStorageSource.java:179)
	at app//org.gorpipe.oci.driver.OCIObjectStorageSource.lambda$loadMetadataFromCache$0(OCIObjectStorageSource.java:185)
	at app//com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903)
	at app//com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574)
	at app//com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)
	at app//com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2190)
	at app//com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
	... 55 more
Caused by: java.util.concurrent.ExecutionException: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.647Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.gorpipe.oci.driver.OCIObjectStorageSource.createMetaData(OCIObjectStorageSource.java:168)
	... 61 more
Caused by: com.oracle.bmc.model.BmcException: Error returned by HeadObject operation in ObjectStorage service.(404, Unknown, false) Unexpected Content-Type: null instead of application/json. Response body:  (opc-request-id: iad-1:n0j6gV9qJ6gCy97Qn8e5jptuRHE-Dq5rWzjztbHoKyGaZDZuSPSojrQPTCbD1-Q-)
Timestamp: 2024-12-25T21:14:25.654Z
Client version: Oracle-JavaSDK/3.55.1
Request Endpoint: https://objectstorage.us-ashburn-1.oraclecloud.com/n/id5mlxoq0dmt/b/gdb_gor_test_data_dev/o/csa_test_data%2Fdata_sets%2Fgor_driver_testfiles%2Fno_such_file
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_unknown for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this ObjectStorage issue, please contact Oracle support and provide them this full error message.
	at app//com.oracle.bmc.http.internal.ResponseErrorBmcExceptionFactory.createRuntimeException(ResponseErrorBmcExceptionFactory.java:58)
	at app//com.oracle.bmc.http.internal.ResponseErrorBmcExceptionFactory.createRuntimeException(ResponseErrorBmcExceptionFactory.java:17)
	at app//com.oracle.bmc.http.internal.ClientCall.lambda$checkError$15(ClientCall.java:802)
	at [email protected]/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at [email protected]/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at [email protected]/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:144)
	at app//com.oracle.bmc.http.internal.ClientCall.thenCompose(ClientCall.java:1159)
	at app//com.oracle.bmc.http.internal.ClientCall.checkError(ClientCall.java:798)
	at app//com.oracle.bmc.http.internal.ClientCall.transformResponse(ClientCall.java:665)
	at [email protected]/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	at [email protected]/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at [email protected]/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at app//org.glassfish.jersey.client.JerseyInvocation$InvocationResponseCallback.completed(JerseyInvocation.java:1029)
	at app//org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:229)
	at app//org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62)
	at app//org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:173)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at app//org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
	at app//org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:173)
	at app//org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:278)
	at app//org.glassfish.jersey.client.ClientRuntime.lambda$null$6(ClientRuntime.java:182)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at app//org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at app//org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at app//org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
	at app//org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$7(ClientRuntime.java:156)
	at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at [email protected]/java.lang.Thread.run(Thread.java:840)
}
}

Expand Down Expand Up @@ -253,10 +241,6 @@ public void delete() {
Thread.currentThread().interrupt();
throw new GorSystemException(e);
} catch (Exception e) {
Throwable ex = e;
if (e instanceof ExecutionException || e instanceof UncheckedExecutionException) {
ex = e.getCause();
}
throw new GorResourceException("Failed to delete " + getName(), getName(), e).retry();
}

Expand All @@ -282,4 +266,37 @@ public GorIndexType useIndex() {
public void close() {
// No resources to free
}

@Override
public String createDirectory(FileAttribute<?>... attrs) {
try {
var folder = PathUtils.markAsFolder(key);
var request = PutObjectRequest.builder()
.namespaceName(namespace)
.bucketName(bucket)
.objectName(PathUtils.markAsFolder(key))
.putObjectBody(new InputStream() {
@Override
public int read() {
return -1;
}
})
.contentLength(0L)
.build();

client.putObject(request, null).get();
return folder;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new GorSystemException(e);
} catch (Exception e) {
throw new GorResourceException("Failed to create directory " + getName(), getName(), e).retry();
}
}

@Override
public String createDirectories(FileAttribute<?>... attrs) {
// For now just create the last directory in the path.
return createDirectory(attrs);
}
}
17 changes: 10 additions & 7 deletions drivers/src/main/java/org/gorpipe/s3/driver/S3Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public DataType getDataType() {
public boolean exists() {
try {
// Note: fileExists only handles dirs if the end with /. Therefor we fall back to the much slower Files.exists.
// Do exists with aws filesystem: return Files.exists(Path.of(URI.create(getName())));
// To do a exists with aws filesystem: return Files.exists(Path.of(URI.create(getName())));
return fileExists() || Files.exists(getPath());
} catch (Exception e) {
Credentials cred = S3ClientFileSystemProvider.getCredentials(sourceReference.getSecurityContext(), "s3", bucket);
Expand Down Expand Up @@ -256,7 +256,7 @@ public String createDirectory(FileAttribute<?>... attrs) {
// Files.createDirectory needs elevated access to list all buckets.
S3Path s3Path = getPath();
String directoryKey = s3Path.getKey().endsWith("/") ? s3Path.getKey() : s3Path.getKey() + "/";
PutObjectRequest request = (PutObjectRequest)PutObjectRequest.builder().bucket(s3Path.getBucketName()).key(directoryKey).cacheControl(s3Path.getFileSystem().getRequestHeaderCacheControlProperty()).contentLength(0L).build();
PutObjectRequest request = PutObjectRequest.builder().bucket(s3Path.getBucketName()).key(directoryKey).cacheControl(s3Path.getFileSystem().getRequestHeaderCacheControlProperty()).contentLength(0L).build();
client.putObject(request, RequestBody.fromBytes(new byte[0]));
return PathUtils.formatUri(getPath().toUri());
} catch (Exception e) {
Expand All @@ -266,11 +266,14 @@ public String createDirectory(FileAttribute<?>... attrs) {

@Override
public String createDirectories(FileAttribute<?>... attrs) {
try {
return PathUtils.formatUri(Files.createDirectories(getPath()).toUri());
} catch (IOException e) {
throw GorResourceException.fromIOException(e, getPath()).retry();
}
// Files.createDirectory needs elevated access to list all buckets.
// try {
// return PathUtils.formatUri(Files.createDirectories(getPath()).toUri());
// } catch (IOException e) {
// throw GorResourceException.fromIOException(e, getPath()).retry();
// }
// so for now just create the final directory, not the intermediate ones.
return createDirectory(attrs);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ private S3Client createClient(Credentials cred) {
AwsCredentialsProvider getCredentialsProvider(Credentials cred) {
if (cred == null || cred.isNull()) {
log.info("CredentialsProvider: DefaultCredentialsProvider for null creds");
//throw new IllegalArgumentException("Credentials are required for S3 access");
return DefaultCredentialsProvider.create();
} else {
var awsKey = cred.getOrDefault(Credentials.Attr.KEY, "");
Expand All @@ -180,7 +179,6 @@ AwsCredentialsProvider getCredentialsProvider(Credentials cred) {
}
} else {
log.info(String.format("CredentialsProvider: DefaultCredentialsProvider for %s:%s", cred.getService(), cred.getLookupKey()));
//throw new IllegalArgumentException(String.format("CredentialsProvider: DefaultCredentialsProvider for %s:%s", cred.getService(), cred.getLookupKey()));
return DefaultCredentialsProvider.create();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void testS3WriteMoreThanMaxChunks() {
public void testS3WritePgorGord() throws IOException {
String securityContext = DriverUtils.awsSecurityContext(S3_KEY, S3_SECRET);
String randomId = UUID.randomUUID().toString();
String dict = String.format("s3://gdb-unit-test-data/s3write/%s-genes.gord", randomId);
String dict = String.format("s3://gdb-unit-test-data/s3write/%s-genes.gord/", randomId);
TestUtils.runGorPipe("pgor -split 2 ../tests/data/gor/genes.gor | top 2 | write " + dict, false, securityContext);
String expected = TestUtils.runGorPipe("create x = pgor -split 2 ../tests/data/gor/genes.gor | top 2; gor [x] | select 1-4", false, securityContext);
String result = TestUtils.runGorPipe("gor " + dict + " | select 1-4", false, securityContext);
Expand Down
22 changes: 22 additions & 0 deletions drivers/src/test/java/org/gorpipe/s3/table/ITestS3Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.junit.contrib.java.lang.system.EnvironmentVariables;
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.contrib.java.lang.system.SystemErrRule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;

Expand All @@ -42,6 +43,8 @@ public class ITestS3Table {

private static String S3_KEY;
private static String S3_SECRET;
private static String S3_REGION = "eu-west-1";

private DriverBackedFileReader fileReader;

private static final String S3_FILE_1 = "s3://gdb-unit-test-data/csa_test_data/data_sets/sim20-micro/source/var/D3_WGC053023D.wgs.genotypes.gor";
Expand All @@ -55,6 +58,25 @@ public class ITestS3Table {
public TemporaryFolder workDir = new TemporaryFolder();
private Path workDirPath;

@Rule
public final ProvideSystemProperty myPropertyHasMyValue
= new ProvideSystemProperty("aws.accessKeyId", S3_KEY);

@Rule
public final ProvideSystemProperty otherPropertyIsMissing
= new ProvideSystemProperty("aws.secretKey", S3_SECRET);

@Rule
public final ProvideSystemProperty awsSecretAccessKey
= new ProvideSystemProperty("aws.secretAccessKey", S3_SECRET);

@Rule
public final ProvideSystemProperty awsRegion
= new ProvideSystemProperty("aws.region", S3_REGION);

@Rule
public final SystemErrRule systemErrRule = new SystemErrRule().enableLog();

@Rule
public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();

Expand Down
18 changes: 8 additions & 10 deletions gortools/src/main/scala/gorsat/Analysis/ForkWrite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,15 @@ case class ForkWrite(forkCol: Int,

def ensureDir(projectContext: ProjectContext, path: String, parent: Boolean = false): Unit = {
val fileReader = projectContext.getFileReader
if (PathUtils.isLocal(path)) {
val dir = if (parent) {
val parent = Paths.get(path).getParent
if (parent != null) parent.toString else null
} else {
path
}
val dir = if (parent) {
val parent = PathUtils.getParent(path)
if (parent != null) parent else null
} else {
path
}

if (dir != null && !fileReader.exists(dir)) {
fileReader.createDirectories(dir)
}
if (dir != null && !fileReader.exists(dir)) {
fileReader.createDirectories(dir)
}
}

Expand Down
4 changes: 3 additions & 1 deletion versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ version.software.amazon.awssdk..s3=2.29.39

#version.software.amazon.nio.s3..aws-java-nio-spi-for-s3=2.0.5

version.org.carlspring.cloud.aws..s3fs-nio=2.0.0
# Must be careful if we want to update to version 2.0.0. It looks like some actions do not work as before.
# For example, testCreateDeleteListEmptyDirectory fails every other run with 2.0.0.
version.org.carlspring.cloud.aws..s3fs-nio=1.0.6
## # available=2.0.0

version.com.auth0..java-jwt=4.4.0
Expand Down

0 comments on commit 6ca408a

Please sign in to comment.