public static void checkOfflineStore()

in Java/src/main/java/com/example/customername/FeatureStoreAPIExample.java [165:187]


    public static void checkOfflineStore(S3Client s3, String bucketName) {

        try {
            ListObjectsRequest listObjects = ListObjectsRequest
                .builder()
                .bucket(bucketName)
                .build();

            ListObjectsResponse res = s3.listObjects(listObjects);
            List < S3Object > objects = res.contents();

            System.out.print("\n Checking for data in offline store...");
            for (ListIterator iterVals = objects.listIterator(); iterVals.hasNext();) {
                S3Object myValue = (S3Object) iterVals.next();
                System.out.print("\n The name of the key is: " + myValue.key());
                System.out.print("\n The object is: " + calKb(myValue.size()) + " KBs");
            }

        } catch (S3Exception e) {
            System.err.println(e.awsErrorDetails().errorMessage());
            System.exit(1);
        }
    }