Github user budde commented on the issue:

    https://github.com/apache/spark/pull/18029
  
    @yssharma Apologies for the slow reply-- very little of my professional dev 
work happens on GitHub so I can be prone to miss things :-/
    
    You would introduce a ```InitialPosition``` interface with three 
implementations, as @brkyvz has suggested. ```builder. 
initialPositionInStream()```  would be replaced by a method (perhaps of the 
same name or just ```initialPosition()```) that takes ```InitialPosition``` as 
an input argument. Users can then provide whatever ```InitialPosition``` 
implementation is appropriate for them. The existing default value can be used 
if one is not specified. This method shouldn't need to be overloaded.
    
    Users could either construct their ```InitialPosition``` implementation 
directly or we could introduce a builder interface to do this as we did with 
[SparkAWSCredentials](https://github.com/apache/spark/blob/38f4e8692ce3b6cbcfe0c1aff9b5e662f7a308b7/external/kinesis-asl/src/main/scala/org/apache/spark/streaming/kinesis/SparkAWSCredentials.scala).
 The ```SparkAWSCredentials``` interface is actually a good mode to follow 
here, I think.
    
    I'm not a committer to Spark but I'd strongly be in favor of consolidating 
the initial position options under a single interface rather than introducing 
redundant arguments that we'll just want to replace later anyhow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to