gpt4 book ai didi

org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 16:15:05 39 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject()方法的一些代码示例,展示了WritableStringObjectInspector.getPrimitiveJavaObject()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableStringObjectInspector.getPrimitiveJavaObject()方法的具体详情如下:
包路径:org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector
类名称:WritableStringObjectInspector
方法名:getPrimitiveJavaObject

WritableStringObjectInspector.getPrimitiveJavaObject介绍

暂无

代码示例

代码示例来源:origin: apache/hive

private static SampleRec deserializeInner(Object row, StructObjectInspector inspector) {
 List<? extends StructField> fields = inspector.getAllStructFieldRefs();
 WritableStringObjectInspector f0ins = (WritableStringObjectInspector) fields.get(0).getFieldObjectInspector();
 WritableIntObjectInspector f1ins = (WritableIntObjectInspector) fields.get(1).getFieldObjectInspector();
 WritableStringObjectInspector f2ins = (WritableStringObjectInspector) fields.get(2).getFieldObjectInspector();
 String f0 = f0ins.getPrimitiveJavaObject(inspector.getStructFieldData(row, fields.get(0)));
 int f1 = f1ins.get(inspector.getStructFieldData(row, fields.get(1)));
 String f2 = f2ins.getPrimitiveJavaObject(inspector.getStructFieldData(row, fields.get(2)));
 return new SampleRec(f0, f1, f2);
}

代码示例来源:origin: apache/hive

private static SampleRec deserializeInner(Object row, StructObjectInspector inspector) {
 List<? extends StructField> fields = inspector.getAllStructFieldRefs();
 WritableStringObjectInspector f0ins = (WritableStringObjectInspector) fields.get(0).getFieldObjectInspector();
 WritableIntObjectInspector f1ins = (WritableIntObjectInspector) fields.get(1).getFieldObjectInspector();
 WritableStringObjectInspector f2ins = (WritableStringObjectInspector) fields.get(2).getFieldObjectInspector();
 String f0 = f0ins.getPrimitiveJavaObject(inspector.getStructFieldData(row, fields.get(0)));
 int f1 = f1ins.get(inspector.getStructFieldData(row, fields.get(1)));
 String f2 = f2ins.getPrimitiveJavaObject(inspector.getStructFieldData(row, fields.get(2)));
 return new SampleRec(f0, f1, f2);
}

代码示例来源:origin: apache/hive

return object;
} else {
 return ((WritableStringObjectInspector) objectInspector).getPrimitiveJavaObject(object);

代码示例来源:origin: Quetzal-RDF/quetzal

postMethod.setParameter(inputColumns.get(i),
    PrimitiveObjectInspectorFactory.writableStringObjectInspector
        .getPrimitiveJavaObject(arg0[i]));

代码示例来源:origin: org.apache.hivemall/hivemall-core

@Override
public void merge(@SuppressWarnings("deprecation") AggregationBuffer agg, Object partial)
    throws HiveException {
  if (partial == null) {
    return;
  }
  Object tpObj = internalMergeOI.getStructFieldData(partial, tpField);
  Object totalActualObj = internalMergeOI.getStructFieldData(partial, totalActualField);
  Object totalPredictedObj =
      internalMergeOI.getStructFieldData(partial, totalPredictedField);
  Object betaObj = internalMergeOI.getStructFieldData(partial, betaOptionField);
  Object averageObj = internalMergeOI.getStructFieldData(partial, averageOptionFiled);
  long tp = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(tpObj);
  long totalActual =
      PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(totalActualObj);
  long totalPredicted = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(
    totalPredictedObj);
  double beta =
      PrimitiveObjectInspectorFactory.writableDoubleObjectInspector.get(betaObj);
  String average =
      PrimitiveObjectInspectorFactory.writableStringObjectInspector.getPrimitiveJavaObject(
        averageObj);
  FMeasureAggregationBuffer myAggr = (FMeasureAggregationBuffer) agg;
  myAggr.merge(tp, totalActual, totalPredicted, beta, average);
}

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com