From 421ed6ca513d09e1345a73c5da1289798a25ae47 Mon Sep 17 00:00:00 2001 From: Mike Drob Date: Tue, 8 May 2018 22:18:48 -0500 Subject: [PATCH] HBASE-20521 change getConf as first sequence instead of jobContext in TableOutputFormat.checkOutputSpec, add unit tests --- .../apache/hadoop/hbase/mapreduce/TableOutputFormat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java index 0a1928b21f3..78be5af1bf4 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java @@ -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()) {