incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/7] Inital commit of the top command in the blur-shell.
Date Sat, 22 Jun 2013 21:07:03 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7137006b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Metric.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Metric.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Metric.java
new file mode 100644
index 0000000..91043a6
--- /dev/null
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Metric.java
@@ -0,0 +1,894 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme;
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory;
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme;
+
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme;
+import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol;
+import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException;
+import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils;
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+
+public class Metric implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<Metric, Metric._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("Metric");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField NAME_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("name", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField STR_MAP_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("strMap", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)2);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField LONG_MAP_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("longMap", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)3);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField DOUBLE_MAP_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("doubleMap", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)4);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new MetricStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new MetricTupleSchemeFactory());
+  }
+
+  public String name; // required
+  public Map<String,String> strMap; // required
+  public Map<String,Long> longMap; // required
+  public Map<String,Double> doubleMap; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
+    NAME((short)1, "name"),
+    STR_MAP((short)2, "strMap"),
+    LONG_MAP((short)3, "longMap"),
+    DOUBLE_MAP((short)4, "doubleMap");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // NAME
+          return NAME;
+        case 2: // STR_MAP
+          return STR_MAP;
+        case 3: // LONG_MAP
+          return LONG_MAP;
+        case 4: // DOUBLE_MAP
+          return DOUBLE_MAP;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("name", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
+    tmpMap.put(_Fields.STR_MAP, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("strMap", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING))));
+    tmpMap.put(_Fields.LONG_MAP, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("longMap", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64))));
+    tmpMap.put(_Fields.DOUBLE_MAP, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("doubleMap", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(Metric.class, metaDataMap);
+  }
+
+  public Metric() {
+  }
+
+  public Metric(
+    String name,
+    Map<String,String> strMap,
+    Map<String,Long> longMap,
+    Map<String,Double> doubleMap)
+  {
+    this();
+    this.name = name;
+    this.strMap = strMap;
+    this.longMap = longMap;
+    this.doubleMap = doubleMap;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Metric(Metric other) {
+    if (other.isSetName()) {
+      this.name = other.name;
+    }
+    if (other.isSetStrMap()) {
+      Map<String,String> __this__strMap = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.strMap.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        String __this__strMap_copy_key = other_element_key;
+
+        String __this__strMap_copy_value = other_element_value;
+
+        __this__strMap.put(__this__strMap_copy_key, __this__strMap_copy_value);
+      }
+      this.strMap = __this__strMap;
+    }
+    if (other.isSetLongMap()) {
+      Map<String,Long> __this__longMap = new HashMap<String,Long>();
+      for (Map.Entry<String, Long> other_element : other.longMap.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        Long other_element_value = other_element.getValue();
+
+        String __this__longMap_copy_key = other_element_key;
+
+        Long __this__longMap_copy_value = other_element_value;
+
+        __this__longMap.put(__this__longMap_copy_key, __this__longMap_copy_value);
+      }
+      this.longMap = __this__longMap;
+    }
+    if (other.isSetDoubleMap()) {
+      Map<String,Double> __this__doubleMap = new HashMap<String,Double>();
+      for (Map.Entry<String, Double> other_element : other.doubleMap.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        Double other_element_value = other_element.getValue();
+
+        String __this__doubleMap_copy_key = other_element_key;
+
+        Double __this__doubleMap_copy_value = other_element_value;
+
+        __this__doubleMap.put(__this__doubleMap_copy_key, __this__doubleMap_copy_value);
+      }
+      this.doubleMap = __this__doubleMap;
+    }
+  }
+
+  public Metric deepCopy() {
+    return new Metric(this);
+  }
+
+  @Override
+  public void clear() {
+    this.name = null;
+    this.strMap = null;
+    this.longMap = null;
+    this.doubleMap = null;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public Metric setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public void unsetName() {
+    this.name = null;
+  }
+
+  /** Returns true if field name is set (has been assigned a value) and false otherwise */
+  public boolean isSetName() {
+    return this.name != null;
+  }
+
+  public void setNameIsSet(boolean value) {
+    if (!value) {
+      this.name = null;
+    }
+  }
+
+  public int getStrMapSize() {
+    return (this.strMap == null) ? 0 : this.strMap.size();
+  }
+
+  public void putToStrMap(String key, String val) {
+    if (this.strMap == null) {
+      this.strMap = new HashMap<String,String>();
+    }
+    this.strMap.put(key, val);
+  }
+
+  public Map<String,String> getStrMap() {
+    return this.strMap;
+  }
+
+  public Metric setStrMap(Map<String,String> strMap) {
+    this.strMap = strMap;
+    return this;
+  }
+
+  public void unsetStrMap() {
+    this.strMap = null;
+  }
+
+  /** Returns true if field strMap is set (has been assigned a value) and false otherwise */
+  public boolean isSetStrMap() {
+    return this.strMap != null;
+  }
+
+  public void setStrMapIsSet(boolean value) {
+    if (!value) {
+      this.strMap = null;
+    }
+  }
+
+  public int getLongMapSize() {
+    return (this.longMap == null) ? 0 : this.longMap.size();
+  }
+
+  public void putToLongMap(String key, long val) {
+    if (this.longMap == null) {
+      this.longMap = new HashMap<String,Long>();
+    }
+    this.longMap.put(key, val);
+  }
+
+  public Map<String,Long> getLongMap() {
+    return this.longMap;
+  }
+
+  public Metric setLongMap(Map<String,Long> longMap) {
+    this.longMap = longMap;
+    return this;
+  }
+
+  public void unsetLongMap() {
+    this.longMap = null;
+  }
+
+  /** Returns true if field longMap is set (has been assigned a value) and false otherwise */
+  public boolean isSetLongMap() {
+    return this.longMap != null;
+  }
+
+  public void setLongMapIsSet(boolean value) {
+    if (!value) {
+      this.longMap = null;
+    }
+  }
+
+  public int getDoubleMapSize() {
+    return (this.doubleMap == null) ? 0 : this.doubleMap.size();
+  }
+
+  public void putToDoubleMap(String key, double val) {
+    if (this.doubleMap == null) {
+      this.doubleMap = new HashMap<String,Double>();
+    }
+    this.doubleMap.put(key, val);
+  }
+
+  public Map<String,Double> getDoubleMap() {
+    return this.doubleMap;
+  }
+
+  public Metric setDoubleMap(Map<String,Double> doubleMap) {
+    this.doubleMap = doubleMap;
+    return this;
+  }
+
+  public void unsetDoubleMap() {
+    this.doubleMap = null;
+  }
+
+  /** Returns true if field doubleMap is set (has been assigned a value) and false otherwise */
+  public boolean isSetDoubleMap() {
+    return this.doubleMap != null;
+  }
+
+  public void setDoubleMapIsSet(boolean value) {
+    if (!value) {
+      this.doubleMap = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((String)value);
+      }
+      break;
+
+    case STR_MAP:
+      if (value == null) {
+        unsetStrMap();
+      } else {
+        setStrMap((Map<String,String>)value);
+      }
+      break;
+
+    case LONG_MAP:
+      if (value == null) {
+        unsetLongMap();
+      } else {
+        setLongMap((Map<String,Long>)value);
+      }
+      break;
+
+    case DOUBLE_MAP:
+      if (value == null) {
+        unsetDoubleMap();
+      } else {
+        setDoubleMap((Map<String,Double>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case NAME:
+      return getName();
+
+    case STR_MAP:
+      return getStrMap();
+
+    case LONG_MAP:
+      return getLongMap();
+
+    case DOUBLE_MAP:
+      return getDoubleMap();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case NAME:
+      return isSetName();
+    case STR_MAP:
+      return isSetStrMap();
+    case LONG_MAP:
+      return isSetLongMap();
+    case DOUBLE_MAP:
+      return isSetDoubleMap();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Metric)
+      return this.equals((Metric)that);
+    return false;
+  }
+
+  public boolean equals(Metric that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_name = true && this.isSetName();
+    boolean that_present_name = true && that.isSetName();
+    if (this_present_name || that_present_name) {
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
+    }
+
+    boolean this_present_strMap = true && this.isSetStrMap();
+    boolean that_present_strMap = true && that.isSetStrMap();
+    if (this_present_strMap || that_present_strMap) {
+      if (!(this_present_strMap && that_present_strMap))
+        return false;
+      if (!this.strMap.equals(that.strMap))
+        return false;
+    }
+
+    boolean this_present_longMap = true && this.isSetLongMap();
+    boolean that_present_longMap = true && that.isSetLongMap();
+    if (this_present_longMap || that_present_longMap) {
+      if (!(this_present_longMap && that_present_longMap))
+        return false;
+      if (!this.longMap.equals(that.longMap))
+        return false;
+    }
+
+    boolean this_present_doubleMap = true && this.isSetDoubleMap();
+    boolean that_present_doubleMap = true && that.isSetDoubleMap();
+    if (this_present_doubleMap || that_present_doubleMap) {
+      if (!(this_present_doubleMap && that_present_doubleMap))
+        return false;
+      if (!this.doubleMap.equals(that.doubleMap))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Metric other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Metric typedOther = (Metric)other;
+
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetName()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.name, typedOther.name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStrMap()).compareTo(typedOther.isSetStrMap());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStrMap()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.strMap, typedOther.strMap);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetLongMap()).compareTo(typedOther.isSetLongMap());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLongMap()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.longMap, typedOther.longMap);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDoubleMap()).compareTo(typedOther.isSetDoubleMap());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDoubleMap()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.doubleMap, typedOther.doubleMap);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Metric(");
+    boolean first = true;
+
+    sb.append("name:");
+    if (this.name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("strMap:");
+    if (this.strMap == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.strMap);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("longMap:");
+    if (this.longMap == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.longMap);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("doubleMap:");
+    if (this.doubleMap == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.doubleMap);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class MetricStandardSchemeFactory implements SchemeFactory {
+    public MetricStandardScheme getScheme() {
+      return new MetricStandardScheme();
+    }
+  }
+
+  private static class MetricStandardScheme extends StandardScheme<Metric> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // NAME
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
+              struct.name = iprot.readString();
+              struct.setNameIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // STR_MAP
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
+              {
+                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map176 = iprot.readMapBegin();
+                struct.strMap = new HashMap<String,String>(2*_map176.size);
+                for (int _i177 = 0; _i177 < _map176.size; ++_i177)
+                {
+                  String _key178; // required
+                  String _val179; // optional
+                  _key178 = iprot.readString();
+                  _val179 = iprot.readString();
+                  struct.strMap.put(_key178, _val179);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setStrMapIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // LONG_MAP
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
+              {
+                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map180 = iprot.readMapBegin();
+                struct.longMap = new HashMap<String,Long>(2*_map180.size);
+                for (int _i181 = 0; _i181 < _map180.size; ++_i181)
+                {
+                  String _key182; // required
+                  long _val183; // optional
+                  _key182 = iprot.readString();
+                  _val183 = iprot.readI64();
+                  struct.longMap.put(_key182, _val183);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setLongMapIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // DOUBLE_MAP
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
+              {
+                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map184 = iprot.readMapBegin();
+                struct.doubleMap = new HashMap<String,Double>(2*_map184.size);
+                for (int _i185 = 0; _i185 < _map184.size; ++_i185)
+                {
+                  String _key186; // required
+                  double _val187; // optional
+                  _key186 = iprot.readString();
+                  _val187 = iprot.readDouble();
+                  struct.doubleMap.put(_key186, _val187);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setDoubleMapIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.name != null) {
+        oprot.writeFieldBegin(NAME_FIELD_DESC);
+        oprot.writeString(struct.name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.strMap != null) {
+        oprot.writeFieldBegin(STR_MAP_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, struct.strMap.size()));
+          for (Map.Entry<String, String> _iter188 : struct.strMap.entrySet())
+          {
+            oprot.writeString(_iter188.getKey());
+            oprot.writeString(_iter188.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.longMap != null) {
+        oprot.writeFieldBegin(LONG_MAP_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, struct.longMap.size()));
+          for (Map.Entry<String, Long> _iter189 : struct.longMap.entrySet())
+          {
+            oprot.writeString(_iter189.getKey());
+            oprot.writeI64(_iter189.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.doubleMap != null) {
+        oprot.writeFieldBegin(DOUBLE_MAP_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE, struct.doubleMap.size()));
+          for (Map.Entry<String, Double> _iter190 : struct.doubleMap.entrySet())
+          {
+            oprot.writeString(_iter190.getKey());
+            oprot.writeDouble(_iter190.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class MetricTupleSchemeFactory implements SchemeFactory {
+    public MetricTupleScheme getScheme() {
+      return new MetricTupleScheme();
+    }
+  }
+
+  private static class MetricTupleScheme extends TupleScheme<Metric> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetStrMap()) {
+        optionals.set(1);
+      }
+      if (struct.isSetLongMap()) {
+        optionals.set(2);
+      }
+      if (struct.isSetDoubleMap()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetName()) {
+        oprot.writeString(struct.name);
+      }
+      if (struct.isSetStrMap()) {
+        {
+          oprot.writeI32(struct.strMap.size());
+          for (Map.Entry<String, String> _iter191 : struct.strMap.entrySet())
+          {
+            oprot.writeString(_iter191.getKey());
+            oprot.writeString(_iter191.getValue());
+          }
+        }
+      }
+      if (struct.isSetLongMap()) {
+        {
+          oprot.writeI32(struct.longMap.size());
+          for (Map.Entry<String, Long> _iter192 : struct.longMap.entrySet())
+          {
+            oprot.writeString(_iter192.getKey());
+            oprot.writeI64(_iter192.getValue());
+          }
+        }
+      }
+      if (struct.isSetDoubleMap()) {
+        {
+          oprot.writeI32(struct.doubleMap.size());
+          for (Map.Entry<String, Double> _iter193 : struct.doubleMap.entrySet())
+          {
+            oprot.writeString(_iter193.getKey());
+            oprot.writeDouble(_iter193.getValue());
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        struct.name = iprot.readString();
+        struct.setNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map194 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32());
+          struct.strMap = new HashMap<String,String>(2*_map194.size);
+          for (int _i195 = 0; _i195 < _map194.size; ++_i195)
+          {
+            String _key196; // required
+            String _val197; // optional
+            _key196 = iprot.readString();
+            _val197 = iprot.readString();
+            struct.strMap.put(_key196, _val197);
+          }
+        }
+        struct.setStrMapIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map198 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, iprot.readI32());
+          struct.longMap = new HashMap<String,Long>(2*_map198.size);
+          for (int _i199 = 0; _i199 < _map198.size; ++_i199)
+          {
+            String _key200; // required
+            long _val201; // optional
+            _key200 = iprot.readString();
+            _val201 = iprot.readI64();
+            struct.longMap.put(_key200, _val201);
+          }
+        }
+        struct.setLongMapIsSet(true);
+      }
+      if (incoming.get(3)) {
+        {
+          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map202 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE, iprot.readI32());
+          struct.doubleMap = new HashMap<String,Double>(2*_map202.size);
+          for (int _i203 = 0; _i203 < _map202.size; ++_i203)
+          {
+            String _key204; // required
+            double _val205; // optional
+            _key204 = iprot.readString();
+            _val205 = iprot.readDouble();
+            struct.doubleMap.put(_key204, _val205);
+          }
+        }
+        struct.setDoubleMapIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7137006b/distribution/src/main/scripts/interface/gen-js/Blur.js
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-js/Blur.js b/distribution/src/main/scripts/interface/gen-js/Blur.js
index cbffd65..68b9aa0 100644
--- a/distribution/src/main/scripts/interface/gen-js/Blur.js
+++ b/distribution/src/main/scripts/interface/gen-js/Blur.js
@@ -67,18 +67,18 @@ Blur_shardClusterList_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size176 = 0;
-        var _rtmp3180;
+        var _size206 = 0;
+        var _rtmp3210;
         this.success = [];
-        var _etype179 = 0;
-        _rtmp3180 = input.readListBegin();
-        _etype179 = _rtmp3180.etype;
-        _size176 = _rtmp3180.size;
-        for (var _i181 = 0; _i181 < _size176; ++_i181)
+        var _etype209 = 0;
+        _rtmp3210 = input.readListBegin();
+        _etype209 = _rtmp3210.etype;
+        _size206 = _rtmp3210.size;
+        for (var _i211 = 0; _i211 < _size206; ++_i211)
         {
-          var elem182 = null;
-          elem182 = input.readString().value;
-          this.success.push(elem182);
+          var elem212 = null;
+          elem212 = input.readString().value;
+          this.success.push(elem212);
         }
         input.readListEnd();
       } else {
@@ -107,12 +107,12 @@ Blur_shardClusterList_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter183 in this.success)
+    for (var iter213 in this.success)
     {
-      if (this.success.hasOwnProperty(iter183))
+      if (this.success.hasOwnProperty(iter213))
       {
-        iter183 = this.success[iter183];
-        output.writeString(iter183);
+        iter213 = this.success[iter213];
+        output.writeString(iter213);
       }
     }
     output.writeListEnd();
@@ -213,18 +213,18 @@ Blur_shardServerList_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size184 = 0;
-        var _rtmp3188;
+        var _size214 = 0;
+        var _rtmp3218;
         this.success = [];
-        var _etype187 = 0;
-        _rtmp3188 = input.readListBegin();
-        _etype187 = _rtmp3188.etype;
-        _size184 = _rtmp3188.size;
-        for (var _i189 = 0; _i189 < _size184; ++_i189)
+        var _etype217 = 0;
+        _rtmp3218 = input.readListBegin();
+        _etype217 = _rtmp3218.etype;
+        _size214 = _rtmp3218.size;
+        for (var _i219 = 0; _i219 < _size214; ++_i219)
         {
-          var elem190 = null;
-          elem190 = input.readString().value;
-          this.success.push(elem190);
+          var elem220 = null;
+          elem220 = input.readString().value;
+          this.success.push(elem220);
         }
         input.readListEnd();
       } else {
@@ -253,12 +253,12 @@ Blur_shardServerList_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter191 in this.success)
+    for (var iter221 in this.success)
     {
-      if (this.success.hasOwnProperty(iter191))
+      if (this.success.hasOwnProperty(iter221))
       {
-        iter191 = this.success[iter191];
-        output.writeString(iter191);
+        iter221 = this.success[iter221];
+        output.writeString(iter221);
       }
     }
     output.writeListEnd();
@@ -334,18 +334,18 @@ Blur_controllerServerList_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size192 = 0;
-        var _rtmp3196;
+        var _size222 = 0;
+        var _rtmp3226;
         this.success = [];
-        var _etype195 = 0;
-        _rtmp3196 = input.readListBegin();
-        _etype195 = _rtmp3196.etype;
-        _size192 = _rtmp3196.size;
-        for (var _i197 = 0; _i197 < _size192; ++_i197)
+        var _etype225 = 0;
+        _rtmp3226 = input.readListBegin();
+        _etype225 = _rtmp3226.etype;
+        _size222 = _rtmp3226.size;
+        for (var _i227 = 0; _i227 < _size222; ++_i227)
         {
-          var elem198 = null;
-          elem198 = input.readString().value;
-          this.success.push(elem198);
+          var elem228 = null;
+          elem228 = input.readString().value;
+          this.success.push(elem228);
         }
         input.readListEnd();
       } else {
@@ -374,12 +374,12 @@ Blur_controllerServerList_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter199 in this.success)
+    for (var iter229 in this.success)
     {
-      if (this.success.hasOwnProperty(iter199))
+      if (this.success.hasOwnProperty(iter229))
       {
-        iter199 = this.success[iter199];
-        output.writeString(iter199);
+        iter229 = this.success[iter229];
+        output.writeString(iter229);
       }
     }
     output.writeListEnd();
@@ -480,27 +480,27 @@ Blur_shardServerLayout_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.MAP) {
-        var _size200 = 0;
-        var _rtmp3204;
+        var _size230 = 0;
+        var _rtmp3234;
         this.success = {};
-        var _ktype201 = 0;
-        var _vtype202 = 0;
-        _rtmp3204 = input.readMapBegin();
-        _ktype201 = _rtmp3204.ktype;
-        _vtype202 = _rtmp3204.vtype;
-        _size200 = _rtmp3204.size;
-        for (var _i205 = 0; _i205 < _size200; ++_i205)
+        var _ktype231 = 0;
+        var _vtype232 = 0;
+        _rtmp3234 = input.readMapBegin();
+        _ktype231 = _rtmp3234.ktype;
+        _vtype232 = _rtmp3234.vtype;
+        _size230 = _rtmp3234.size;
+        for (var _i235 = 0; _i235 < _size230; ++_i235)
         {
-          if (_i205 > 0 ) {
+          if (_i235 > 0 ) {
             if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
               input.rstack.pop();
             }
           }
-          var key206 = null;
-          var val207 = null;
-          key206 = input.readString().value;
-          val207 = input.readString().value;
-          this.success[key206] = val207;
+          var key236 = null;
+          var val237 = null;
+          key236 = input.readString().value;
+          val237 = input.readString().value;
+          this.success[key236] = val237;
         }
         input.readMapEnd();
       } else {
@@ -529,13 +529,13 @@ Blur_shardServerLayout_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.MAP, 0);
     output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success));
-    for (var kiter208 in this.success)
+    for (var kiter238 in this.success)
     {
-      if (this.success.hasOwnProperty(kiter208))
+      if (this.success.hasOwnProperty(kiter238))
       {
-        var viter209 = this.success[kiter208];
-        output.writeString(kiter208);
-        output.writeString(viter209);
+        var viter239 = this.success[kiter238];
+        output.writeString(kiter238);
+        output.writeString(viter239);
       }
     }
     output.writeMapEnd();
@@ -636,49 +636,49 @@ Blur_shardServerLayoutState_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.MAP) {
-        var _size210 = 0;
-        var _rtmp3214;
+        var _size240 = 0;
+        var _rtmp3244;
         this.success = {};
-        var _ktype211 = 0;
-        var _vtype212 = 0;
-        _rtmp3214 = input.readMapBegin();
-        _ktype211 = _rtmp3214.ktype;
-        _vtype212 = _rtmp3214.vtype;
-        _size210 = _rtmp3214.size;
-        for (var _i215 = 0; _i215 < _size210; ++_i215)
+        var _ktype241 = 0;
+        var _vtype242 = 0;
+        _rtmp3244 = input.readMapBegin();
+        _ktype241 = _rtmp3244.ktype;
+        _vtype242 = _rtmp3244.vtype;
+        _size240 = _rtmp3244.size;
+        for (var _i245 = 0; _i245 < _size240; ++_i245)
         {
-          if (_i215 > 0 ) {
+          if (_i245 > 0 ) {
             if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
               input.rstack.pop();
             }
           }
-          var key216 = null;
-          var val217 = null;
-          key216 = input.readString().value;
-          var _size218 = 0;
-          var _rtmp3222;
-          val217 = {};
-          var _ktype219 = 0;
-          var _vtype220 = 0;
-          _rtmp3222 = input.readMapBegin();
-          _ktype219 = _rtmp3222.ktype;
-          _vtype220 = _rtmp3222.vtype;
-          _size218 = _rtmp3222.size;
-          for (var _i223 = 0; _i223 < _size218; ++_i223)
+          var key246 = null;
+          var val247 = null;
+          key246 = input.readString().value;
+          var _size248 = 0;
+          var _rtmp3252;
+          val247 = {};
+          var _ktype249 = 0;
+          var _vtype250 = 0;
+          _rtmp3252 = input.readMapBegin();
+          _ktype249 = _rtmp3252.ktype;
+          _vtype250 = _rtmp3252.vtype;
+          _size248 = _rtmp3252.size;
+          for (var _i253 = 0; _i253 < _size248; ++_i253)
           {
-            if (_i223 > 0 ) {
+            if (_i253 > 0 ) {
               if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
                 input.rstack.pop();
               }
             }
-            var key224 = null;
-            var val225 = null;
-            key224 = input.readString().value;
-            val225 = input.readI32().value;
-            val217[key224] = val225;
+            var key254 = null;
+            var val255 = null;
+            key254 = input.readString().value;
+            val255 = input.readI32().value;
+            val247[key254] = val255;
           }
           input.readMapEnd();
-          this.success[key216] = val217;
+          this.success[key246] = val247;
         }
         input.readMapEnd();
       } else {
@@ -707,20 +707,20 @@ Blur_shardServerLayoutState_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.MAP, 0);
     output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.MAP, Thrift.objectLength(this.success));
-    for (var kiter226 in this.success)
+    for (var kiter256 in this.success)
     {
-      if (this.success.hasOwnProperty(kiter226))
+      if (this.success.hasOwnProperty(kiter256))
       {
-        var viter227 = this.success[kiter226];
-        output.writeString(kiter226);
-        output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I32, Thrift.objectLength(viter227));
-        for (var kiter228 in viter227)
+        var viter257 = this.success[kiter256];
+        output.writeString(kiter256);
+        output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I32, Thrift.objectLength(viter257));
+        for (var kiter258 in viter257)
         {
-          if (viter227.hasOwnProperty(kiter228))
+          if (viter257.hasOwnProperty(kiter258))
           {
-            var viter229 = viter227[kiter228];
-            output.writeString(kiter228);
-            output.writeI32(viter229);
+            var viter259 = viter257[kiter258];
+            output.writeString(kiter258);
+            output.writeI32(viter259);
           }
         }
         output.writeMapEnd();
@@ -799,18 +799,18 @@ Blur_tableList_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size230 = 0;
-        var _rtmp3234;
+        var _size260 = 0;
+        var _rtmp3264;
         this.success = [];
-        var _etype233 = 0;
-        _rtmp3234 = input.readListBegin();
-        _etype233 = _rtmp3234.etype;
-        _size230 = _rtmp3234.size;
-        for (var _i235 = 0; _i235 < _size230; ++_i235)
+        var _etype263 = 0;
+        _rtmp3264 = input.readListBegin();
+        _etype263 = _rtmp3264.etype;
+        _size260 = _rtmp3264.size;
+        for (var _i265 = 0; _i265 < _size260; ++_i265)
         {
-          var elem236 = null;
-          elem236 = input.readString().value;
-          this.success.push(elem236);
+          var elem266 = null;
+          elem266 = input.readString().value;
+          this.success.push(elem266);
         }
         input.readListEnd();
       } else {
@@ -839,12 +839,12 @@ Blur_tableList_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter237 in this.success)
+    for (var iter267 in this.success)
     {
-      if (this.success.hasOwnProperty(iter237))
+      if (this.success.hasOwnProperty(iter267))
       {
-        iter237 = this.success[iter237];
-        output.writeString(iter237);
+        iter267 = this.success[iter267];
+        output.writeString(iter267);
       }
     }
     output.writeListEnd();
