Package org.apache.drill.exec.proto.ExecProtos

Examples of org.apache.drill.exec.proto.ExecProtos.FragmentHandle


    if(RpcConstants.EXTRA_DEBUGGING) logger.debug("Received bit com message of type {}", rpcType);

    switch (rpcType) {
   
    case RpcType.REQ_CANCEL_FRAGMENT_VALUE:
      FragmentHandle handle = get(pBody, FragmentHandle.PARSER);
      cancelFragment(handle);
      return BitRpcConfig.OK;

    case RpcType.REQ_FRAGMENT_STATUS_VALUE:
      connection.getListenerPool().status( get(pBody, FragmentStatus.PARSER));
View Full Code Here


 
  /**
   * Returns a positive Ack if this fragment is accepted. 
   */
  private Ack incomingRecordBatch(RemoteConnection connection, FragmentRecordBatch fragmentBatch, ByteBuf body) throws FragmentSetupException{
    FragmentHandle handle = fragmentBatch.getHandle();
    IncomingFragmentHandler handler = handlers.get(handle);

    // Create a handler if there isn't already one.
    if(handler == null){
     
View Full Code Here

  private final ByteBuf[] buffers;
  private final FragmentRecordBatch header;
 
  public FragmentWritableBatch(boolean isLast, QueryId queryId, int sendMajorFragmentId, int sendMinorFragmentId, int receiveMajorFragmentId, int receiveMinorFragmentId, WritableBatch batch){
    this.buffers = batch.getBuffers();
    FragmentHandle handle = FragmentHandle //
        .newBuilder() //
        .setMajorFragmentId(receiveMajorFragmentId) //
        .setMinorFragmentId(receiveMinorFragmentId) //
        .setQueryId(queryId) //
        .build();
View Full Code Here

          plan = reader.writeJson(root);
        } catch (JsonProcessingException e) {
          throw new FragmentSetupException("Failure while trying to convert fragment into json.", e);
        }

        FragmentHandle handle = FragmentHandle //
            .newBuilder() //
            .setMajorFragmentId(wrapper.getMajorFragmentId()) //
            .setMinorFragmentId(minorFragmentId) //
            .setQueryId(queryId) //
            .build();
View Full Code Here

  public VectorContainer getOutgoingContainer() {
    throw new UnsupportedOperationException(String.format(" You should not call getOutgoingContainer() for class %s", this.getClass().getCanonicalName()));
  }

  private void informSenders() {
    FragmentHandle handlePrototype = FragmentHandle.newBuilder()
            .setMajorFragmentId(config.getOppositeMajorFragmentId())
            .setQueryId(context.getHandle().getQueryId())
            .build();
    for (int i = 0; i < config.getNumSenders(); i++) {
      FragmentHandle sender = FragmentHandle.newBuilder(handlePrototype)
              .setMinorFragmentId(i)
              .build();
      FinishedReceiver finishedReceiver = FinishedReceiver.newBuilder()
              .setReceiver(context.getHandle())
              .setSender(sender)
View Full Code Here

    this(isLast, queryId, sendMajorFragmentId, sendMinorFragmentId, receiveMajorFragmentId, receiveMinorFragmentId, batch.getDef(), batch.getBuffers());
  }
 
  private FragmentWritableBatch(boolean isLast, QueryId queryId, int sendMajorFragmentId, int sendMinorFragmentId, int receiveMajorFragmentId, int receiveMinorFragmentId, RecordBatchDef def, ByteBuf... buffers){
    this.buffers = buffers;
    FragmentHandle handle = FragmentHandle //
        .newBuilder() //
        .setMajorFragmentId(receiveMajorFragmentId) //
        .setMinorFragmentId(receiveMinorFragmentId) //
        .setQueryId(queryId) //
        .build();
View Full Code Here

      if(context.getFailureCause() != null){
          throw context.getFailureCause();
      }
      assertTrue(!context.isFailed());

      FragmentHandle handle = context.getHandle();

      /* Form the file name to which the trace output will dump the record batches */
      String qid = QueryIdHelper.getQueryId(handle.getQueryId());

      int majorFragmentId = handle.getMajorFragmentId();
      int minorFragmentId = handle.getMinorFragmentId();

      String logLocation = c.getString(ExecConstants.TRACE_DUMP_DIRECTORY);

      System.out.println("Found log location: " + logLocation);

View Full Code Here

    this.config = config;
    this.handle = context.getHandle();
    List<DrillbitEndpoint> destinations = config.getDestinations();
    this.tunnels = new DataTunnel[destinations.size()];
    for(int i = 0; i < destinations.size(); ++i) {
      FragmentHandle opp = handle.toBuilder().setMajorFragmentId(config.getOppositeMajorFragmentId()).setMinorFragmentId(i).build();
      tunnels[i] = context.getDataTunnel(destinations.get(i), opp);
    }
  }
View Full Code Here

  public RecordWriter getRecordWriter(FragmentContext context, EasyWriter writer) throws IOException {
    Map<String, String> options = Maps.newHashMap();

    options.put("location", writer.getLocation());

    FragmentHandle handle = context.getHandle();
    String fragmentId = String.format("%d_%d", handle.getMajorFragmentId(), handle.getMinorFragmentId());
    options.put("prefix", fragmentId);

    options.put("separator", ((TextFormatConfig)getConfig()).getDelimiter());
    options.put(FileSystem.FS_DEFAULT_NAME_KEY, ((FileSystemConfig)writer.getStorageConfig()).connection);
View Full Code Here

      public int compare(FragmentData o1, FragmentData o2) {
        return o2.getHandle().getMajorFragmentId() - o1.getHandle().getMajorFragmentId();
      }
    });
    for(FragmentData data: fragments){
      FragmentHandle handle = data.getStatus().getHandle();
      switch(data.getStatus().getProfile().getState()){
      case SENDING:
      case AWAITING_ALLOCATION:
      case RUNNING:
        if(data.isLocal()){
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.proto.ExecProtos.FragmentHandle

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.