private static Set<Object> cloneCredentials(Set<Object> old) {
    Set<Object> set = new HashSet<>();
    // Make sure Hadoop credentials objects do not reuse the maps.
    for (Object o : old) {
      set.add(o instanceof Credentials ? new Credentials((Credentials)o) : o);
    }
    return set;
  }
Compares two encryption key strengths.

@param zone1 First  EncryptionZone to compare
@param zone2 Second EncryptionZone to compare
@return 1 if zone1 is stronger; 0 if zones are equal; -1 if zone1 is weaker.
@throws IOException If an error occurred attempting to get key metadata
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java