Skip to main content

GCS Reader runtime considerations

GCS Reader monitoring metrics

The following monitoring metrics are published by the GCS Reader:

Metric

Description

CLOUD_OBJECT_LAST_OBJECT_NAME

The name of the cloud object whose metadata was recently fetched from the cloud.

Frequency: every cloud object in a batch.

For example:

Name of the last cloud objects metadata fetched | 0#1700554046000#normal#mt cars.parquet

CLOUD_OBJECT_LAST_OBJECT_REAL_NAME

The name of the actual object whose metadata was recently fetched from the cloud, along with its path in the GCS container.

Frequency: every cloud object in a batch.

For example:

Actual name of the last cloud objects metadata fetched | JSON/example-1482-8338a6jddf982.parquet

CLOUD_OBJECT_LAST_BATCH_COUNT

The number of cloud objects whose metadata were captured in the latest fetch cycle.

Frequency: every batch fetched.

Units: count (Long).

For example:

Count of cloud objects metadata from last fetch | 160

EXTERNAL_IO_LATENCY

The latency involved in capturing the cloud metadata in the latest fetch cycle.

Frequency: every batch fetched.

Units: milliseconds (Long).

For example:

External I/O Latency | 01s:114ms

CLOUD_OBJECT_STATS

The following metrics related to the cloud objects are captured by GCS Reader under Cloud objects statistics.

  • Count of Object metadata fetched: the total number of object metadata fetched since the start or latest restart of the application.

    Frequency: every batch fetched.

    Unit: count (Long).

  • Downloaded count: the total number of objects downloaded to the Striim server from GCS since the start or latest restart of the application. This sub metric will be displayed only when the adapter is run with the Parquet parser.

    Frequency: every object downloaded.

    Unit: count (Long).

  • Processed count: the total number of objects processed by GCS Reader since the start or latest restart of the application.

    Frequency: every event.

    Unit: count (Long).

  • Missing count: the total number of objects that were deleted in GCS after their metadata was fetched and before the object could be processed by GCS Reader since the start or latest restart of the application.

    Frequency: every event.

    Unit: count (Long).

  • Total objects size in MB: the total size of cloud object metadata fetched since the start or latest restart of the application.

    Frequency: every batch fetched.

    Unit: count (Double).

  • Total downloaded size in MB: the total size of downloaded cloud objects since the start or latest restart of the application. This metric is captured only when Streaming is disabled. This sub metric will be displayed only when the adapter is run with Parquet parser.

    Frequency: every object downloaded.

    Unit: count (Double).

  • Current Disk Utilization in MB: the current utilization of storage space in Striim server by the application. This metric is captured only when Streaming is disabled. This sub metric will be displayed only when the adapter is run with Parquet parser.

    Frequency: every object downloaded.

    Unit: count (Double).

For example:

{
  “Count of Objects metadata fetched”: 1,
  “Downloaded count”: 1,
  “Processed count”: 0,
  “Missing count”: 0,
  “Total objects size in MB”: 0.002,
  “Total downloaded size in MB”: 0.002,
  “Current Disk Utilization in MB”: 0.002
}

Performance optimizations

Object fetching mode: With the streaming approach (Use Streaming property) performance is expected to be faster as the bytes are streamed directly instead of requiring additional download steps. Local testing shows for sample data of 411 DSV files of varying size with 1M events in total, the download approach took 162 seconds vs 55 seconds by the streaming approach.

Object detection mode: The GCSAuditLogNotification object detection mode provides better performance during app recovery after a crash/stop when a bucket contains a huge number (in the order of millions) of objects. This is because the reader does not need to fetch the full metadata to locate the check-pointed object.

Limitations

The following limitations apply to the GCS Reader:

  • The GCS Reader can read Avro files with an embedded schema, but not with a separate Avro schema file.

  • The GCS Reader adapter's download mode is not supported on Windows OS.

  • If the object name is bigger than what current OS filename length supports, then you should enable the Use Streaming option to avoid exceptions from downloading a filename larger than what the OS supports.

  • If a bucket contains a huge number of objects, the reader may consume a high level of memory and CPU to fetch and process the metadata. This applies to both the GCSDirectoryListing and GCSAuditLogNotification modes.

    For the GCSDirectoryListing mode, a full metadata fetch happens when the adapter starts and for every subsequent polling fetch.

    For the GCSAuditLogNotification mode, a full metadata fetch happens when the adapter starts, and subsequent polling calls fetch only the incremental changes from the audit log.

  • In GCSDirectoryListing mode, if the bucket contains a huge number (in the order of millions) of objects, app recovery after crash/stop will take a considerable time since the full metadata has to be fetched to locate the checkpointed object. You are recommended to use the GCSAuditLogNotification mode for better performance.

  • In the GCSAuditLogNotification mode, the Google cloud provider has a set default limit (60) on the number of requests per min on reading the audit log. If you are running multiple apps then you should set the polling interval based on the number of apps you are running and the audit log read limit.

  • A time offset of 5 minutes is applied to queries to avoid a conflict during high volume data loading. To modify the 5 minutes default, contact Striim support.

Troubleshooting

This topic describes errors you may see when using the GCS Reader, and possible resolutions.

Exception

Resolutions

GoogleCloudBucketNotFoundException

Check if the specified bucket is present.

When using Private Service Connect, verify:    

  • Provide a valid PSC name   

  • Make sure the PSC is created

  • Make sure the PSC is reachable from the Striim host

GoogleCloudCredentialsException

  • Verify that the connection related properties ( ProjectID , ServiceAccountKey or Private Service Connect ) that are passed to the adapter are valid.

  • Ensure the provided Service account key file path is correct.

  • Make sure the provided credentials are in a valid format.

GoogleCloudLocalFileSystemException

  • Make sure the system has enough space to download the object.

  • Ensure app has permission to download the file at the specified download path.

  • Enable the Use Streaming property for this specific file.

  • Object key might be too long, rename object key.

CloudStorageConnectionException

  • Verify the connection properties passed to the adapter are valid.

  • Check your internet connection.

  • Make sure your VPN has permission to connect to the Google server.

  • Make sure your Private Service Connect details are valid and reachable from the Striim server.

GoogleCloudPermissionException

Ensure that the user has the following permissions on the bucket/audit log:

  • storage.objects.list

    storage.objects.get

    logging.logEntries.list