Package org.apache.hadoop.hive.serde2.lazybinary

Examples of org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe.initialize()


      // Create the SerDe
      System.out.println("test: testLazySimpleSerDe");
      LazySimpleSerDe serDe = new LazySimpleSerDe();
      Configuration conf = new Configuration();
      Properties tbl = createProperties();
      serDe.initialize(conf, tbl);

      // Data
      Text t = new Text("123\t456\t789\t1000\t5.3\thive and hadoop\t1.\tNULL");
      // Test
      deserializeAndSerializeLazySimple(serDe, t);
View Full Code Here


    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;
  }

  @SuppressWarnings({"unchecked"})
View Full Code Here

    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

    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

   
    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);
View Full Code Here

    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

      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

      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

      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

      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

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.