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);
}
Aggregations