• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DynamicDrillTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.drill.exec.planner.logical.DynamicDrillTable的典型用法代码示例。如果您正苦于以下问题:Java DynamicDrillTable类的具体用法?Java DynamicDrillTable怎么用?Java DynamicDrillTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DynamicDrillTable类属于org.apache.drill.exec.planner.logical包,在下文中一共展示了DynamicDrillTable类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createNewTableScanFromSelection

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
private TableScan createNewTableScanFromSelection(EnumerableTableScan oldScan, List<String> newFiles, String cacheFileRoot,
    boolean wasAllPartitionsPruned, MetadataContext metaContext) {
  final RelOptTableImpl t = (RelOptTableImpl) oldScan.getTable();
  final FormatSelection formatSelection = (FormatSelection) table.getSelection();
  final FileSelection newFileSelection = new FileSelection(null, newFiles, getBaseTableLocation(),
          cacheFileRoot, wasAllPartitionsPruned, formatSelection.getSelection().getDirStatus());
  newFileSelection.setMetaContext(metaContext);
  final FormatSelection newFormatSelection = new FormatSelection(formatSelection.getFormat(), newFileSelection);
  final DrillTranslatableTable newTable = new DrillTranslatableTable(
          new DynamicDrillTable(table.getPlugin(), table.getStorageEngineName(),
          table.getUserName(),
          newFormatSelection));
  final RelOptTableImpl newOptTableImpl = RelOptTableImpl.create(t.getRelOptSchema(), t.getRowType(), newTable);

  // return an EnumerableTableScan with fileSelection being part of digest of TableScan node.
  return DirPrunedEnumerableTableScan.create(oldScan.getCluster(), newOptTableImpl, newFileSelection.toString());
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:18,代码来源:FileSystemPartitionDescriptor.java


示例2: isReadable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
@Override
public DrillTable isReadable(DrillFileSystem fs,
                             FileSelection selection, FileSystemPlugin fsPlugin,
                             String storageEngineName, String userName) throws IOException {

  if (isFileReadable(fs, selection.getFirstPath(fs))) {
    List<String> files = selection.getFiles();
    assert (files.size() == 1);
    String tableName = files.get(0);
    TableProperties props = getFormatPlugin().getMaprFS().getTableProperties(new Path(tableName));

    if (props.getAttr().getJson()) {
      return new DynamicDrillTable(fsPlugin, storageEngineName, userName,
          new FormatSelection(getFormatPlugin().getConfig(), selection));
    } else {
      FormatSelection formatSelection = new FormatSelection(getFormatPlugin().getConfig(), selection);
      return new MapRDBBinaryTable(storageEngineName, fsPlugin, (MapRDBFormatPlugin) getFormatPlugin(), formatSelection);
    }
  }
  return null;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:22,代码来源:MapRDBFormatMatcher.java


示例3: getTable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
@Override
public Table getTable(String name) {
    // TODO Auto-generated method stub
  String tableName = null;
  if(name.contains(".")) {
    String[] val = name.split("\\.");
    OdbcSchema sub = (OdbcSchema) this.getSubSchema(val[0]);
    return sub.getTable(val[1]);
  }
  Iterator<String> iter = tables.iterator();
  while(iter.hasNext()) {
    tableName = iter.next();
    if(tableName.equalsIgnoreCase(name)) {
      break;
    }
    else {
      tableName = null;
    }
  }
  if(tableName == null) {
    return null;
  }
  MPJdbcScanSpec spec = new MPJdbcScanSpec(this.name, tableName,"");
  return new DynamicDrillTable(plugin, "odbc", spec);
}
 
开发者ID:mapr-emea,项目名称:apache-drill-jdbc-plugin,代码行数:26,代码来源:MPJdbcClient.java


示例4: isReadable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
@Override
public DrillTable isReadable(DrillFileSystem fs,
    FileSelection selection, FileSystemPlugin fsPlugin,
    String storageEngineName, String userName) throws IOException {
  if (isFileReadable(fs, selection.getFirstPath(fs))) {
    return new DynamicDrillTable(fsPlugin, storageEngineName, userName, new FormatSelection(plugin.getConfig(), selection));
  }
  return null;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:10,代码来源:BasicFormatMatcher.java


示例5: isReadable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
@Override
public DrillTable isReadable(DrillFileSystem fs, FileSelection selection,
    FileSystemPlugin fsPlugin, String storageEngineName, String userName)
    throws IOException {
  if(selection.containsDirectories(fs)) {
    Path dirMetaPath = new Path(selection.getSelectionRoot(), Metadata.METADATA_DIRECTORIES_FILENAME);
    // check if the metadata 'directories' file exists; if it does, there is an implicit assumption that
    // the directory is readable since the metadata 'directories' file cannot be created otherwise.  Note
    // that isDirReadable() does a similar check with the metadata 'cache' file.
    if (fs.exists(dirMetaPath)) {
      // create a metadata context that will be used for the duration of the query for this table
      MetadataContext metaContext = new MetadataContext();

      ParquetTableMetadataDirs mDirs = Metadata.readMetadataDirs(fs, dirMetaPath, metaContext, formatConfig);
      if (mDirs != null && mDirs.getDirectories().size() > 0) {
        FileSelection dirSelection = FileSelection.createFromDirectories(mDirs.getDirectories(), selection,
            selection.getSelectionRoot() /* cacheFileRoot initially points to selectionRoot */);
        dirSelection.setExpandedPartial();
        dirSelection.setMetaContext(metaContext);

        return new DynamicDrillTable(fsPlugin, storageEngineName, userName,
            new FormatSelection(plugin.getConfig(), dirSelection));
      }
    }
    if(isDirReadable(fs, selection.getFirstPath(fs))) {
      return new DynamicDrillTable(fsPlugin, storageEngineName, userName,
          new FormatSelection(plugin.getConfig(), selection));
    }
  }
  return super.isReadable(fs, selection, fsPlugin, storageEngineName, userName);
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:32,代码来源:ParquetFormatPlugin.java


示例6: getTable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
@Override
public Table getTable(String tableName) {
  if (!drillTables.containsKey(tableName)) {
    KafkaScanSpec scanSpec = new KafkaScanSpec(tableName);
    DrillTable table = new DynamicDrillTable(plugin, getName(), scanSpec);
    drillTables.put(tableName, table);
  }

  return drillTables.get(tableName);
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:11,代码来源:KafkaMessageSchema.java


示例7: isReadable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
public DrillTable isReadable(DrillFileSystem fs,
    FileSelection selection, FileSystemPlugin fsPlugin,
    String storageEngineName, String userName) throws IOException {
  FileStatus status = selection.getFirstPath(fs);
  if (!isFileReadable(fs, status)) {
    return null;
  }

  return new DynamicDrillTable(fsPlugin, storageEngineName, userName,
      new FormatSelection(getFormatPlugin().getConfig(), selection));
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:12,代码来源:TableFormatMatcher.java


示例8: getDrillTable

import org.apache.drill.exec.planner.logical.DynamicDrillTable; //导入依赖的package包/类
DrillTable getDrillTable(String dbName, String collectionName) {
  MongoScanSpec mongoScanSpec = new MongoScanSpec(dbName, collectionName);
  return new DynamicDrillTable(plugin, schemaName, null, mongoScanSpec);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:MongoSchemaFactory.java



注:本文中的org.apache.drill.exec.planner.logical.DynamicDrillTable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SawtoothOscillatorBL类代码示例发布时间:2022-05-15
下一篇:
Java ChangeUtil类代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap