All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nvidia.spark.rapids.format.BlockIdMeta Maven / Gradle / Ivy

The newest version!
// automatically generated by the FlatBuffers compiler, do not modify

package com.nvidia.spark.rapids.format;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
/**
 * Metadata about block IDs to fetch
 */
public final class BlockIdMeta extends Table {
  public static BlockIdMeta getRootAsBlockIdMeta(ByteBuffer _bb) { return getRootAsBlockIdMeta(_bb, new BlockIdMeta()); }
  public static BlockIdMeta getRootAsBlockIdMeta(ByteBuffer _bb, BlockIdMeta obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
  public BlockIdMeta __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public int shuffleId() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
  public boolean mutateShuffleId(int shuffle_id) { int o = __offset(4); if (o != 0) { bb.putInt(o + bb_pos, shuffle_id); return true; } else { return false; } }
  public long mapId() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
  public boolean mutateMapId(long map_id) { int o = __offset(6); if (o != 0) { bb.putLong(o + bb_pos, map_id); return true; } else { return false; } }
  public int startReduceId() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
  public boolean mutateStartReduceId(int start_reduce_id) { int o = __offset(8); if (o != 0) { bb.putInt(o + bb_pos, start_reduce_id); return true; } else { return false; } }
  public int endReduceId() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
  public boolean mutateEndReduceId(int end_reduce_id) { int o = __offset(10); if (o != 0) { bb.putInt(o + bb_pos, end_reduce_id); return true; } else { return false; } }

  public static int createBlockIdMeta(FlatBufferBuilder builder,
      int shuffle_id,
      long map_id,
      int start_reduce_id,
      int end_reduce_id) {
    builder.startObject(4);
    BlockIdMeta.addMapId(builder, map_id);
    BlockIdMeta.addEndReduceId(builder, end_reduce_id);
    BlockIdMeta.addStartReduceId(builder, start_reduce_id);
    BlockIdMeta.addShuffleId(builder, shuffle_id);
    return BlockIdMeta.endBlockIdMeta(builder);
  }

  public static void startBlockIdMeta(FlatBufferBuilder builder) { builder.startObject(4); }
  public static void addShuffleId(FlatBufferBuilder builder, int shuffleId) { builder.addInt(0, shuffleId, 0); }
  public static void addMapId(FlatBufferBuilder builder, long mapId) { builder.addLong(1, mapId, 0L); }
  public static void addStartReduceId(FlatBufferBuilder builder, int startReduceId) { builder.addInt(2, startReduceId, 0); }
  public static void addEndReduceId(FlatBufferBuilder builder, int endReduceId) { builder.addInt(3, endReduceId, 0); }
  public static int endBlockIdMeta(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy