Examples of LazyBinarySerDe


Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      StructObjectInspector oi, Map<String, String> serdePropsMap) throws SerDeException {
    serdePropsMap = serdePropsMap == null ? new LinkedHashMap<String, String>() : serdePropsMap;

    PTFDeserializer.addOIPropertiestoSerDePropsMap(oi, serdePropsMap);

    SerDe serDe = new LazyBinarySerDe();
    Properties p = new Properties();
    p.setProperty(org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS,
        serdePropsMap.get(org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS));
    p.setProperty(
        org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMN_TYPES,
        serdePropsMap.get(org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMN_TYPES));
    serDe.initialize(cfg, p);
    return serDe;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

    MapJoinKey result = new MapJoinKey();
    ByteArrayInputStream bais;
    ObjectInputStream in;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(baos);
    LazyBinarySerDe serde = new LazyBinarySerDe();
    Properties props = new Properties();
    props.put(serdeConstants.LIST_COLUMNS, columns);
    props.put(serdeConstants.LIST_COLUMN_TYPES, types);
    serde.initialize(null, props);
    MapJoinObjectSerDeContext context = new MapJoinObjectSerDeContext(serde, false);   
    key.write(context, out);
    out.close();
    bais = new ByteArrayInputStream(baos.toByteArray());
    in = new ObjectInputStream(bais);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

    MapJoinRowContainer result = new MapJoinRowContainer();
    ByteArrayInputStream bais;
    ObjectInputStream in;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(baos);
    LazyBinarySerDe serde = new LazyBinarySerDe();
    Properties props = new Properties();
    props.put(serdeConstants.LIST_COLUMNS, columns);
    props.put(serdeConstants.LIST_COLUMN_TYPES, types);
    serde.initialize(null, props);
    MapJoinObjectSerDeContext context = new MapJoinObjectSerDeContext(serde, true);   
    container.write(context, out);
    out.close();
    bais = new ByteArrayInputStream(baos.toByteArray());
    in = new ObjectInputStream(bais);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

    rowContainer = new MapJoinRowContainer();
    rowContainer.add(VALUE);
    baos = new ByteArrayOutputStream();
    out = new ObjectOutputStream(baos);
   
    LazyBinarySerDe keySerde = new LazyBinarySerDe();
    Properties keyProps = new Properties();
    keyProps.put(serdeConstants.LIST_COLUMNS, "v1");
    keyProps.put(serdeConstants.LIST_COLUMN_TYPES, "string");
    keySerde.initialize(null, keyProps);
    LazyBinarySerDe valueSerde = new LazyBinarySerDe();
    Properties valueProps = new Properties();
    valueProps.put(serdeConstants.LIST_COLUMNS, "v1");
    valueProps.put(serdeConstants.LIST_COLUMN_TYPES, "string");
    valueSerde.initialize(null, keyProps);
    containerSerde = new MapJoinTableContainerSerDe(
        new MapJoinObjectSerDeContext(keySerde, false),
        new MapJoinObjectSerDeContext(valueSerde, false));
    container = new HashMapWrapper();
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

  static Configuration cfg;

  @BeforeClass
  public static void setupClass()  throws SerDeException {
    cfg = new Configuration();
    serDe = new LazyBinarySerDe();
    Properties p = new Properties();
    p.setProperty(org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS,
        COL_NAMES);
    p.setProperty(
        org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMN_TYPES,
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      Properties schema = new Properties();
      schema.setProperty(Constants.LIST_COLUMNS, fieldNames);
      schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes);

      LazyBinarySerDe serDe = new LazyBinarySerDe();
      serDe.initialize(new Configuration(), schema);

      deserializeAndSerializeLazyBinary(serDe, rows, rowOI);
      System.out.println("test: testLazyBinarySerDe - OK");

    } catch (Throwable e) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      Properties schema = new Properties();
      schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames);
      schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes);

      LazyBinarySerDe serDe = new LazyBinarySerDe();
      serDe.initialize(new Configuration(), schema);

      deserializeAndSerializeLazyBinary(serDe, rows, rowOI);
      System.out.println("test: testLazyBinarySerDe - OK");

    } catch (Throwable e) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      Properties schema = new Properties();
      schema.setProperty(Constants.LIST_COLUMNS, fieldNames);
      schema.setProperty(Constants.LIST_COLUMN_TYPES, fieldTypes);

      LazyBinarySerDe serDe = new LazyBinarySerDe();
      serDe.initialize(new Configuration(), schema);

      deserializeAndSerializeLazyBinary(serDe, rows, rowOI);
      System.out.println("test: testLazyBinarySerDe - OK");

    } catch (Throwable e) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      cTypes.append(fields.get(i).getTypeName());
    }

    try
    {
      SerDe serDe = new LazyBinarySerDe();
      Properties p = new Properties();
      p.setProperty(org.apache.hadoop.hive.serde.Constants.LIST_COLUMNS,
          cNames.toString());
      p.setProperty(
          org.apache.hadoop.hive.serde.Constants.LIST_COLUMN_TYPES,
          cTypes.toString());
      serDe.initialize(cfg, p);
      return serDe;
    }
    catch (SerDeException se)
    {
      throw new WindowingException(se);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe

      Properties schema = new Properties();
      schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames);
      schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes);

      LazyBinarySerDe serDe = new LazyBinarySerDe();
      serDe.initialize(new Configuration(), schema);

      deserializeAndSerializeLazyBinary(serDe, rows, rowOI);
      System.out.println("test: testLazyBinarySerDe - OK");

    } catch (Throwable e) {
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.