KevinGG commented on a change in pull request #11050: [BEAM-8335] Implemented 
Capture Size limitation
URL: https://github.com/apache/beam/pull/11050#discussion_r388483271
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/interactive/caching/streaming_cache.py
 ##########
 @@ -63,6 +63,14 @@ def path(self):
     """Returns the path the sink leads to."""
     return self._path
 
+  @property
+  def size_in_bytes(self):
+    """Returns the space usage in bytes of the sink."""
+    try:
+      return os.stat(self._path).st_size
 
 Review comment:
   It works. Though in some versions of some OSes, some of the fields of the 
returned stat might be dummy values.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to