Sizes (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io, class: Sizes

Package org.apache.hadoop.io

# 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`
  `S_0`
  0 bytes: 0.
  `static final int`
  `S_10M`
  10 MiB: 10485760.
  `static final int`
  `S_128K`
  2^17 bytes, 128 KiB: 131072.
  `static final int`
  `S_16K`
  2^14 bytes: 16384.
  `static final int`
  `S_16M`
  2^24 bytes, MiB: 16777216.
  `static final int`
  `S_1K`
  2^10 bytes - 1 KiB: 1024.
  `static final int`
  `S_1M`
  2^20 bytes, 1 MiB: 1048576.
  `static final int`
  `S_256`
  2^8 bytes: 256.
  `static final int`
  `S_256K`
  2^18 bytes, 256 KiB: 262144.
  `static final int`
  `S_2K`
  2^11 bytes - 1 KiB: 2048.
  `static final int`
  `S_2M`
  2^21 bytes, 2 MiB: 2097152.
  `static final int`
  `S_32K`
  2^15 bytes: 32768.
  `static final int`
  `S_32M`
  2^25 bytes, MiB: 33554432.
  `static final int`
  `S_4K`
  2^12 bytes - 2 KiB: 4096.
  `static final int`
  `S_4M`
  2^22 bytes, 4 MiB: 4194304.
  `static final int`
  `S_512`
  2^9 bytes: 512.
  `static final int`
  `S_512K`
  2^19 bytes, 512 KiB: 524288.
  `static final int`
  `S_5M`
  5 MiB: 5242880.
  `static final int`
  `S_64K`
  2^16 bytes: 65536.
  `static final int`
  `S_8K`
  2^13 bytes: 8192.
  `static final int`
  `S_8M`
  2^23 bytes, MiB: 8388608.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Sizes()`

- ## Method Summary

  ### Methods inherited from class java.lang.Object

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

- ## Field Details

  - ### S_0

    public static final int S_0
    0 bytes: 0. Here to make it easy to find use of zero in constants.
    See Also:
      - Constant Field Values

  - ### S_256

    public static final int S_256
    2^8 bytes: 256.
    See Also:
      - Constant Field Values

  - ### S_512

    public static final int S_512
    2^9 bytes: 512.
    See Also:
      - Constant Field Values

  - ### S_1K

    public static final int S_1K
    2^10 bytes - 1 KiB: 1024.
    See Also:
      - Constant Field Values

  - ### S_2K

    public static final int S_2K
    2^11 bytes - 1 KiB: 2048.
    See Also:
      - Constant Field Values

  - ### S_4K

    public static final int S_4K
    2^12 bytes - 2 KiB: 4096.
    See Also:
      - Constant Field Values

  - ### S_8K

    public static final int S_8K
    2^13 bytes: 8192.
    See Also:
      - Constant Field Values

  - ### S_16K

    public static final int S_16K
    2^14 bytes: 16384.
    See Also:
      - Constant Field Values

  - ### S_32K

    public static final int S_32K
    2^15 bytes: 32768.
    See Also:
      - Constant Field Values

  - ### S_64K

    public static final int S_64K
    2^16 bytes: 65536.
    See Also:
      - Constant Field Values

  - ### S_128K

    public static final int S_128K
    2^17 bytes, 128 KiB: 131072.
    See Also:
      - Constant Field Values

  - ### S_256K

    public static final int S_256K
    2^18 bytes, 256 KiB: 262144.
    See Also:
      - Constant Field Values

  - ### S_512K

    public static final int S_512K
    2^19 bytes, 512 KiB: 524288.
    See Also:
      - Constant Field Values

  - ### S_1M

    public static final int S_1M
    2^20 bytes, 1 MiB: 1048576.
    See Also:
      - Constant Field Values

  - ### S_2M

    public static final int S_2M
    2^21 bytes, 2 MiB: 2097152.
    See Also:
      - Constant Field Values

  - ### S_4M

    public static final int S_4M
    2^22 bytes, 4 MiB: 4194304.
    See Also:
      - Constant Field Values

  - ### S_8M

    public static final int S_8M
    2^23 bytes, MiB: 8388608.
    See Also:
      - Constant Field Values

  - ### S_16M

    public static final int S_16M
    2^24 bytes, MiB: 16777216.
    See Also:
      - Constant Field Values

  - ### S_32M

    public static final int S_32M
    2^25 bytes, MiB: 33554432.
    See Also:
      - Constant Field Values

  - ### S_5M

    public static final int S_5M
    5 MiB: 5242880.
    See Also:
      - Constant Field Values

  - ### S_10M

    public static final int S_10M
    10 MiB: 10485760.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Sizes

    public Sizes()