Murmur3 (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.util

## Class Murmur3

- java.lang.Object
- - org.apache.orc.util.Murmur3

-     public class Murmur3
      extends Object

  Murmur3 is successor to Murmur2 fast non-crytographic hash algorithms. Murmur3 32 and 128 bit variants. 32-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#94 128-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#255 This is a public domain code with no copyrights. From homepage of MurmurHash (https://code.google.com/p/smhasher/), "All MurmurHash versions are public domain software, and the author disclaims all copyright to their code."

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `NULL_HASHCODE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Murmur3()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long[]` | `hash128(byte[] data)` Murmur3 128-bit variant.
    `static long[]` | `hash128(byte[] data, int offset, int length, int seed)` Murmur3 128-bit variant.
    `static int` | `hash32(byte[] data)` Murmur3 32-bit variant.
    `static int` | `hash32(byte[] data, int length, int seed)` Murmur3 32-bit variant.
    `static long` | `hash64(byte[] data)` Murmur3 64-bit variant.
    `static long` | `hash64(byte[] data, int offset, int length)`
    `static long` | `hash64(byte[] data, int offset, int length, int seed)` Murmur3 64-bit variant.

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

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

- - ### Field Detail

    - #### NULL_HASHCODE

          public static final long NULL_HASHCODE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Murmur3

          public Murmur3()

  - ### Method Detail

    - #### hash32

          public static int hash32(byte[] data)

      Murmur3 32-bit variant.
      Parameters:
        `data` - - input byte array
      Returns:
        - hashcode

    - #### hash32

          public static int hash32(byte[] data,
                                   int length,
                                   int seed)

      Murmur3 32-bit variant.
      Parameters:
        `data` - - input byte array
        `length` - - length of array
        `seed` - - seed. (default 0)
      Returns:
        - hashcode

    - #### hash64

          public static long hash64(byte[] data)

      Murmur3 64-bit variant. This is essentially MSB 8 bytes of Murmur3 128-bit variant.
      Parameters:
        `data` - - input byte array
      Returns:
        - hashcode

    - #### hash64

          public static long hash64(byte[] data,
                                    int offset,
                                    int length)

    - #### hash64

          public static long hash64(byte[] data,
                                    int offset,
                                    int length,
                                    int seed)

      Murmur3 64-bit variant. This is essentially MSB 8 bytes of Murmur3 128-bit variant.
      Parameters:
        `data` - - input byte array
        `length` - - length of array
        `seed` - - seed. (default is 0)
      Returns:
        - hashcode

    - #### hash128

          public static long[] hash128(byte[] data)

      Murmur3 128-bit variant.
      Parameters:
        `data` - - input byte array
      Returns:
        - hashcode (2 longs)

    - #### hash128

          public static long[] hash128(byte[] data,
                                       int offset,
                                       int length,
                                       int seed)

      Murmur3 128-bit variant.
      Parameters:
        `data` - - input byte array
        `offset` - - the first element of array
        `length` - - length of array
        `seed` - - seed. (default is 0)
      Returns:
        - hashcode (2 longs)

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.