hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shivzone <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: Analyze HAWQ-44
Date Thu, 12 Nov 2015 23:30:31 GMT
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/92#discussion_r44731388
  
    --- Diff: pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/ReadBridge.java ---
    @@ -14,58 +14,81 @@
     
     import java.io.*;
     import java.nio.charset.CharacterCodingException;
    +import java.util.LinkedList;
     import java.util.zip.ZipException;
     
    -/*
    - * ReadBridge class creates appropriate accessor and resolver.
    - * It will then create the correct output conversion
    - * class (e.g. Text or GPDBWritable) and get records from accessor,
    - * let resolver deserialize them and reserialize them using the
    - * output conversion class.
    - *
    - * The class handles BadRecordException and other exception type
    - * and marks the record as invalid for GPDB.
    +/**
    + * ReadBridge class creates appropriate accessor and resolver. It will then
    + * create the correct output conversion class (e.g. Text or GPDBWritable) and
    + * get records from accessor, let resolver deserialize them and reserialize them
    + * using the output conversion class. <br>
    + * The class handles BadRecordException and other exception type and marks the
    + * record as invalid for HAWQ.
      */
     public class ReadBridge implements Bridge {
         ReadAccessor fileAccessor = null;
         ReadResolver fieldsResolver = null;
         BridgeOutputBuilder outputBuilder = null;
    +    LinkedList<Writable> outputQueue = null;
     
    -    private Log Log;
    +    static private Log Log = LogFactory.getLog(ReadBridge.class);
     
    -    /*
    -     * C'tor - set the implementation of the bridge
    +    /**
    +     * C'tor - set the implementation of the bridge.
    +     *
    +     * @param protData input containing accessor and resolver names
    +     * @throws Exception if accessor or resolver can't be instantiated
          */
         public ReadBridge(ProtocolData protData) throws Exception {
             outputBuilder = new BridgeOutputBuilder(protData);
    -        Log = LogFactory.getLog(ReadBridge.class);
    +        outputQueue = new LinkedList<Writable>();
             fileAccessor = getFileAccessor(protData);
             fieldsResolver = getFieldsResolver(protData);
         }
     
    -    /*
    -     * Accesses the underlying HDFS file
    +    /**
    +     * Accesses the underlying HDFS file.
          */
         @Override
         public boolean beginIteration() throws Exception {
             return fileAccessor.openForRead();
         }
     
    -    /*
    -     * Fetch next object from file and turn it into a record that the GPDB backend can
process
    +    /**
    +     * Fetches next object from file and turn it into a record that the HAWQ
    +     * backend can process.
          */
         @Override
         public Writable getNext() throws Exception {
    -        Writable output;
    +        Writable output = null;
    --- End diff --
    
    java by default initializes objects to null


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

Mime
View raw message