@@ -945,18 +945,18 @@ Blur_tableListByCluster_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size238 = 0;
-        var _rtmp3242;
+        var _size268 = 0;
+        var _rtmp3272;
         this.success = [];
-        var _etype241 = 0;
-        _rtmp3242 = input.readListBegin();
-        _etype241 = _rtmp3242.etype;
-        _size238 = _rtmp3242.size;
-        for (var _i243 = 0; _i243 < _size238; ++_i243)
+        var _etype271 = 0;
+        _rtmp3272 = input.readListBegin();
+        _etype271 = _rtmp3272.etype;
+        _size268 = _rtmp3272.size;
+        for (var _i273 = 0; _i273 < _size268; ++_i273)
         {
-          var elem244 = null;
-          elem244 = input.readString().value;
-          this.success.push(elem244);
+          var elem274 = null;
+          elem274 = input.readString().value;
+          this.success.push(elem274);
         }
         input.readListEnd();
       } else {
@@ -985,12 +985,12 @@ Blur_tableListByCluster_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter245 in this.success)
+    for (var iter275 in this.success)
     {
-      if (this.success.hasOwnProperty(iter245))
+      if (this.success.hasOwnProperty(iter275))
       {
-        iter245 = this.success[iter245];
-        output.writeString(iter245);
+        iter275 = this.success[iter275];
+        output.writeString(iter275);
       }
     }
     output.writeListEnd();
