Package org.apache.hadoop.hive.serde2

Examples of org.apache.hadoop.hive.serde2.Deserializer.initialize()


  @Override
  protected void initializeOp(Configuration hconf) throws HiveException {
    TableDesc tbl = this.getConf().getTbl();
    try {
      Deserializer serde = tbl.getDeserializerClass().newInstance();
      serde.initialize(hconf, tbl.getProperties());
      this.outputObjInspector = serde.getObjectInspector();
      initializeChildren(hconf);
    } catch (Exception e) {
      LOG.error("Generating output obj inspector from dummy object error");
      e.printStackTrace();
View Full Code Here


  /**
   * Return a deserializer object corresponding to the tableDesc.
   */
  public Deserializer getDeserializer() throws Exception {
    Deserializer de = deserializerClass.newInstance();
    de.initialize(null, properties);
    return de;
  }

  public void setInputFileFormatClass(
      final Class<? extends InputFormat> inputFileFormatClass) {
View Full Code Here

  /**
   * Return a deserializer object corresponding to the tableDesc.
   */
  public Deserializer getDeserializer() throws Exception {
    Deserializer de = deserializerClass.newInstance();
    de.initialize(null, properties);
    return de;
  }

  public void setInputFileFormatClass(
      final Class<? extends InputFormat> inputFileFormatClass) {
View Full Code Here

      TableDesc table_desc, DynamicPartitionCtx dpCtx) throws SemanticException {
    StructObjectInspector oi = null;
    try {
      Deserializer deserializer = table_desc.getDeserializerClass()
          .newInstance();
      deserializer.initialize(conf, table_desc.getProperties());
      oi = (StructObjectInspector) deserializer.getObjectInspector();
    } catch (Exception e) {
      throw new SemanticException(e);
    }
View Full Code Here

      throws SemanticException {
    StructObjectInspector oi = null;
    try {
      Deserializer deserializer = table_desc.getDeserializerClass()
          .newInstance();
      deserializer.initialize(conf, table_desc.getProperties());
      oi = (StructObjectInspector) deserializer.getObjectInspector();
    } catch (Exception e) {
      throw new SemanticException(e);
    }
View Full Code Here

        cntrs[newTag] = 0;
        nextCntrs[newTag] = 0;
        TableDesc keyTableDesc = conf.getKeysSerializeInfos().get(newTag);
        Deserializer inputKeyDeserializer = ReflectionUtils.newInstance(keyTableDesc
            .getDeserializerClass(), null);
        inputKeyDeserializer.initialize(null, keyTableDesc.getProperties());

        TableDesc valueTableDesc = conf.getValuesSerializeInfos().get(newTag);
        Deserializer inputValueDeserializer = ReflectionUtils.newInstance(valueTableDesc
            .getDeserializerClass(), null);
        inputValueDeserializer.initialize(null, valueTableDesc.getProperties());
View Full Code Here

        inputKeyDeserializer.initialize(null, keyTableDesc.getProperties());

        TableDesc valueTableDesc = conf.getValuesSerializeInfos().get(newTag);
        Deserializer inputValueDeserializer = ReflectionUtils.newInstance(valueTableDesc
            .getDeserializerClass(), null);
        inputValueDeserializer.initialize(null, valueTableDesc.getProperties());

        List<ObjectInspector> oi = new ArrayList<ObjectInspector>();
        oi.add(inputKeyDeserializer.getObjectInspector());
        oi.add(inputValueDeserializer.getObjectInspector());
        int childParentsCount = conf.getChildIndexToOriginalNumParents().get(childIndex);
View Full Code Here

  /**
   * Return a deserializer object corresponding to the tableDesc.
   */
  public Deserializer getDeserializer() throws Exception {
    Deserializer de = getDeserializerClass().newInstance();
    de.initialize(null, properties);
    return de;
  }

  public void setInputFileFormatClass(
      final Class<? extends InputFormat> inputFileFormatClass) {
View Full Code Here

      throw new IllegalStateException("Property " + serdeConstants.SERIALIZATION_LIB +
          " cannot be null");
    }
    Deserializer deserializer = ReflectionUtils.newInstance(conf.getClassByName(clazzName)
        .asSubclass(Deserializer.class), conf);
    deserializer.initialize(conf, schema);
    return deserializer;
  }

  public void setInputFileFormatClass(
      final Class<? extends InputFormat> inputFileFormatClass) {
View Full Code Here

  @Override
  protected void initializeOp(Configuration hconf) throws HiveException {
    TableDesc tbl = this.getConf().getTbl();
    try {
      Deserializer serde = tbl.getDeserializerClass().newInstance();
      serde.initialize(hconf, tbl.getProperties());
      this.outputObjInspector = serde.getObjectInspector();
      initializeChildren(hconf);
    } catch (Exception e) {
      LOG.error("Generating output obj inspector from dummy object error", e);
      e.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.