Exemplo n.º 1
0
  private ThriftFunction(
      String name, Object func, Type type, Class<TBase<TBase<?, ?>, TFieldIdEnum>> resultType)
      throws Exception {

    this.name = name;
    this.func = func;
    this.type = type;

    // Determine the parameter types of the function.
    paramTypes =
        Collections.unmodifiableList(
            FieldMetaData.getStructMetaDataMap(newArgs().getClass())
                .values()
                .stream()
                .map(e -> ThriftUtil.toJavaType(e.valueMetaData))
                .collect(Collectors.toList()));

    // Determine the success and exception fields of the function.
    TFieldIdEnum successField = null;
    FieldValueMetaData successFieldMetadata = null;

    if (resultType != null) {
      result = resultType.newInstance();

      @SuppressWarnings("unchecked")
      final Map<TFieldIdEnum, FieldMetaData> metaDataMap =
          (Map<TFieldIdEnum, FieldMetaData>) FieldMetaData.getStructMetaDataMap(resultType);

      for (Entry<TFieldIdEnum, FieldMetaData> e : metaDataMap.entrySet()) {
        final TFieldIdEnum key = e.getKey();
        final String fieldName = key.getFieldName();
        if ("success".equals(fieldName)) {
          successField = key;
          successFieldMetadata = e.getValue().valueMetaData;
          continue;
        }

        Class<?> fieldType = resultType.getField(fieldName).getType();
        if (Throwable.class.isAssignableFrom(fieldType)) {
          @SuppressWarnings("unchecked")
          Class<Throwable> exceptionFieldType = (Class<Throwable>) fieldType;
          exceptionFields.put(exceptionFieldType, key);
        }
      }
    } else {
      result = null;
    }

    this.successField = successField;

    if (successFieldMetadata != null) {
      returnType = ThriftUtil.toJavaType(successFieldMetadata);
    } else {
      returnType = Void.class;
    }
  }
Exemplo n.º 2
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.APP_NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "app_name",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.ENDPOINT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "endpoint",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, THostPort.class)));
   tmpMap.put(
       _Fields.BUDGET,
       new org.apache.thrift.meta_data.FieldMetaData(
           "budget",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.DOUBLE)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RegMessage.class, metaDataMap);
 }
Exemplo n.º 3
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "value",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.ERROR,
       new org.apache.thrift.meta_data.FieldMetaData(
           "error",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.EnumMetaData(
               org.apache.thrift.protocol.TType.ENUM, ErrorCode.class)));
   tmpMap.put(
       _Fields.ERRORTEXT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "errortext",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Result.class, metaDataMap);
 }
Exemplo n.º 4
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.RESULT_TYPE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "ResultType",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.RESULT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "Result",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.OPERATION_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "OperationId",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Response.class, metaDataMap);
 }
Exemplo n.º 5
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.MAX,
       new org.apache.thrift.meta_data.FieldMetaData(
           "max",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64, "Long")));
   tmpMap.put(
       _Fields.TOTAL,
       new org.apache.thrift.meta_data.FieldMetaData(
           "total",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64, "Long")));
   tmpMap.put(
       _Fields.FREE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "free",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64, "Long")));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MemoryUsage.class, metaDataMap);
 }
Exemplo n.º 6
0
 static {
   Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.OBJECT_TYPE,
       new FieldMetaData(
           "objectType",
           TFieldRequirementType.DEFAULT,
           new EnumMetaData(TType.ENUM, HiveObjectType.class)));
   tmpMap.put(
       _Fields.DB_NAME,
       new FieldMetaData(
           "dbName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING)));
   tmpMap.put(
       _Fields.OBJECT_NAME,
       new FieldMetaData(
           "objectName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING)));
   tmpMap.put(
       _Fields.PART_VALUES,
       new FieldMetaData(
           "partValues",
           TFieldRequirementType.DEFAULT,
           new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING))));
   tmpMap.put(
       _Fields.COLUMN_NAME,
       new FieldMetaData(
           "columnName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   FieldMetaData.addStructMetaDataMap(HiveObjectRef.class, metaDataMap);
 }
Exemplo n.º 7
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.GROUP,
       new org.apache.thrift.meta_data.FieldMetaData(
           "group",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "name",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "value",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TConfigInfo.class, metaDataMap);
 }
Exemplo n.º 8
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.CONDITIONS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "conditions",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, Condition.class))));
   tmpMap.put(
       _Fields.UPDATES,
       new org.apache.thrift.meta_data.FieldMetaData(
           "updates",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, ColumnUpdate.class))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       ConditionalUpdates.class, metaDataMap);
 }
