public static Metadata createMetadata(Text... values) {
    if (values.length % 2 != 0) {
      throw new IllegalArgumentException("Must have a matched set of " +
                                         "key-value pairs. " + values.length+
                                         " strings supplied.");
    }
    Metadata result = new Metadata();
    for(int i=0; i < values.length; i += 2) {
      result.set(values[i], values[i+1]);
    }
    return result;
  }
Create a metadata object with alternating key-value pairs.
Eg. metadata(key1, value1, key2, value2)
ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java