Search in sources :

Example 1 with AccessTrackingFileSystem

use of io.trino.plugin.deltalake.AccessTrackingFileSystem in project trino by trinodb.

the class TestTableSnapshot method setUp.

@BeforeMethod
public void setUp() throws IOException, URISyntaxException {
    checkpointSchemaManager = new CheckpointSchemaManager(typeManager);
    URI deltaLogPath = getClass().getClassLoader().getResource("databricks/person").toURI();
    tableLocation = new Path(deltaLogPath);
    Configuration conf = new Configuration(false);
    FileSystem filesystem = tableLocation.getFileSystem(conf);
    accessTrackingFileSystem = new AccessTrackingFileSystem(filesystem);
    HdfsConfig hdfsConfig = new HdfsConfig();
    HdfsConfiguration hdfsConfiguration = new HiveHdfsConfiguration(new HdfsConfigurationInitializer(hdfsConfig), ImmutableSet.of());
    hdfsEnvironment = new HdfsEnvironment(hdfsConfiguration, hdfsConfig, new NoHdfsAuthentication());
}
Also used : Path(org.apache.hadoop.fs.Path) HdfsConfigurationInitializer(io.trino.plugin.hive.HdfsConfigurationInitializer) HiveHdfsConfiguration(io.trino.plugin.hive.HiveHdfsConfiguration) CheckpointSchemaManager(io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager) Configuration(org.apache.hadoop.conf.Configuration) HiveHdfsConfiguration(io.trino.plugin.hive.HiveHdfsConfiguration) HdfsConfiguration(io.trino.plugin.hive.HdfsConfiguration) FileSystem(org.apache.hadoop.fs.FileSystem) AccessTrackingFileSystem(io.trino.plugin.deltalake.AccessTrackingFileSystem) HdfsConfig(io.trino.plugin.hive.HdfsConfig) HiveHdfsConfiguration(io.trino.plugin.hive.HiveHdfsConfiguration) HdfsConfiguration(io.trino.plugin.hive.HdfsConfiguration) URI(java.net.URI) NoHdfsAuthentication(io.trino.plugin.hive.authentication.NoHdfsAuthentication) AccessTrackingFileSystem(io.trino.plugin.deltalake.AccessTrackingFileSystem) HdfsEnvironment(io.trino.plugin.hive.HdfsEnvironment) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

AccessTrackingFileSystem (io.trino.plugin.deltalake.AccessTrackingFileSystem)1 CheckpointSchemaManager (io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager)1 HdfsConfig (io.trino.plugin.hive.HdfsConfig)1 HdfsConfiguration (io.trino.plugin.hive.HdfsConfiguration)1 HdfsConfigurationInitializer (io.trino.plugin.hive.HdfsConfigurationInitializer)1 HdfsEnvironment (io.trino.plugin.hive.HdfsEnvironment)1 HiveHdfsConfiguration (io.trino.plugin.hive.HiveHdfsConfiguration)1 NoHdfsAuthentication (io.trino.plugin.hive.authentication.NoHdfsAuthentication)1 URI (java.net.URI)1 Configuration (org.apache.hadoop.conf.Configuration)1 FileSystem (org.apache.hadoop.fs.FileSystem)1 Path (org.apache.hadoop.fs.Path)1 BeforeMethod (org.testng.annotations.BeforeMethod)1