本文整理汇总了Java中org.apache.tajo.util.IndexUtil类的典型用法代码示例。如果您正苦于以下问题:Java IndexUtil类的具体用法?Java IndexUtil怎么用?Java IndexUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IndexUtil类属于org.apache.tajo.util包,在下文中一共展示了IndexUtil类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIndexScanExec
import org.apache.tajo.util.IndexUtil; //导入依赖的package包/类
public PhysicalExec createIndexScanExec(TaskAttemptContext ctx,
IndexScanNode annotation)
throws IOException {
//TODO-general Type Index
Preconditions.checkNotNull(ctx.getTable(annotation.getCanonicalName()),
"Error: There is no table matched to %s", annotation.getCanonicalName());
FragmentProto [] fragmentProtos = ctx.getTables(annotation.getTableName());
List<FileFragment> fragments =
FragmentConvertor.convert(ctx.getConf(), ctx.getDataChannel().getStoreType(), fragmentProtos);
String indexName = IndexUtil.getIndexNameOfFrag(fragments.get(0), annotation.getSortKeys());
Path indexPath = new Path(sm.getTablePath(annotation.getTableName()), "index");
TupleComparator comp = new TupleComparator(annotation.getKeySchema(),
annotation.getSortKeys());
return new BSTIndexScanExec(ctx, sm, annotation, fragments.get(0), new Path(indexPath, indexName),
annotation.getKeySchema(), comp, annotation.getDatum());
}