Exemplo n.º 9
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.OPERATION_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "operationId",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, THandleIdentifier.class)));
   tmpMap.put(
       _Fields.OPERATION_TYPE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "operationType",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.EnumMetaData(
               org.apache.thrift.protocol.TType.ENUM, TOperationType.class)));
   tmpMap.put(
       _Fields.HAS_RESULT_SET,
       new org.apache.thrift.meta_data.FieldMetaData(
           "hasResultSet",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.BOOL)));
   tmpMap.put(
       _Fields.MODIFIED_ROW_COUNT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "modifiedRowCount",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.DOUBLE)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       TOperationHandle.class, metaDataMap);
 }
Exemplo n.º 10
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.CODE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "code",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.MESSAGE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "message",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.RESPONSE_DATA,
       new org.apache.thrift.meta_data.FieldMetaData(
           "responseData",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, Data.class)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Response.class, metaDataMap);
 }
Exemplo n.º 11
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.LOW_VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "lowValue",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, Decimal.class)));
   tmpMap.put(
       _Fields.HIGH_VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "highValue",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, Decimal.class)));
   tmpMap.put(
       _Fields.NUM_NULLS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "numNulls",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   tmpMap.put(
       _Fields.NUM_DVS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "numDVs",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       DecimalColumnStatsData.class, metaDataMap);
 }
Exemplo n.º 12
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.RESULT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "result",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, RetHead.class)));
   tmpMap.put(
       _Fields.TOKEN,
       new org.apache.thrift.meta_data.FieldMetaData(
           "token",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, "Token")));
   tmpMap.put(
       _Fields.SPACE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "space",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.USPACE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "uspace",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loginResult.class, metaDataMap);
 }
Exemplo n.º 13
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.SLOT_DESCRIPTORS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "slotDescriptors",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, TSlotDescriptor.class))));
   tmpMap.put(
       _Fields.TUPLE_DESCRIPTORS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "tupleDescriptors",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, TTupleDescriptor.class))));
   tmpMap.put(
       _Fields.TABLE_DESCRIPTORS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "tableDescriptors",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       TDescriptorTable.class, metaDataMap);
 }
Exemplo n.º 14
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.I_DATE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "iDate",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.I_OPERATION,
       new org.apache.thrift.meta_data.FieldMetaData(
           "iOperation",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.I_PLACE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "iPlace",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.I_AMOUNT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "iAmount",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.DOUBLE)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
 }
Exemplo n.º 15
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.BLOCK_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "blockId",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   tmpMap.put(
       _Fields.LENGTH,
       new org.apache.thrift.meta_data.FieldMetaData(
           "length",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   tmpMap.put(
       _Fields.LOCATIONS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "locations",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.FieldValueMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, "BlockLocation"))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BlockInfo.class, metaDataMap);
 }
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.PROTOCOL_VERSION,
       new org.apache.thrift.meta_data.FieldMetaData(
           "protocol_version",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.EnumMetaData(
               org.apache.thrift.protocol.TType.ENUM, CatalogServiceVersion.class)));
   tmpMap.put(
       _Fields.HEADER,
       new org.apache.thrift.meta_data.FieldMetaData(
           "header",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, TCatalogServiceRequestHeader.class)));
   tmpMap.put(
       _Fields.OBJECT_DESCS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "object_descs",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT,
                   com.cloudera.impala.thrift.TCatalogObject.class))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       TPrioritizeLoadRequest.class, metaDataMap);
 }
Exemplo n.º 17
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.APPLICATION_NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "applicationName",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.AGENT_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "agentId",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.START_TIME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "startTime",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   tmpMap.put(
       _Fields.PAYLOAD,
       new org.apache.thrift.meta_data.FieldMetaData(
           "payload",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       TCommandTransfer.class, metaDataMap);
 }
Exemplo n.º 18
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.RESULT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "result",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, RetHead.class)));
   tmpMap.put(
       _Fields.FILES,
       new org.apache.thrift.meta_data.FieldMetaData(
           "files",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.LIST, "FilesMatchList")));
   tmpMap.put(
       _Fields.SPARE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "spare",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       QueryFListResult.class, metaDataMap);
 }
Exemplo n.º 19
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.START,
       new org.apache.thrift.meta_data.FieldMetaData(
           "start",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.FINISH,
       new org.apache.thrift.meta_data.FieldMetaData(
           "finish",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.REVERSED,
       new org.apache.thrift.meta_data.FieldMetaData(
           "reversed",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.BOOL)));
   tmpMap.put(
       _Fields.COUNT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "count",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SliceRange.class, metaDataMap);
 }
Exemplo n.º 20
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.USER_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "userID",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64, "long")));
   tmpMap.put(
       _Fields.POST_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "postID",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64, "long")));
   tmpMap.put(
       _Fields.RATING_VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "ratingValue",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.DOUBLE)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RateData.class, metaDataMap);
 }
