Skip to content

Commit

Permalink
Reduce parquet logging in Hive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel39 committed Jan 29, 2019
1 parent b747ecb commit 0c7d4ed
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.Map;
import java.util.Optional;

import static io.airlift.log.Level.WARN;
import static io.airlift.units.Duration.nanosSince;
import static io.prestosql.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME;
import static io.prestosql.spi.security.SelectedRole.Type.ROLE;
Expand Down Expand Up @@ -82,6 +83,7 @@ public static DistributedQueryRunner createQueryRunner(Iterable<TpchTable<?>> ta
throws Exception
{
assertEquals(DateTimeZone.getDefault(), TIME_ZONE, "Timezone not configured correctly. Add -Duser.timezone=America/Bahia_Banderas to your JVM arguments");
setupLogging();

DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(Optional.of(new SelectedRole(ROLE, Optional.of("admin")))), 4, extraProperties);

Expand Down Expand Up @@ -129,6 +131,12 @@ public static DistributedQueryRunner createQueryRunner(Iterable<TpchTable<?>> ta
}
}

private static void setupLogging()
{
Logging logging = Logging.initialize();
logging.setLevel("org.apache.parquet.hadoop", WARN);
}

private static Database createDatabaseMetastoreObject(String name)
{
return Database.builder()
Expand Down

0 comments on commit 0c7d4ed

Please sign in to comment.