[ 
https://issues.apache.org/jira/browse/FINERACT-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577849#comment-16577849
 ] 

ASF GitHub Bot commented on FINERACT-428:
-----------------------------------------

Github user santoshconflux commented on the issue:

    https://github.com/apache/fineract/pull/469
  
    Hi Santosh!
    Ticket, Fineract-428 will have multiple PRs since it takes into account all
    jobs intended for parallelizing and paging. Each job will have a separate PR
    
    Hope it answers your question.
    
    Regards,
    Kumaranath Fernando
    
    
    
    On Mon, Aug 13, 2018 at 10:57 AM, Santosh Math <
    sant...@confluxtechnologies.com> wrote:
    
    > Hi Kumarnath,
    >
    > There is one  more PR for same ticket , Fineract-428?
    >
    > https://github.com/apache/fineract/pull/464
    >
    > On Sat, Aug 11, 2018 at 10:14 PM, Kumaranath Fernando <
    > notificati...@github.com> wrote:
    >
    > > Fineract-428 <https://issues.apache.org/jira/browse/FINERACT-428>
    > >
    > > Parallelizing and paging of periodic accrual
    > > ------------------------------
    > > You can view, comment on, or merge this pull request online at:
    > >
    > >   https://github.com/apache/fineract/pull/469
    > > Commit Summary
    > >
    > >    - Implementing parallelizing and paging of recalculate interest for
    > >    loans
    > >
    > > File Changes
    > >
    > >    - *A* fineract-provider/src/main/java/org/apache/fineract/
    > >    infrastructure/jobs/domain/JobParameter.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-0> (84)
    > >    - *A* fineract-provider/src/main/java/org/apache/fineract/
    > >    infrastructure/jobs/domain/JobParameterRepository.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-1> (32)
    > >    - *M* fineract-provider/src/main/java/org/apache/fineract/
    > >    infrastructure/jobs/service/JobRegisterServiceImpl.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-2> (26)
    > >    - *M* fineract-provider/src/main/java/org/apache/fineract/
    > >    portfolio/loanaccount/service/LoanReadPlatformService.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-3> (3)
    > >    - *M* fineract-provider/src/main/java/org/apache/fineract/
    > >    portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-4> (46)
    > >    - *M* fineract-provider/src/main/java/org/apache/fineract/
    > >    portfolio/loanaccount/service/LoanSchedularService.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-5> (7)
    > >    - *M* fineract-provider/src/main/java/org/apache/fineract/
    > >    portfolio/loanaccount/service/LoanSchedularServiceImpl.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-6> (155)
    > >    - *A* fineract-provider/src/main/java/org/apache/fineract/
    > >    portfolio/loanaccount/service/RecalculateInterestPoster.java
    > >    <https://github.com/apache/fineract/pull/469/files#diff-7> (152)
    > >    - *A* fineract-provider/src/main/resources/sql/migrations/core_
    > >    db/V344__parallelizing_and_paging_recalculate_interest_
    > >    for_loans_job.sql
    > >    <https://github.com/apache/fineract/pull/469/files#diff-8> (33)
    > >
    > > Patch Links:
    > >
    > >    - https://github.com/apache/fineract/pull/469.patch
    > >    - https://github.com/apache/fineract/pull/469.diff
    > >
    > > —
    > > You are receiving this because you are subscribed to this thread.
    > > Reply to this email directly, view it on GitHub
    > > <https://github.com/apache/fineract/pull/469>, or mute the thread
    > > <https://github.com/notifications/unsubscribe-
    > auth/AV9MS_TwImbrVWDae6Aas7_sNv9zpke0ks5uPwoGgaJpZM4V5OxW>
    > > .
    > >
    >
    >
    >
    > --
    > Thanks & Regards
    >
    > Santosh Math
    >
    > *QA Engineer*
    >
    > *Conflux Technologies Pvt Ltd <http://www.confluxtechnologies.com/>*
    > | *Office*: +91-080-41208662 |
    >
    > *Address*: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
    > Bengaluru, Karnataka, 560043 INDIA
    >



> Parallelization of Jobs
> -----------------------
>
>                 Key: FINERACT-428
>                 URL: https://issues.apache.org/jira/browse/FINERACT-428
>             Project: Apache Fineract
>          Issue Type: Improvement
>          Components: Loan, Savings
>    Affects Versions: 1.1.0
>            Reporter: Avik Ganguly
>            Assignee: Markus Geiss
>            Priority: Major
>              Labels: gsoc, p2, performance
>             Fix For: 1.2.0
>
>
> For starters, it will be useful to have some technical configuration added as 
> job parameter for each of the below jobs, that is batch size and thread pool 
> size for executor service so this has a dependency on FINERACT-425. 
> Add migration script to add those 2 configurations to each of the following 
> jobs with the value of batch size being 500 and thread pool size being 16 :-
> Add Accrual Transactions
> Add Periodic Accrual Transactions
> Add Accrual Transactions For Loans With Income Posted As Transactions
> Generate Loan Loss Provisioning
> Post Interest for Savings
> Update Loan Summary
> This would require separation of core functionality to a separate class.
> Simplified example :-
> ```
> final ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
>         
>         final LocalDate dueDate = DateUtils.getLocalDateOfTenant();
>         final Collection<LoanAccountData> loansToBeRepaidData = 
> this.loanReadPlatformService
>                 .retrieveLoansToBeRepaidFromAdvancePayment(dueDate);
>         Iterable<List<LoanAccountData>> loansToBeRepaid = 
> Iterables.partition(loansToBeRepaidData, batchSize);
>         final Authentication authentication = 
> SecurityContextHolder.getContext().getAuthentication();
>         List<Callable<Object>> advancePaymentPosters = new 
> ArrayList<Callable<Object>>();
>         
>         for (List<LoanAccountData> subList : loansToBeRepaid) {
>               AdvancePaymentPoster poster = (AdvancePaymentPoster) 
> this.applicationContext.getBean("advancePaymentPoster");
>               poster.setLoans(subList);
>               poster.setTenant(ThreadLocalContextUtil.getTenant());
>               poster.setAuthentication(authentication);
>               poster.setCommandService(commandService);
>               advancePaymentPosters.add(Executors.callable(poster));
>         }
>         try {
>                       List<Future<Object>> responses = 
> executor.invokeAll(advancePaymentPosters);
> for(Future f : responses) {
>                       f.get();
>                     }
>               } catch (InterruptedException e1) {
>                       e1.printStackTrace();
>               }
>         
>         executor.shutdown(); 
>  ```



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to