Class Sizes

java.lang.Object
org.apache.hadoop.io.Sizes

@Public @Evolving public final class Sizes extends Object
Sizes of binary values and other some common sizes. This avoids having to remember the larger binary values, and stops IDEs/style checkers complaining about numeric values in source code.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    0 bytes: 0.
    static final int
    10 MiB: 10485760.
    static final int
    2^17 bytes, 128 KiB: 131072.
    static final int
    2^14 bytes: 16384.
    static final int
    2^24 bytes, MiB: 16777216.
    static final int
    2^10 bytes - 1 KiB: 1024.
    static final int
    2^20 bytes, 1 MiB: 1048576.
    static final int
    2^8 bytes: 256.
    static final int
    2^18 bytes, 256 KiB: 262144.
    static final int
    2^11 bytes - 1 KiB: 2048.
    static final int
    2^21 bytes, 2 MiB: 2097152.
    static final int
    2^15 bytes: 32768.
    static final int
    2^25 bytes, MiB: 33554432.
    static final int
    2^12 bytes - 2 KiB: 4096.
    static final int
    2^22 bytes, 4 MiB: 4194304.
    static final int
    2^9 bytes: 512.
    static final int
    2^19 bytes, 512 KiB: 524288.
    static final int
    5 MiB: 5242880.
    static final int
    2^16 bytes: 65536.
    static final int
    2^13 bytes: 8192.
    static final int
    2^23 bytes, MiB: 8388608.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait