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

This reverts commit 9e3b28804d28ad586d12df24a2e5417c25cff857.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/18ca1fcb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/18ca1fcb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/18ca1fcb

Branch: refs/heads/branch-2.0
Commit: 18ca1fcb560236b8c9a0ca057f163ebdaab89f0e
Parents: 9e3b288
Author: Mike Drob <md...@apache.org>
Authored: Tue May 8 22:19:31 2018 -0500
Committer: Mike Drob <md...@apache.org>
Committed: Tue May 8 22:19:31 2018 -0500

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/18ca1fcb/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java
----------------------------------------------------------------------
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 78be5af..0a1928b 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 = getConf();
-    if (hConf == null) {
-      hConf = context.getConfiguration();
+    Configuration hConf = context.getConfiguration();
+    if(hConf == null) {
+      hConf = this.conf;
     }
 
     try (Admin admin = ConnectionFactory.createConnection(hConf).getAdmin()) {

Reply via email to