Search in sources :

Example 1 with AlluxioHiveMetastoreConfig

use of io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig in project trino by trinodb.

the class TestHiveAlluxioMetastore method setup.

@Parameters({ "hive.hadoop2.alluxio.host", "hive.hadoop2.alluxio.port", "hive.hadoop2.hiveVersionMajor", "hive.hadoop2.timeZone" })
@BeforeClass
public void setup(String host, String port, int hiveVersionMajor, String timeZone) {
    checkArgument(hiveVersionMajor > 0, "Invalid hiveVersionMajor: %s", hiveVersionMajor);
    timeZone = hiveVersionMajor >= 3 ? "UTC" : timeZone;
    this.alluxioAddress = host + ":" + port;
    this.hiveVersionMajor = hiveVersionMajor;
    System.setProperty(PropertyKey.Name.SECURITY_LOGIN_USERNAME, "presto");
    System.setProperty(PropertyKey.Name.MASTER_HOSTNAME, host);
    HiveConfig hiveConfig = new HiveConfig().setParquetTimeZone(timeZone).setRcfileTimeZone(timeZone);
    AlluxioHiveMetastoreConfig alluxioConfig = new AlluxioHiveMetastoreConfig();
    alluxioConfig.setMasterAddress(this.alluxioAddress);
    TableMasterClient client = AlluxioMetastoreModule.createCatalogMasterClient(alluxioConfig);
    hdfsEnvironment = new HdfsEnvironment(createTestHdfsConfiguration(), new HdfsConfig(), new NoHdfsAuthentication());
    setup(SCHEMA, hiveConfig, new AlluxioHiveMetastore(client, new MetastoreConfig()), hdfsEnvironment);
}
Also used : MetastoreConfig(io.trino.plugin.hive.metastore.MetastoreConfig) AlluxioHiveMetastoreConfig(io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig) AlluxioHiveMetastoreConfig(io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig) TableMasterClient(alluxio.client.table.TableMasterClient) AlluxioHiveMetastore(io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastore) NoHdfsAuthentication(io.trino.plugin.hive.authentication.NoHdfsAuthentication) BeforeClass(org.testng.annotations.BeforeClass) Parameters(org.testng.annotations.Parameters)

Aggregations

TableMasterClient (alluxio.client.table.TableMasterClient)1 NoHdfsAuthentication (io.trino.plugin.hive.authentication.NoHdfsAuthentication)1 MetastoreConfig (io.trino.plugin.hive.metastore.MetastoreConfig)1 AlluxioHiveMetastore (io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastore)1 AlluxioHiveMetastoreConfig (io.trino.plugin.hive.metastore.alluxio.AlluxioHiveMetastoreConfig)1 BeforeClass (org.testng.annotations.BeforeClass)1 Parameters (org.testng.annotations.Parameters)1