MCPcopy Create free account
hub / github.com/apache/kudu / deDup

Method deDup

java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java:1086–1088  ·  view source on GitHub ↗

De-duplicates two byte arrays. If two byte arrays have the same contents but are different, this function helps to re-use the old one and discard the new copy. @param old The existing byte array. @param neww The new byte array we're trying to de-duplicate. @return old if neww is

(final byte[] old, final byte[] neww)

Source from the content-addressed store, hash-verified

1084 * contents, otherwise {@code neww}.
1085 */
1086 public static byte[] deDup(final byte[] old, final byte[] neww) {
1087 return memcmp(old, neww) == 0 ? old : neww;
1088 }
1089
1090 /**
1091 * Tests whether two byte arrays have the same contents.

Callers

nothing calls this directly

Calls 1

memcmpMethod · 0.95

Tested by

no test coverage detected