szetszwo commented on PR #7892:
URL: https://github.com/apache/hadoop/pull/7892#issuecomment-3246043904

   > You cannot override the run() / work() method if you use a factory.
   
   @stoty , builder is more flexible than constructors.  We definitely can 
override method as today. 
   ```java
   //TestByteArrayManager
     static class AllocatorThread extends Thread {
   ```
   
   ```java
   // existing code
           final AllocatorThread t = new AllocatorThread(arrayLength, bam);
   ```
   Instead of call `new AllocatorThread(..)` above, we will have
   ```java
   // new code
           final Thread t =  SubjectInheritingThread.newBuilder()
               .setThread(new AllocatorThread(arrayLength, bam))
               .build();
   ```


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


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

Reply via email to