Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10657

Remove copyBytes operation from MD5 UDF

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: UDF
    • Labels:
      None

      Description

      Current MD5 UDF implementation uses Apache Commons DigestUtils.md5Hex method to get md5 hex.
      DigestUtils does not provide md5Hex method with signature (byte[], start, length). This is why copyBytes method was added to UDFMd5 to get bytes[] from BytesWritable.

      To avoid copying bytes from BytesWritable to new byte array we can use java MessageDigest API directly.
      MessageDigest has method update(byte[], start, length)

        Attachments

        1. HIVE-10657.1.patch
          2 kB
          Alexander Pivovarov
        2. HIVE-10657.2.patch
          2 kB
          Alexander Pivovarov

          Activity

            People

            • Assignee:
              apivovarov Alexander Pivovarov
              Reporter:
              apivovarov Alexander Pivovarov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: