change getConf as first sequence instead of jobContext in TableOutputFormat.checkOutputSpec, add unit tests

This commit is contained in:
michael.jin 2018-05-04 11:33:50 +08:00 committed by Mike Drob
parent 6f2ec4639b
commit 9e68719014
1 changed files with 3 additions and 3 deletions

View File

@ -174,9 +174,9 @@ implements Configurable {
@Override
public void checkOutputSpecs(JobContext context) throws IOException,
InterruptedException {
Configuration hConf = context.getConfiguration();
if(hConf == null) {
hConf = this.conf;
Configuration hConf = getConf();
if (hConf == null) {
hConf = context.getConfiguration();
}
try (Admin admin = ConnectionFactory.createConnection(hConf).getAdmin()) {