public static DistributedQueryRunner createQueryRunner(TpchTable<?>... tables) throws Exception { return createQueryRunner(ImmutableList.copyOf(tables)); }
@SuppressWarnings("unused") public TestHiveIntegrationSmokeTest() { this(() -> createQueryRunner(ORDERS, CUSTOMER), createBucketedSession(), HIVE_CATALOG, new HiveTypeTranslator()); }
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(), 4, extraProperties); metastore.createDatabase(createDatabaseMetastoreObject(TPCH_SCHEMA)); metastore.createDatabase(createDatabaseMetastoreObject(TPCH_BUCKETED_SCHEMA)); queryRunner.installPlugin(new HivePlugin(HIVE_CATALOG, Optional.of(metastore))); queryRunner.createCatalog(HIVE_BUCKETED_CATALOG, HIVE_CATALOG, hiveBucketedProperties); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables); copyTpchTablesBucketed(queryRunner, "tpch", TINY_SCHEMA_NAME, createBucketedSession(), tables);
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(), 4); metastore.createDatabase(createDatabaseMetastoreObject(baseDir, "tpch")); metastore.createDatabase(createDatabaseMetastoreObject(baseDir, "tpch_sampled")); queryRunner.createCatalog(HIVE_CATALOG, HIVE_CATALOG, hiveProperties); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables); copyTpchTables(queryRunner, "tpch_sampled", TINY_SCHEMA_NAME, createSampledSession(), tables);
public TestHiveIntegrationSmokeTest() throws Exception { super(createQueryRunner(ORDERS), createSampledSession()); }
public static void copyTpchTablesBucketed( QueryRunner queryRunner, String sourceCatalog, String sourceSchema, Session session, Iterable<TpchTable<?>> tables) { log.info("Loading data from %s.%s...", sourceCatalog, sourceSchema); long startTime = System.nanoTime(); for (TpchTable<?> table : tables) { copyTableBucketed(queryRunner, new QualifiedObjectName(sourceCatalog, sourceSchema, table.getTableName().toLowerCase(ENGLISH)), session); } log.info("Loading from %s.%s complete in %s", sourceCatalog, sourceSchema, nanosSince(startTime).toString(SECONDS)); }
public static Session createSession() { return createHiveSession(TPCH_SCHEMA); }
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(), 4, extraProperties); metastore.createDatabase(createDatabaseMetastoreObject(TPCH_SCHEMA)); metastore.createDatabase(createDatabaseMetastoreObject(TPCH_BUCKETED_SCHEMA)); queryRunner.installPlugin(new HivePlugin(HIVE_CATALOG, Optional.of(metastore))); queryRunner.createCatalog(HIVE_BUCKETED_CATALOG, HIVE_CATALOG, hiveBucketedProperties); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables); copyTpchTablesBucketed(queryRunner, "tpch", TINY_SCHEMA_NAME, createBucketedSession(), tables);
public TestHiveDistributedQueries() throws Exception { super(createQueryRunner(getTables()), createSampledSession()); }
public static void copyTpchTablesBucketed( QueryRunner queryRunner, String sourceCatalog, String sourceSchema, Session session, Iterable<TpchTable<?>> tables) { log.info("Loading data from %s.%s...", sourceCatalog, sourceSchema); long startTime = System.nanoTime(); for (TpchTable<?> table : tables) { copyTableBucketed(queryRunner, new QualifiedObjectName(sourceCatalog, sourceSchema, table.getTableName().toLowerCase(ENGLISH)), session); } log.info("Loading from %s.%s complete in %s", sourceCatalog, sourceSchema, nanosSince(startTime).toString(SECONDS)); }
public static Session createSampledSession() { return createHiveSession(TPCH_SAMPLED_SCHEMA); }
public static DistributedQueryRunner createQueryRunner(Iterable<TpchTable<?>> tables, Map<String, String> extraProperties) throws Exception { return createQueryRunner(tables, extraProperties, "sql-standard", ImmutableMap.of()); }
@SuppressWarnings("unused") public TestHiveIntegrationSmokeTest() { this(() -> createQueryRunner(ORDERS, CUSTOMER), createBucketedSession(), HIVE_CATALOG, new HiveTypeTranslator()); }
public static DistributedQueryRunner createQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { return createQueryRunner(tables, ImmutableMap.of()); }
public TestShowStats() { super(() -> createQueryRunner(ImmutableList.of())); }
@BeforeClass public void setUp() throws Exception { String path = this.getClass().getResource("security.json").getPath(); queryRunner = createQueryRunner(ImmutableList.of(NATION), ImmutableMap.of(), "file", ImmutableMap.of("security.config-file", path)); }
public TestHiveDistributedAggregations() { super(() -> createQueryRunner(getTables())); } }
public TestHiveDistributedQueries() { super(() -> createQueryRunner(getTables())); }
public static void main(String[] args) throws Exception { // You need to add "--user user" to your CLI for your queries to work Logging.initialize(); DistributedQueryRunner queryRunner = createQueryRunner(TpchTable.getTables(), ImmutableMap.of("http-server.http.port", "8080")); Thread.sleep(10); Logger log = Logger.get(DistributedQueryRunner.class); log.info("======== SERVER STARTED ========"); log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl()); } }
public static DistributedQueryRunner createQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { return createQueryRunner(tables, ImmutableMap.of()); }