lostluck edited a comment on pull request #15896:
URL: https://github.com/apache/beam/pull/15896#issuecomment-962222438


   As this PR is written, to enable the hook a user needs to manually call the 
following:
   
   `hooks.EnableHook("EnableSideInputCache", "1024")`
   
   Which on the face of it, isn't so bad. However, it opens up that users can 
make mistakes. They make a typo in the hook name, or don't convert the 
parameter to a string. Eg. https://play.golang.org/p/AXHo63c9rq-
   
   The point of an ancillary package for users to call instead, means they get 
compile time safety, we've verified the hooks names match, and get to use a 
sensible type (they pass an integer in, and don't worry how to make it a 
string). 
   
   We can put these into  a ".../pkg/beam/util/hooksx" package. Or maybe a 
`harnessx` package.
   
   So the user then just calls `harnessx.EnableSideInputCache(1024)` to get it 
to work, not worrying about the details.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to