[jira] [Commented] (CARBONDATA-297) 2. Add interfaces for data loading.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CARBONDATA-297) 2. Add interfaces for data loading.

Akash R Nilugal (Jira)

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

ASF GitHub Bot commented on CARBONDATA-297:
-------------------------------------------

Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/229#discussion_r83031958
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/newflow/DataLoadProcessorStep.java ---
    @@ -0,0 +1,40 @@
    +package org.apache.carbondata.processing.newflow;
    +
    +import java.util.Iterator;
    +
    +import org.apache.carbondata.processing.newflow.exception.CarbonDataLoadingException;
    +
    +/**
    + * This base interface for data loading. It can do transformation jobs as per the implementation.
    + *
    + */
    +public interface DataLoadProcessorStep {
    --- End diff --
   
    I think each implementation of this interface have similar logic in the execute function, can we create a abstract class to implement the common logic?
    The common logic like:
    ```
    Iterator<Object[]> execute() throws CarbonDataLoadingException {
        Iterator childIter = child.execute();
        return new Iterator<Object[]> {
              public boolean hasNext() {
                    return childIter.hasNext();
              }
              public Object[] next() {
                    // processInput is the abstract func in this class
                    return processInput(childItor.next());
              }
         }
    }
    ```


> 2. Add interfaces for data loading.
> -----------------------------------
>
>                 Key: CARBONDATA-297
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-297
>             Project: CarbonData
>          Issue Type: Sub-task
>            Reporter: Ravindra Pesala
>            Assignee: Ravindra Pesala
>             Fix For: 0.2.0-incubating
>
>
> Add the major interface classes for data loading so that the following jiras can use this interfaces to implement it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)