From 4a2f3f89f416132eb4c63e45edc4b799847ab6f9 Mon Sep 17 00:00:00 2001 From: Viraj Jasani Date: Sat, 8 Aug 2020 14:17:04 +0530 Subject: [PATCH] HBASE-24788 : TableOutputFormat source compatibility (ADDENDUM) Brought back InterruptedException in throws clause of getRecordWriter and checkOutputSpecs of TableOutputFormat --- .../apache/hadoop/hbase/mapreduce/TableOutputFormat.java | 7 ++++--- 1 file changed, 4 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 52f340251c2..8da8d83d923 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 @@ -155,10 +155,11 @@ implements Configurable { * @param context The current task context. * @return The newly created writer instance. * @throws IOException When creating the writer fails. + * @throws InterruptedException When the job is cancelled. */ @Override public RecordWriter getRecordWriter(TaskAttemptContext context) - throws IOException { + throws IOException, InterruptedException { return new TableRecordWriter(); } @@ -167,11 +168,11 @@ implements Configurable { * * @param context The current context. * @throws IOException When the check fails. + * @throws InterruptedException When the job is aborted. * @see OutputFormat#checkOutputSpecs(JobContext) */ @Override - public void checkOutputSpecs(JobContext context) - throws IOException { + public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException { Configuration hConf = getConf(); if (hConf == null) { hConf = context.getConfiguration();