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 19:54:19 GMT
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/92#discussion_r44705929
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FragmentsStats.java ---
    @@ -0,0 +1,226 @@
    +package org.apache.hawq.pxf.api;
    +
    +import org.apache.commons.logging.Log;
    +import org.apache.commons.logging.LogFactory;
    +import org.codehaus.jackson.map.ObjectMapper;
    +
    +import java.io.IOException;
    +
    +/**
    + * FragmentsStats holds statistics for a given path.
    + */
    +public class FragmentsStats {
    +
    +    /**
    +     * Default fragment size. Assuming a fragment is equivalent to a block in
    +     * HDFS, we guess a full fragment size is 64MB.
    +     */
    +    public static final long DEFAULT_FRAGMENT_SIZE = 67108864L;
    +
    +    private static Log Log = LogFactory.getLog(FragmentsStats.class);
    +
    +    // number of fragments
    +    private long fragmentsNumber;
    +    // first fragment size
    +    private SizeAndUnit firstFragmentSize;
    +    // total fragments size
    +    private SizeAndUnit totalSize;
    +
    +    /**
    +     * Enum to represent unit (Bytes/MB/GB/TB)
    +     */
    +    public enum SizeUnit {
    --- End diff --
    
    Good job with the handling of large size


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