use of org.apache.tez.dag.history.logging.proto.DatePartitionedLogger in project hive by apache.
the class TestHiveProtoLoggingHook method getTestReader.
public static ProtoMessageReader<HiveHookEventProto> getTestReader(HiveConf conf, String tmpFolder) throws IOException {
Path path = new Path(tmpFolder);
FileSystem fs = path.getFileSystem(conf);
FileStatus[] status = fs.listStatus(path);
Assert.assertEquals(1, status.length);
status = fs.listStatus(status[0].getPath());
Assert.assertEquals(1, status.length);
DatePartitionedLogger<HiveHookEventProto> logger = new DatePartitionedLogger<>(HiveHookEventProto.PARSER, path, conf, SystemClock.getInstance());
return logger.getReader(status[0].getPath());
}
Aggregations