@@ -1270,6 +1270,144 @@ Blur_query_result.prototype.write = function(output) {
   return;
 };
 
+Blur_parseQuery_args = function(args) {
+  this.table = null;
+  this.simpleQuery = null;
+  if (args) {
+    if (args.table !== undefined) {
+      this.table = args.table;
+    }
+    if (args.simpleQuery !== undefined) {
+      this.simpleQuery = args.simpleQuery;
+    }
+  }
+};
+Blur_parseQuery_args.prototype = {};
+Blur_parseQuery_args.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+      if (ftype == Thrift.Type.STRING) {
+        this.table = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 2:
+      if (ftype == Thrift.Type.STRUCT) {
+        this.simpleQuery = new SimpleQuery();
+        this.simpleQuery.read(input);
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_parseQuery_args.prototype.write = function(output) {
+  output.writeStructBegin('Blur_parseQuery_args');
+  if (this.table !== null && this.table !== undefined) {
+    output.writeFieldBegin('table', Thrift.Type.STRING, 1);
+    output.writeString(this.table);
+    output.writeFieldEnd();
+  }
+  if (this.simpleQuery !== null && this.simpleQuery !== undefined) {
+    output.writeFieldBegin('simpleQuery', Thrift.Type.STRUCT, 2);
+    this.simpleQuery.write(output);
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
+Blur_parseQuery_result = function(args) {
+  this.success = null;
+  this.ex = null;
+  if (args instanceof BlurException) {
+    this.ex = args;
+    return;
+  }
+  if (args) {
+    if (args.success !== undefined) {
+      this.success = args.success;
+    }
+    if (args.ex !== undefined) {
+      this.ex = args.ex;
+    }
+  }
+};
+Blur_parseQuery_result.prototype = {};
+Blur_parseQuery_result.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+      if (ftype == Thrift.Type.STRING) {
+        this.success = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 1:
+      if (ftype == Thrift.Type.STRUCT) {
+        this.ex = new BlurException();
+        this.ex.read(input);
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_parseQuery_result.prototype.write = function(output) {
+  output.writeStructBegin('Blur_parseQuery_result');
+  if (this.success !== null && this.success !== undefined) {
+    output.writeFieldBegin('success', Thrift.Type.STRING, 0);
+    output.writeString(this.success);
+    output.writeFieldEnd();
+  }
+  if (this.ex !== null && this.ex !== undefined) {
+    output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
+    this.ex.write(output);
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
 Blur_cancelQuery_args = function(args) {
   this.table = null;
   this.uuid = null;
@@ -1479,19 +1617,19 @@ Blur_currentQueries_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size246 = 0;
-        var _rtmp3250;
+        var _size276 = 0;
+        var _rtmp3280;
         this.success = [];
-        var _etype249 = 0;
-        _rtmp3250 = input.readListBegin();
-        _etype249 = _rtmp3250.etype;
-        _size246 = _rtmp3250.size;
-        for (var _i251 = 0; _i251 < _size246; ++_i251)
+        var _etype279 = 0;
+        _rtmp3280 = input.readListBegin();
+        _etype279 = _rtmp3280.etype;
+        _size276 = _rtmp3280.size;
+        for (var _i281 = 0; _i281 < _size276; ++_i281)
         {
-          var elem252 = null;
-          elem252 = new BlurQueryStatus();
-          elem252.read(input);
-          this.success.push(elem252);
+          var elem282 = null;
+          elem282 = new BlurQueryStatus();
+          elem282.read(input);
+          this.success.push(elem282);
         }
         input.readListEnd();
       } else {
@@ -1520,12 +1658,12 @@ Blur_currentQueries_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
-    for (var iter253 in this.success)
+    for (var iter283 in this.success)
     {
-      if (this.success.hasOwnProperty(iter253))
+      if (this.success.hasOwnProperty(iter283))
       {
-        iter253 = this.success[iter253];
-        iter253.write(output);
+        iter283 = this.success[iter283];
+        iter283.write(output);
       }
     }
     output.writeListEnd();
@@ -1626,18 +1764,18 @@ Blur_queryStatusIdList_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size254 = 0;
-        var _rtmp3258;
+        var _size284 = 0;
+        var _rtmp3288;
         this.success = [];
-        var _etype257 = 0;
-        _rtmp3258 = input.readListBegin();
-        _etype257 = _rtmp3258.etype;
-        _size254 = _rtmp3258.size;
-        for (var _i259 = 0; _i259 < _size254; ++_i259)
+        var _etype287 = 0;
+        _rtmp3288 = input.readListBegin();
+        _etype287 = _rtmp3288.etype;
+        _size284 = _rtmp3288.size;
+        for (var _i289 = 0; _i289 < _size284; ++_i289)
         {
-          var elem260 = null;
-          elem260 = input.readI64().value;
-          this.success.push(elem260);
+          var elem290 = null;
+          elem290 = input.readI64().value;
+          this.success.push(elem290);
         }
         input.readListEnd();
       } else {
@@ -1666,12 +1804,12 @@ Blur_queryStatusIdList_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.I64, this.success.length);
-    for (var iter261 in this.success)
+    for (var iter291 in this.success)
     {
-      if (this.success.hasOwnProperty(iter261))
+      if (this.success.hasOwnProperty(iter291))
       {
-        iter261 = this.success[iter261];
-        output.writeI64(iter261);
+        iter291 = this.success[iter291];
+        output.writeI64(iter291);
       }
     }
     output.writeListEnd();
@@ -2346,18 +2484,18 @@ Blur_terms_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.LIST) {
-        var _size262 = 0;
-        var _rtmp3266;
+        var _size292 = 0;
+        var _rtmp3296;
         this.success = [];
-        var _etype265 = 0;
-        _rtmp3266 = input.readListBegin();
-        _etype265 = _rtmp3266.etype;
-        _size262 = _rtmp3266.size;
-        for (var _i267 = 0; _i267 < _size262; ++_i267)
+        var _etype295 = 0;
+        _rtmp3296 = input.readListBegin();
+        _etype295 = _rtmp3296.etype;
+        _size292 = _rtmp3296.size;
+        for (var _i297 = 0; _i297 < _size292; ++_i297)
         {
-          var elem268 = null;
-          elem268 = input.readString().value;
-          this.success.push(elem268);
+          var elem298 = null;
+          elem298 = input.readString().value;
+          this.success.push(elem298);
         }
         input.readListEnd();
       } else {
@@ -2386,12 +2524,12 @@ Blur_terms_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.LIST, 0);
     output.writeListBegin(Thrift.Type.STRING, this.success.length);
-    for (var iter269 in this.success)
+    for (var iter299 in this.success)
     {
-      if (this.success.hasOwnProperty(iter269))
+      if (this.success.hasOwnProperty(iter299))
       {
-        iter269 = this.success[iter269];
-        output.writeString(iter269);
+        iter299 = this.success[iter299];
+        output.writeString(iter299);
       }
     }
     output.writeListEnd();
@@ -2851,19 +2989,19 @@ Blur_mutateBatch_args.prototype.read = function(input) {
     {
       case 1:
       if (ftype == Thrift.Type.LIST) {
-        var _size270 = 0;
-        var _rtmp3274;
+        var _size300 = 0;
+        var _rtmp3304;
         this.mutations = [];
-        var _etype273 = 0;
-        _rtmp3274 = input.readListBegin();
-        _etype273 = _rtmp3274.etype;
-        _size270 = _rtmp3274.size;
-        for (var _i275 = 0; _i275 < _size270; ++_i275)
+        var _etype303 = 0;
+        _rtmp3304 = input.readListBegin();
+        _etype303 = _rtmp3304.etype;
+        _size300 = _rtmp3304.size;
+        for (var _i305 = 0; _i305 < _size300; ++_i305)
         {
-          var elem276 = null;
-          elem276 = new RowMutation();
-          elem276.read(input);
-          this.mutations.push(elem276);
+          var elem306 = null;
+          elem306 = new RowMutation();
+          elem306.read(input);
+          this.mutations.push(elem306);
         }
         input.readListEnd();
       } else {
@@ -2887,12 +3025,12 @@ Blur_mutateBatch_args.prototype.write = function(output) {
   if (this.mutations !== null && this.mutations !== undefined) {
     output.writeFieldBegin('mutations', Thrift.Type.LIST, 1);
     output.writeListBegin(Thrift.Type.STRUCT, this.mutations.length);
-    for (var iter277 in this.mutations)
+    for (var iter307 in this.mutations)
     {
-      if (this.mutations.hasOwnProperty(iter277))
+      if (this.mutations.hasOwnProperty(iter307))
       {
-        iter277 = this.mutations[iter277];
-        iter277.write(output);
+        iter307 = this.mutations[iter307];
+        iter307.write(output);
       }
     }
     output.writeListEnd();
@@ -3727,27 +3865,27 @@ Blur_configuration_result.prototype.read = function(input) {
     {
       case 0:
       if (ftype == Thrift.Type.MAP) {
-        var _size278 = 0;
-        var _rtmp3282;
+        var _size308 = 0;
+        var _rtmp3312;
         this.success = {};
-        var _ktype279 = 0;
-        var _vtype280 = 0;
-        _rtmp3282 = input.readMapBegin();
-        _ktype279 = _rtmp3282.ktype;
-        _vtype280 = _rtmp3282.vtype;
-        _size278 = _rtmp3282.size;
-        for (var _i283 = 0; _i283 < _size278; ++_i283)
+        var _ktype309 = 0;
+        var _vtype310 = 0;
+        _rtmp3312 = input.readMapBegin();
+        _ktype309 = _rtmp3312.ktype;
+        _vtype310 = _rtmp3312.vtype;
+        _size308 = _rtmp3312.size;
+        for (var _i313 = 0; _i313 < _size308; ++_i313)
         {
-          if (_i283 > 0 ) {
+          if (_i313 > 0 ) {
             if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
               input.rstack.pop();
             }
           }
-          var key284 = null;
-          var val285 = null;
-          key284 = input.readString().value;
-          val285 = input.readString().value;
-          this.success[key284] = val285;
+          var key314 = null;
+          var val315 = null;
+          key314 = input.readString().value;
+          val315 = input.readString().value;
+          this.success[key314] = val315;
         }
         input.readMapEnd();
       } else {
@@ -3776,13 +3914,192 @@ Blur_configuration_result.prototype.write = function(output) {
   if (this.success !== null && this.success !== undefined) {
     output.writeFieldBegin('success', Thrift.Type.MAP, 0);
     output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success));
-    for (var kiter286 in this.success)
+    for (var kiter316 in this.success)
     {
-      if (this.success.hasOwnProperty(kiter286))
+      if (this.success.hasOwnProperty(kiter316))
       {
-        var viter287 = this.success[kiter286];
-        output.writeString(kiter286);
-        output.writeString(viter287);
+        var viter317 = this.success[kiter316];
+        output.writeString(kiter316);
+        output.writeString(viter317);
+      }
+    }
+    output.writeMapEnd();
+    output.writeFieldEnd();
+  }
+  if (this.ex !== null && this.ex !== undefined) {
+    output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
+    this.ex.write(output);
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
+Blur_metrics_args = function(args) {
+  this.metrics = null;
+  if (args) {
+    if (args.metrics !== undefined) {
+      this.metrics = args.metrics;
+    }
+  }
+};
+Blur_metrics_args.prototype = {};
+Blur_metrics_args.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+      if (ftype == Thrift.Type.SET) {
+        var _size318 = 0;
+        var _rtmp3322;
+        this.metrics = [];
+        var _etype321 = 0;
+        _rtmp3322 = input.readSetBegin();
+        _etype321 = _rtmp3322.etype;
+        _size318 = _rtmp3322.size;
+        for (var _i323 = 0; _i323 < _size318; ++_i323)
+        {
+          var elem324 = null;
+          elem324 = input.readString().value;
+          this.metrics.push(elem324);
+        }
+        input.readSetEnd();
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 0:
+        input.skip(ftype);
+        break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_metrics_args.prototype.write = function(output) {
+  output.writeStructBegin('Blur_metrics_args');
+  if (this.metrics !== null && this.metrics !== undefined) {
+    output.writeFieldBegin('metrics', Thrift.Type.SET, 1);
+    output.writeSetBegin(Thrift.Type.STRING, this.metrics.length);
+    for (var iter325 in this.metrics)
+    {
+      if (this.metrics.hasOwnProperty(iter325))
+      {
+        iter325 = this.metrics[iter325];
+        output.writeString(iter325);
+      }
+    }
+    output.writeSetEnd();
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+
+Blur_metrics_result = function(args) {
+  this.success = null;
+  this.ex = null;
+  if (args instanceof BlurException) {
+    this.ex = args;
+    return;
+  }
+  if (args) {
+    if (args.success !== undefined) {
+      this.success = args.success;
+    }
+    if (args.ex !== undefined) {
+      this.ex = args.ex;
+    }
+  }
+};
+Blur_metrics_result.prototype = {};
+Blur_metrics_result.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+      if (ftype == Thrift.Type.MAP) {
+        var _size326 = 0;
+        var _rtmp3330;
+        this.success = {};
+        var _ktype327 = 0;
+        var _vtype328 = 0;
+        _rtmp3330 = input.readMapBegin();
+        _ktype327 = _rtmp3330.ktype;
+        _vtype328 = _rtmp3330.vtype;
+        _size326 = _rtmp3330.size;
+        for (var _i331 = 0; _i331 < _size326; ++_i331)
+        {
+          if (_i331 > 0 ) {
+            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
+              input.rstack.pop();
+            }
+          }
+          var key332 = null;
+          var val333 = null;
+          key332 = input.readString().value;
+          val333 = new Metric();
+          val333.read(input);
+          this.success[key332] = val333;
+        }
+        input.readMapEnd();
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 1:
+      if (ftype == Thrift.Type.STRUCT) {
+        this.ex = new BlurException();
+        this.ex.read(input);
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Blur_metrics_result.prototype.write = function(output) {
+  output.writeStructBegin('Blur_metrics_result');
+  if (this.success !== null && this.success !== undefined) {
+    output.writeFieldBegin('success', Thrift.Type.MAP, 0);
+    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success));
+    for (var kiter334 in this.success)
+    {
+      if (this.success.hasOwnProperty(kiter334))
+      {
+        var viter335 = this.success[kiter334];
+        output.writeString(kiter334);
+        viter335.write(output);
       }
     }
     output.writeMapEnd();
@@ -4135,6 +4452,44 @@ BlurClient.prototype.recv_query = function() {
   }
   throw 'query failed: unknown result';
 };
+BlurClient.prototype.parseQuery = function(table, simpleQuery) {
+  this.send_parseQuery(table, simpleQuery);
+  return this.recv_parseQuery();
+};
+
+BlurClient.prototype.send_parseQuery = function(table, simpleQuery) {
+  this.output.writeMessageBegin('parseQuery', Thrift.MessageType.CALL, this.seqid);
+  var args = new Blur_parseQuery_args();
+  args.table = table;
+  args.simpleQuery = simpleQuery;
+  args.write(this.output);
+  this.output.writeMessageEnd();
+  return this.output.getTransport().flush();
+};
+
+BlurClient.prototype.recv_parseQuery = function() {
+  var ret = this.input.readMessageBegin();
+  var fname = ret.fname;
+  var mtype = ret.mtype;
+  var rseqid = ret.rseqid;
+  if (mtype == Thrift.MessageType.EXCEPTION) {
+    var x = new Thrift.TApplicationException();
+    x.read(this.input);
+    this.input.readMessageEnd();
+    throw x;
+  }
+  var result = new Blur_parseQuery_result();
+  result.read(this.input);
+  this.input.readMessageEnd();
+
+  if (null !== result.ex) {
+    throw result.ex;
+  }
+  if (null !== result.success) {
+    return result.success;
+  }
+  throw 'parseQuery failed: unknown result';
+};
 BlurClient.prototype.cancelQuery = function(table, uuid) {
   this.send_cancelQuery(table, uuid);
   this.recv_cancelQuery();
@@ -4825,3 +5180,40 @@ BlurClient.prototype.recv_configuration = function() {
   }
   throw 'configuration failed: unknown result';
 };
+BlurClient.prototype.metrics = function(metrics) {
+  this.send_metrics(metrics);
+  return this.recv_metrics();
+};
+
+BlurClient.prototype.send_metrics = function(metrics) {
+  this.output.writeMessageBegin('metrics', Thrift.MessageType.CALL, this.seqid);
+  var args = new Blur_metrics_args();
+  args.metrics = metrics;
+  args.write(this.output);
+  this.output.writeMessageEnd();
+  return this.output.getTransport().flush();
+};
+
+BlurClient.prototype.recv_metrics = function() {
+  var ret = this.input.readMessageBegin();
+  var fname = ret.fname;
+  var mtype = ret.mtype;
+  var rseqid = ret.rseqid;
+  if (mtype == Thrift.MessageType.EXCEPTION) {
+    var x = new Thrift.TApplicationException();
+    x.read(this.input);
+    this.input.readMessageEnd();
+    throw x;
+  }
+  var result = new Blur_metrics_result();
+  result.read(this.input);
+  this.input.readMessageEnd();
+
+  if (null !== result.ex) {
+    throw result.ex;
+  }
+  if (null !== result.success) {
+    return result.success;
+  }
+  throw 'metrics failed: unknown result';
+};

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7137006b/distribution/src/main/scripts/interface/gen-js/Blur_types.js
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-js/Blur_types.js b/distribution/src/main/scripts/interface/gen-js/Blur_types.js
index 56581fd..d448050 100644
--- a/distribution/src/main/scripts/interface/gen-js/Blur_types.js
+++ b/distribution/src/main/scripts/interface/gen-js/Blur_types.js
@@ -3285,3 +3285,197 @@ TableDescriptor.prototype.write = function(output) {
   return;
 };
 
+Metric = function(args) {
+  this.name = null;
+  this.strMap = null;
+  this.longMap = null;
+  this.doubleMap = null;
+  if (args) {
+    if (args.name !== undefined) {
+      this.name = args.name;
+    }
+    if (args.strMap !== undefined) {
+      this.strMap = args.strMap;
+    }
+    if (args.longMap !== undefined) {
+      this.longMap = args.longMap;
+    }
+    if (args.doubleMap !== undefined) {
+      this.doubleMap = args.doubleMap;
+    }
+  }
+};
+Metric.prototype = {};
+Metric.prototype.read = function(input) {
+  input.readStructBegin();
+  while (true)
+  {
+    var ret = input.readFieldBegin();
+    var fname = ret.fname;
+    var ftype = ret.ftype;
+    var fid = ret.fid;
+    if (ftype == Thrift.Type.STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+      if (ftype == Thrift.Type.STRING) {
+        this.name = input.readString().value;
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 2:
+      if (ftype == Thrift.Type.MAP) {
+        var _size176 = 0;
+        var _rtmp3180;
+        this.strMap = {};
+        var _ktype177 = 0;
+        var _vtype178 = 0;
+        _rtmp3180 = input.readMapBegin();
+        _ktype177 = _rtmp3180.ktype;
+        _vtype178 = _rtmp3180.vtype;
+        _size176 = _rtmp3180.size;
+        for (var _i181 = 0; _i181 < _size176; ++_i181)
+        {
+          if (_i181 > 0 ) {
+            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
+              input.rstack.pop();
+            }
+          }
+          var key182 = null;
+          var val183 = null;
+          key182 = input.readString().value;
+          val183 = input.readString().value;
+          this.strMap[key182] = val183;
+        }
+        input.readMapEnd();
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 3:
+      if (ftype == Thrift.Type.MAP) {
+        var _size184 = 0;
+        var _rtmp3188;
+        this.longMap = {};
+        var _ktype185 = 0;
+        var _vtype186 = 0;
+        _rtmp3188 = input.readMapBegin();
+        _ktype185 = _rtmp3188.ktype;
+        _vtype186 = _rtmp3188.vtype;
+        _size184 = _rtmp3188.size;
+        for (var _i189 = 0; _i189 < _size184; ++_i189)
+        {
+          if (_i189 > 0 ) {
+            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
+              input.rstack.pop();
+            }
+          }
+          var key190 = null;
+          var val191 = null;
+          key190 = input.readString().value;
+          val191 = input.readI64().value;
+          this.longMap[key190] = val191;
+        }
+        input.readMapEnd();
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      case 4:
+      if (ftype == Thrift.Type.MAP) {
+        var _size192 = 0;
+        var _rtmp3196;
+        this.doubleMap = {};
+        var _ktype193 = 0;
+        var _vtype194 = 0;
+        _rtmp3196 = input.readMapBegin();
+        _ktype193 = _rtmp3196.ktype;
+        _vtype194 = _rtmp3196.vtype;
+        _size192 = _rtmp3196.size;
+        for (var _i197 = 0; _i197 < _size192; ++_i197)
+        {
+          if (_i197 > 0 ) {
+            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
+              input.rstack.pop();
+            }
+          }
+          var key198 = null;
+          var val199 = null;
+          key198 = input.readString().value;
+          val199 = input.readDouble().value;
+          this.doubleMap[key198] = val199;
+        }
+        input.readMapEnd();
+      } else {
+        input.skip(ftype);
+      }
+      break;
+      default:
+        input.skip(ftype);
+    }
+    input.readFieldEnd();
+  }
+  input.readStructEnd();
+  return;
+};
+
+Metric.prototype.write = function(output) {
+  output.writeStructBegin('Metric');
+  if (this.name !== null && this.name !== undefined) {
+    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
+    output.writeString(this.name);
+    output.writeFieldEnd();
+  }
+  if (this.strMap !== null && this.strMap !== undefined) {
+    output.writeFieldBegin('strMap', Thrift.Type.MAP, 2);
+    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.strMap));
+    for (var kiter200 in this.strMap)
+    {
+      if (this.strMap.hasOwnProperty(kiter200))
+      {
+        var viter201 = this.strMap[kiter200];
+        output.writeString(kiter200);
+        output.writeString(viter201);
+      }
+    }
+    output.writeMapEnd();
+    output.writeFieldEnd();
+  }
+  if (this.longMap !== null && this.longMap !== undefined) {
+    output.writeFieldBegin('longMap', Thrift.Type.MAP, 3);
+    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I64, Thrift.objectLength(this.longMap));
+    for (var kiter202 in this.longMap)
+    {
+      if (this.longMap.hasOwnProperty(kiter202))
+      {
+        var viter203 = this.longMap[kiter202];
+        output.writeString(kiter202);
+        output.writeI64(viter203);
+      }
+    }
+    output.writeMapEnd();
+    output.writeFieldEnd();
+  }
+  if (this.doubleMap !== null && this.doubleMap !== undefined) {
+    output.writeFieldBegin('doubleMap', Thrift.Type.MAP, 4);
+    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.DOUBLE, Thrift.objectLength(this.doubleMap));
+    for (var kiter204 in this.doubleMap)
+    {
+      if (this.doubleMap.hasOwnProperty(kiter204))
+      {
+        var viter205 = this.doubleMap[kiter204];
+        output.writeString(kiter204);
+        output.writeDouble(viter205);
+      }
+    }
+    output.writeMapEnd();
+    output.writeFieldEnd();
+  }
+  output.writeFieldStop();
+  output.writeStructEnd();
+  return;
+};
+


Mime
View raw message