Package org.apache.hadoop.hive.ql.exec.MapJoinOperator

Examples of org.apache.hadoop.hive.ql.exec.MapJoinOperator.MapJoinObjectCtx


      ClassNotFoundException {
    try {
      metadataTag = in.readInt();

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      Writable val = ctx.getSerDe().getSerializedClass().newInstance();
      val.readFields(in);
      obj =
        (ArrayList<Object>)
        ObjectInspectorUtils.copyToStandardObject(
            ctx.getSerDe().deserialize(val),
            ctx.getSerDe().getObjectInspector(),
            ObjectInspectorCopyOption.WRITABLE);
    } catch (Exception e) {
      throw new IOException(e);
    }
View Full Code Here


  public void writeExternal(ObjectOutput out) throws IOException {
    try {
      out.writeInt(metadataTag);

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      // Different processing for key and value
      Writable outVal = ctx.getSerDe().serialize(obj, ctx.getStandardOI());
      outVal.write(out);
    }
    catch (SerDeException e) {
      throw new IOException(e);
    }
View Full Code Here

      ClassNotFoundException {
    try {
      metadataTag   = in.readInt();

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));
      int sz = in.readInt();

      RowContainer res = new RowContainer(bucketSize);
      res.setSerDe(ctx.getSerDe(), ctx.getStandardOI());
      res.setTableDesc(ctx.getTblDesc());
      for (int pos = 0; pos < sz; pos++) {
        Writable val = ctx.getSerDe().getSerializedClass().newInstance();
        val.readFields(in);

        ArrayList<Object> memObj = (ArrayList<Object>)
          ObjectInspectorUtils.copyToStandardObject(
              ctx.getSerDe().deserialize(val),
              ctx.getSerDe().getObjectInspector(),
              ObjectInspectorCopyOption.WRITABLE);

        res.add(memObj);
      }
      obj = res;
View Full Code Here

    try {

      out.writeInt(metadataTag);

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      // Different processing for key and value
      RowContainer<ArrayList<Object>> v = obj;
      out.writeInt(v.size());

      for (ArrayList<Object> row = v.first();
           row != null;
           row = v.next() ) {
        Writable outVal = ctx.getSerDe().serialize(row, ctx.getStandardOI());
        outVal.write(out);
      }
    }
    catch (SerDeException e) {
      throw new IOException(e);
View Full Code Here

      ClassNotFoundException {
    try {
      metadataTag   = in.readInt();

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));
      int sz = in.readInt();

      ArrayList<ArrayList<Object>> res = new ArrayList<ArrayList<Object>>();
      for (int pos = 0; pos < sz; pos++) {
        ArrayList<Object> memObj =
          (ArrayList<Object>)
          ObjectInspectorUtils.copyToStandardObject(
              ctx.getSerDe().deserialize(val),
              ctx.getSerDe().getObjectInspector(),
              ObjectInspectorCopyOption.WRITABLE);
       
        res.add(memObj);
      }
      obj = res;
View Full Code Here

    try {
     
      out.writeInt(metadataTag);

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      // Different processing for key and value
      ArrayList<ArrayList<Object>> v = (ArrayList<ArrayList<Object>>) obj;
      out.writeInt(v.size());

      for (int pos = 0; pos < v.size(); pos++) {
        Writable outVal = ctx.getSerDe().serialize(v.get(pos), ctx.getStandardOI());
        outVal.write(out);
      }
    }
    catch (SerDeException e) {
      throw new IOException(e);
View Full Code Here

      ClassNotFoundException {
    try {
      metadataTag = in.readInt();

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      Writable val = ctx.getSerDe().getSerializedClass().newInstance();
      val.readFields(in);     
      obj =
        (ArrayList<Object>)
        ObjectInspectorUtils.copyToStandardObject(
            ctx.getSerDe().deserialize(val),
            ctx.getSerDe().getObjectInspector(),
            ObjectInspectorCopyOption.WRITABLE);
    } catch (Exception e) {
      throw new IOException(e);
    }
View Full Code Here

  public void writeExternal(ObjectOutput out) throws IOException {
    try {
      out.writeInt(metadataTag);

      // get the tableDesc from the map stored in the mapjoin operator
      MapJoinObjectCtx ctx = MapJoinOperator.getMapMetadata().get(Integer.valueOf(metadataTag));

      // Different processing for key and value
      Writable outVal = ctx.getSerDe().serialize(obj, ctx.getStandardOI());
      outVal.write(out);
    }
    catch (SerDeException e) {
      throw new IOException(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.MapJoinOperator.MapJoinObjectCtx

Copyright © 2018 www.massapicom. 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.