You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/05 02:25:03 UTC

[GitHub] [beam] aaltay commented on a change in pull request #11050: [BEAM-8335] Implemented Capture Size limitation

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:
users@infra.apache.org


With regards,
Apache Git Services