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

 ##########
 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
+    except:
+      return 0
 
 Review comment:
   Maybe log here?

----------------------------------------------------------------
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