Exemplo n.º 21
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.SERVER,
       new org.apache.thrift.meta_data.FieldMetaData(
           "server",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.LAST_STATUS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "lastStatus",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   tmpMap.put(
       _Fields.STATUS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "status",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeadServer.class, metaDataMap);
 }
Exemplo n.º 22
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.AGGREGATION_TYPE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "aggregationType",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.AGGREGATION_PARAMS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "aggregationParams",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.MapMetaData(
               org.apache.thrift.protocol.TType.MAP,
               new org.apache.thrift.meta_data.FieldValueMetaData(
                   org.apache.thrift.protocol.TType.STRING),
               new org.apache.thrift.meta_data.FieldValueMetaData(
                   org.apache.thrift.protocol.TType.STRING))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       AggregationInfo.class, metaDataMap);
 }
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "id",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.GROUP_TYPE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "groupType",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.BANK_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "bankId",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.BANK_CODE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "bankCode",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       BankGroupThrift.class, metaDataMap);
 }
Exemplo n.º 24
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.FAMILY,
       new org.apache.thrift.meta_data.FieldMetaData(
           "family",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.QUALIFIER,
       new org.apache.thrift.meta_data.FieldMetaData(
           "qualifier",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.VALUE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "value",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING, true)));
   tmpMap.put(
       _Fields.TIMESTAMP,
       new org.apache.thrift.meta_data.FieldMetaData(
           "timestamp",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I64)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnValue.class, metaDataMap);
 }
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.SCORE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "score",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.EnumMetaData(
               org.apache.thrift.protocol.TType.ENUM, ResultScore.class)));
   tmpMap.put(
       _Fields.IS_SHOT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "isShot",
           org.apache.thrift.TFieldRequirementType.REQUIRED,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.BOOL)));
   tmpMap.put(
       _Fields.DETAIL,
       new org.apache.thrift.meta_data.FieldMetaData(
           "detail",
           org.apache.thrift.TFieldRequirementType.OPTIONAL,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       AchieveResult.class, metaDataMap);
 }
Exemplo n.º 26
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.IPV4,
       new org.apache.thrift.meta_data.FieldMetaData(
           "ipv4",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.PORT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "port",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I16)));
   tmpMap.put(
       _Fields.SERVICE_NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "service_name",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Endpoint.class, metaDataMap);
 }
Exemplo n.º 27
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.DEVICE_ID,
       new org.apache.thrift.meta_data.FieldMetaData(
           "deviceId",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.FLOW_NUM,
       new org.apache.thrift.meta_data.FieldMetaData(
           "flowNum",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.RESULT,
       new org.apache.thrift.meta_data.FieldMetaData(
           "result",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.BOOL)));
   tmpMap.put(
       _Fields.APPDATAINFO,
       new org.apache.thrift.meta_data.FieldMetaData(
           "appdatainfo",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.StructMetaData(
               org.apache.thrift.protocol.TType.STRUCT, AppDataInfo.class)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       AppInfoResult.class, metaDataMap);
 }
Exemplo n.º 28
0
Arquivo: Role.java Projeto: Leolh/hive
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.ROLE_NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "roleName",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   tmpMap.put(
       _Fields.CREATE_TIME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "createTime",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.I32)));
   tmpMap.put(
       _Fields.OWNER_NAME,
       new org.apache.thrift.meta_data.FieldMetaData(
           "ownerName",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.FieldValueMetaData(
               org.apache.thrift.protocol.TType.STRING)));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap);
 }
Exemplo n.º 29
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
       DependencyInfo.class, metaDataMap);
 }
Exemplo n.º 30
0
 static {
   Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
       new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
   tmpMap.put(
       _Fields.NODE_TYPE,
       new org.apache.thrift.meta_data.FieldMetaData(
           "nodeType",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.EnumMetaData(
               org.apache.thrift.protocol.TType.ENUM, NodeType.class)));
   tmpMap.put(
       _Fields.ROOTS,
       new org.apache.thrift.meta_data.FieldMetaData(
           "roots",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.FieldValueMetaData(
                   org.apache.thrift.protocol.TType.STRING))));
   tmpMap.put(
       _Fields.ADJACENCY_LIST,
       new org.apache.thrift.meta_data.FieldMetaData(
           "adjacencyList",
           org.apache.thrift.TFieldRequirementType.DEFAULT,
           new org.apache.thrift.meta_data.ListMetaData(
               org.apache.thrift.protocol.TType.LIST,
               new org.apache.thrift.meta_data.StructMetaData(
                   org.apache.thrift.protocol.TType.STRUCT, Adjacency.class))));
   metaDataMap = Collections.unmodifiableMap(tmpMap);
   org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap);
 }