Search in sources :

Example 1 with HadoopFileInfoIterator

use of com.facebook.presto.hive.HadoopDirectoryLister.HadoopFileInfoIterator in project presto by prestodb.

the class TestHiveFileIterator method setup.

@BeforeClass
private void setup() {
    hadoopConf = new Configuration();
    hadoopConf.set("fs.hdfs.impl", org.apache.hadoop.hdfs.DistributedFileSystem.class.getName());
    hadoopConf.set("fs.file.impl", org.apache.hadoop.fs.LocalFileSystem.class.getName());
    listDirectoryOperation = path -> {
        FileSystem fs = path.getFileSystem(hadoopConf);
        return new HadoopFileInfoIterator(fs.listLocatedStatus(path));
    };
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) HadoopFileInfoIterator(com.facebook.presto.hive.HadoopDirectoryLister.HadoopFileInfoIterator) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

HadoopFileInfoIterator (com.facebook.presto.hive.HadoopDirectoryLister.HadoopFileInfoIterator)1 Configuration (org.apache.hadoop.conf.Configuration)1 FileSystem (org.apache.hadoop.fs.FileSystem)1 BeforeClass (org.testng.annotations.BeforeClass)1