Package org.apache.drill.exec.store.schedule

Examples of org.apache.drill.exec.store.schedule.BlockMapBuilder


   */
  @Override
  public List<EndpointAffinity> getOperatorAffinity() {

    if (this.endpointAffinities == null) {
      BlockMapBuilder bmb = new BlockMapBuilder(fs, formatPlugin.getContext().getBits());
      try{
        for (RowGroupInfo rgi : rowGroupInfos) {
          EndpointByteMap ebm = bmb.getEndpointByteMap(rgi);
          rgi.setEndpointByteMap(ebm);
        }
      } catch (IOException e) {
        logger.warn("Failure while determining operator affinity.", e);
        return Collections.emptyList();
View Full Code Here


    this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig);
    Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config.");
    this.selection = new FileSelection(files, true);
    try{
      BlockMapBuilder b = new BlockMapBuilder(formatPlugin.getFileSystem().getUnderlying(), formatPlugin.getContext().getBits());
      this.chunks = b.generateFileWork(selection.getFileStatusList(formatPlugin.getFileSystem()), formatPlugin.isBlockSplittable());
      this.endpointAffinities = AffinityCreator.getAffinityMap(chunks);
    }catch(IOException e){
      logger.warn("Failure determining endpoint affinity.", e);
      this.endpointAffinities = Collections.emptyList();
    }
View Full Code Here

      ) throws IOException{
    this.selection = selection;
    this.formatPlugin = formatPlugin;
    this.columns = columns;
    try{
      BlockMapBuilder b = new BlockMapBuilder(formatPlugin.getFileSystem().getUnderlying(), formatPlugin.getContext().getBits());
      this.chunks = b.generateFileWork(selection.getFileStatusList(formatPlugin.getFileSystem()), formatPlugin.isBlockSplittable());
      this.endpointAffinities = AffinityCreator.getAffinityMap(chunks);
    }catch(IOException e){
      logger.warn("Failure determining endpoint affinity.", e);
      this.endpointAffinities = Collections.emptyList();
    }
View Full Code Here

    mappings = that.mappings;
  }

  private void initFromSelection(FileSelection selection, EasyFormatPlugin<?> formatPlugin) throws IOException {
    this.selection = selection;
    BlockMapBuilder b = new BlockMapBuilder(formatPlugin.getFileSystem().getUnderlying(), formatPlugin.getContext().getBits());
    this.chunks = b.generateFileWork(selection.getFileStatusList(formatPlugin.getFileSystem()), formatPlugin.isBlockSplittable());
    this.maxWidth = chunks.size();
    this.endpointAffinities = AffinityCreator.getAffinityMap(chunks);
  }
View Full Code Here

   */
  @Override
  public List<EndpointAffinity> getOperatorAffinity() {

    if (this.endpointAffinities == null) {
      BlockMapBuilder bmb = new BlockMapBuilder(fs, formatPlugin.getContext().getBits());
      try {
        for (RowGroupInfo rgi : rowGroupInfos) {
          EndpointByteMap ebm = bmb.getEndpointByteMap(rgi);
          rgi.setEndpointByteMap(ebm);
        }
      } catch (IOException e) {
        logger.warn("Failure while determining operator affinity.", e);
        return Collections.emptyList();
View Full Code Here

      ) throws IOException{
    this.selection = Preconditions.checkNotNull(selection);
    this.formatPlugin = Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config.");
    this.columns = columns == null || columns.size() == 0? ALL_COLUMNS : columns;
    this.selectionRoot = selectionRoot;
    BlockMapBuilder b = new BlockMapBuilder(formatPlugin.getFileSystem().getUnderlying(), formatPlugin.getContext().getBits());
    this.chunks = b.generateFileWork(selection.getFileStatusList(formatPlugin.getFileSystem()), formatPlugin.isBlockSplittable());
    this.maxWidth = chunks.size();
    this.endpointAffinities = AffinityCreator.getAffinityMap(chunks);
  }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.store.schedule.BlockMapBuilder

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.