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

    https://github.com/apache/incubator-hawq/pull/1261#discussion_r124934930
  
    --- Diff: 
pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DummyFragmenter.java 
---
    @@ -0,0 +1,39 @@
    +package org.apache.hawq.pxf.api.examples;
    +
    +import org.apache.hawq.pxf.api.Fragmenter;
    +import org.apache.hawq.pxf.api.Fragment;
    +import org.apache.hawq.pxf.api.utilities.InputData;
    +import java.util.List;
    +
    +/**
    + * Fragmenter class for text data on local filesystem.
    + *
    + * Given an text file on local filesystem(a file, directory, or wild card 
pattern),divide
    + * the data into fragments and return a list of them along with a list of
    + * host:port locations for each.
    + */
    +public class DummyFragmenter extends Fragmenter{
    +    public DummyFragmenter(InputData metaData) {
    +        super(metaData);
    +    }
    +    /*
    +     * path is a data source URI that can appear as a file name, a 
directory name or a wildcard
    +     * returns the data fragments - identifiers of data and a list of 
available hosts
    +     */
    +    @Override
    +    public List<Fragment> getFragments() throws Exception {
    +        String localhostname = 
java.net.InetAddress.getLocalHost().getHostName();
    +        String[] localHosts = new String[]{localhostname, localhostname};
    +        fragments.add(new Fragment(inputData.getDataSource() + ".1" /* 
source name */,
    +                localHosts /* available hosts list */,
    +                "fragment1".getBytes()));
    --- End diff --
    
    Thanks, removed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to