for (int i = 0 ; i < sortSpecs.length; i++) {
col = sortSpecs[i].getSortKey();
indexKeys[i] = inSchema.getColumnId(col.getQualifiedName());
}
BSTIndex bst = new BSTIndex(new TajoConf());
this.comp = new TupleComparator(keySchema, sortSpecs);
Path storeTablePath = new Path(context.getWorkDir(), "output");
LOG.info("Output data directory: " + storeTablePath);
this.meta = CatalogUtil.newTableMeta(context.getDataChannel() != null ?
context.getDataChannel().getStoreType() : CatalogProtos.StoreType.RAW);
FileSystem fs = new RawLocalFileSystem();
fs.mkdirs(storeTablePath);
this.appender = (FileAppender) StorageManagerFactory.getStorageManager(context.getConf()).getAppender(meta,
outSchema, new Path(storeTablePath, "output"));
this.appender.enableStats();
this.appender.init();
this.indexWriter = bst.getIndexWriter(new Path(storeTablePath, "index"),
BSTIndex.TWO_LEVEL_INDEX, keySchema, comp);
this.indexWriter.setLoadNum(100);
this.indexWriter.open();
}