From 3eff9222f5cf0267a3286a90217bb0ba9b464d29 Mon Sep 17 00:00:00 2001 From: Murtaza Hassan Date: Mon, 27 May 2019 12:22:54 +0200 Subject: [PATCH 1/4] HBASE-22481 --- .../mapred/MultiTableSnapshotInputFormat.java | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java index 71e5296946ba..875eb9e4ce5b 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java @@ -38,15 +38,14 @@ import java.util.Map; /** - * MultiTableSnapshotInputFormat generalizes {@link org.apache.hadoop.hbase.mapred - * .TableSnapshotInputFormat} + * MultiTableSnapshotInputFormat generalizes + * {@link org.apache.hadoop.hbase.mapred.TableSnapshotInputFormat} * allowing a MapReduce job to run over one or more table snapshots, with one or more scans * configured for each. - * Internally, the input format delegates to {@link org.apache.hadoop.hbase.mapreduce - * .TableSnapshotInputFormat} - * and thus has the same performance advantages; see {@link org.apache.hadoop.hbase.mapreduce - * .TableSnapshotInputFormat} for - * more details. + * Internally, the input format delegates to + * {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} + * and thus has the same performance advantages; see {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} + * for more details. * Usage is similar to TableSnapshotInputFormat, with the following exception: * initMultiTableSnapshotMapperJob takes in a map * from snapshot name to a collection of scans. For each snapshot in the map, each corresponding @@ -71,8 +70,7 @@ * * Internally, this input format restores each snapshot into a subdirectory of the given tmp * directory. Input splits and - * record readers are created as described in {@link org.apache.hadoop.hbase.mapreduce - * .TableSnapshotInputFormat} + * record readers are created as described in {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} * (one per region). * See {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} for more notes on * permissioning; the @@ -110,10 +108,8 @@ public RecordReader getRecordReader(InputSplit s /** * Configure conf to read from snapshotScans, with snapshots restored to a subdirectory of * restoreDir. - * Sets: {@link org.apache.hadoop.hbase.mapreduce - * .MultiTableSnapshotInputFormatImpl#RESTORE_DIRS_KEY}, - * {@link org.apache.hadoop.hbase.mapreduce - * .MultiTableSnapshotInputFormatImpl#SNAPSHOT_TO_SCANS_KEY} + * Sets: {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl#RESTORE_DIRS_KEY}, + * {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl#SNAPSHOT_TO_SCANS_KEY} * * @param conf * @param snapshotScans From e802d8c3bdbb742c14592c6c7af067d7c5fbd1c2 Mon Sep 17 00:00:00 2001 From: Murtaza Hassan Date: Mon, 27 May 2019 14:45:16 +0200 Subject: [PATCH 2/4] HBASE-22481 Javadoc Warnings: reference not found, added an entry in checkstyle-suppress.xml file --- .../src/main/resources/hbase/checkstyle-suppressions.xml | 1 + .../hbase/mapred/MultiTableSnapshotInputFormat.java | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml index f420d912c79d..98e08ad76bfd 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml @@ -45,4 +45,5 @@ + diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java index 875eb9e4ce5b..8718160b3b7f 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java @@ -44,7 +44,8 @@ * configured for each. * Internally, the input format delegates to * {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} - * and thus has the same performance advantages; see {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} + * and thus has the same performance advantages; see + * {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} * for more details. * Usage is similar to TableSnapshotInputFormat, with the following exception: * initMultiTableSnapshotMapperJob takes in a map @@ -70,7 +71,8 @@ * * Internally, this input format restores each snapshot into a subdirectory of the given tmp * directory. Input splits and - * record readers are created as described in {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} + * record readers are created as described in + * {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} * (one per region). * See {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} for more notes on * permissioning; the @@ -108,7 +110,8 @@ public RecordReader getRecordReader(InputSplit s /** * Configure conf to read from snapshotScans, with snapshots restored to a subdirectory of * restoreDir. - * Sets: {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl#RESTORE_DIRS_KEY}, + * Sets: + * {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl#RESTORE_DIRS_KEY}, * {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl#SNAPSHOT_TO_SCANS_KEY} * * @param conf From 61e1137f814522799e8acef225f24f960aa7d2a0 Mon Sep 17 00:00:00 2001 From: Murtaza Hassan Date: Tue, 28 May 2019 15:42:40 +0200 Subject: [PATCH 3/4] HBASE-22481 Changed suppresions.xml file with check on package instead of file --- .../src/main/resources/hbase/checkstyle-suppressions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml index 98e08ad76bfd..e58780e2940e 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml @@ -45,5 +45,5 @@ - + From 2638f92c4bbec6a97cd2b6df42c4e643a9f411d7 Mon Sep 17 00:00:00 2001 From: Murtaza Hassan Date: Fri, 7 Jun 2019 14:34:35 +0200 Subject: [PATCH 4/4] HBASE-22481: Javadoc Warnings reference not found, suppress LineLenght check only on the offending lines in the javadoc --- .../src/main/resources/hbase/checkstyle-suppressions.xml | 1 - hbase-checkstyle/src/main/resources/hbase/checkstyle.xml | 7 +++++++ .../hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml index e58780e2940e..f420d912c79d 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml @@ -45,5 +45,4 @@ - diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml index 2001ae7e4518..fd5ced8a54fa 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml @@ -31,6 +31,10 @@ --> + + + @@ -130,5 +134,8 @@ http://checkstyle.sourceforge.net/config_whitespace.html --> + + + diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java index 8718160b3b7f..7902d1a3b4c3 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/MultiTableSnapshotInputFormat.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hbase.mapred; +import edu.umd.cs.findbugs.annotations.SuppressWarnings; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.yetus.audience.InterfaceAudience; @@ -107,6 +108,7 @@ public RecordReader getRecordReader(InputSplit s return new TableSnapshotRecordReader((TableSnapshotRegionSplit) split, job); } + @SuppressWarnings("checkstyle:linelength") /** * Configure conf to read from snapshotScans, with snapshots restored to a subdirectory of * restoreDir.