}
@Override
public Scanner getScanner(TableMeta meta, Fragment fragment,
Schema target) throws IOException {
Scanner scanner;
Class<? extends Scanner> scannerClass;
String handlerName = meta.getStoreType().name().toLowerCase();
String handlerNameKey = handlerName + "_v2";
scannerClass = SCANNER_HANDLER_CACHE.get(handlerNameKey);
if (scannerClass == null) {
scannerClass = conf.getClass(
String.format("tajo.storage.scanner-handler.v2.%s.class",
meta.getStoreType().name().toLowerCase()), null,
Scanner.class);
SCANNER_HANDLER_CACHE.put(handlerNameKey, scannerClass);
}
if (scannerClass == null) {
throw new IOException("Unknown Storage Type: " + meta.getStoreType());
}
scanner = newScannerInstance(scannerClass, conf, meta, fragment);
if (scanner.isProjectable()) {
scanner.setTarget(target.toArray());
}
if(scanner instanceof FileScannerV2) {
((FileScannerV2)scanner).setStorageManagerContext(context);
}