You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2016/08/05 19:14:25 UTC
[1/3] hbase git commit: HBASE-8386 deprecate
TableMapReduce.addDependencyJars(Configuration, class> ...)
Repository: hbase
Updated Branches:
refs/heads/branch-1 b1c60940d -> 6b233c433
HBASE-8386 deprecate TableMapReduce.addDependencyJars(Configuration, class<?> ...)
Signed-off-by: Matteo Bertozzi <ma...@cloudera.com>
Conflicts:
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6b233c43
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6b233c43
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6b233c43
Branch: refs/heads/branch-1
Commit: 6b233c4332a084d87898ece0783912326e1e13f7
Parents: 3d4b533
Author: Sean Busbey <bu...@apache.org>
Authored: Tue Jul 19 07:21:26 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 5 14:08:50 2016 -0500
----------------------------------------------------------------------
.../test/IntegrationTestBigLinkedList.java | 6 +++--
.../test/IntegrationTestLoadAndVerify.java | 4 +--
...tionTestWithCellVisibilityLoadAndVerify.java | 2 +-
.../hadoop/hbase/mapred/TableMapReduceUtil.java | 2 +-
.../apache/hadoop/hbase/mapreduce/Import.java | 6 ++---
.../hadoop/hbase/mapreduce/ImportTsv.java | 2 +-
.../hbase/mapreduce/TableMapReduceUtil.java | 28 ++++++++++++++++++--
.../hadoop/hbase/mapreduce/WALPlayer.java | 4 +--
.../hadoop/hbase/PerformanceEvaluation.java | 2 +-
.../mapred/TestTableSnapshotInputFormat.java | 2 +-
.../mapreduce/TestTableSnapshotInputFormat.java | 2 +-
src/main/asciidoc/_chapters/mapreduce.adoc | 2 +-
12 files changed, 44 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
index 1f57e07..2d828f4 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
@@ -780,7 +780,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
job.getConfiguration().setBoolean("mapreduce.map.speculative", false);
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
+ AbstractHBaseTool.class);
TableMapReduceUtil.initCredentials(job);
boolean success = jobCompletion(job);
@@ -1287,7 +1288,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
TableMapReduceUtil.initTableMapperJob(getTableName(getConf()).getName(), scan,
VerifyMapper.class, BytesWritable.class, BytesWritable.class, job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
+ AbstractHBaseTool.class);
job.getConfiguration().setBoolean("mapreduce.map.speculative", false);
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
index 9ecb9ca..30d5a0d 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
@@ -348,7 +348,7 @@ public void cleanUpCluster() throws Exception {
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(), AbstractHBaseTool.class);
TableMapReduceUtil.initCredentials(job);
assertTrue(job.waitForCompletion(true));
return job;
@@ -372,7 +372,7 @@ public void cleanUpCluster() throws Exception {
TableMapReduceUtil.initTableMapperJob(
htd.getTableName().getNameAsString(), scan, VerifyMapper.class,
BytesWritable.class, BytesWritable.class, job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(), AbstractHBaseTool.class);
int scannerCaching = conf.getInt("verify.scannercaching", SCANNER_CACHING);
TableMapReduceUtil.setScannerCaching(job, scannerCaching);
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
index 4285309..906bf33 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java
@@ -330,7 +330,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify extends IntegrationT
scan.setAuthorizations(new Authorizations(auths));
TableMapReduceUtil.initTableMapperJob(htd.getTableName().getNameAsString(), scan,
VerifyMapper.class, NullWritable.class, NullWritable.class, job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(), AbstractHBaseTool.class);
int scannerCaching = conf.getInt("verify.scannercaching", SCANNER_CACHING);
TableMapReduceUtil.setScannerCaching(job, scannerCaching);
job.setNumReduceTasks(0);
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
index 2a040d9..d5f225f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
@@ -368,7 +368,7 @@ public class TableMapReduceUtil {
*/
public static void addDependencyJars(JobConf job) throws IOException {
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addHBaseDependencyJars(job);
- org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(
+ org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJarsForClasses(
job,
// when making changes here, consider also mapreduce.TableMapReduceUtil
// pull job classes
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java
index 0a5d937..d315b81 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java
@@ -603,7 +603,7 @@ public class Import {
try {
Class<? extends Filter> filter = conf.getClass(FILTER_CLASS_CONF_KEY, null, Filter.class);
if (filter != null) {
- TableMapReduceUtil.addDependencyJars(conf, filter);
+ TableMapReduceUtil.addDependencyJarsForClasses(conf, filter);
}
} catch (Exception e) {
throw new IOException(e);
@@ -630,7 +630,7 @@ public class Import {
fs.deleteOnExit(partitionsPath);
job.setPartitionerClass(KeyValueWritableComparablePartitioner.class);
job.setNumReduceTasks(regionLocator.getStartKeys().length);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
com.google.common.base.Preconditions.class);
}
} else if (hfileOutPath != null) {
@@ -644,7 +644,7 @@ public class Import {
job.setMapOutputKeyClass(ImmutableBytesWritable.class);
job.setMapOutputValueClass(KeyValue.class);
HFileOutputFormat2.configureIncrementalLoad(job, table.getTableDescriptor(), regionLocator);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
com.google.common.base.Preconditions.class);
}
} else {
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java
index 6ce1a28..323e1e7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java
@@ -589,7 +589,7 @@ public class ImportTsv extends Configured implements Tool {
KeyValueSerialization.class.getName());
}
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
com.google.common.base.Function.class /* Guava used by TsvParser */);
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
index 458464f..a939ef3 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
@@ -778,7 +778,7 @@ public class TableMapReduceUtil {
" Continuing without it.");
}
- addDependencyJars(conf,
+ addDependencyJarsForClasses(conf,
// explicitly pull a class from each module
org.apache.hadoop.hbase.HConstants.class, // hbase-common
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.class, // hbase-protocol
@@ -826,7 +826,7 @@ public class TableMapReduceUtil {
public static void addDependencyJars(Job job) throws IOException {
addHBaseDependencyJars(job.getConfiguration());
try {
- addDependencyJars(job.getConfiguration(),
+ addDependencyJarsForClasses(job.getConfiguration(),
// when making changes here, consider also mapred.TableMapReduceUtil
// pull job classes
job.getMapOutputKeyClass(),
@@ -846,9 +846,33 @@ public class TableMapReduceUtil {
* Add the jars containing the given classes to the job's configuration
* such that JobClient will ship them to the cluster and add them to
* the DistributedCache.
+ * @deprecated rely on {@link #addDependencyJars(Job)} instead.
*/
+ @Deprecated
public static void addDependencyJars(Configuration conf,
Class<?>... classes) throws IOException {
+ LOG.warn("The addDependencyJars(Configuration, Class<?>...) method has been deprecated since it"
+ + " is easy to use incorrectly. Most users should rely on addDependencyJars(Job) " +
+ "instead. See HBASE-8386 for more details.");
+ addDependencyJarsForClasses(conf, classes);
+ }
+
+ /**
+ * Add the jars containing the given classes to the job's configuration
+ * such that JobClient will ship them to the cluster and add them to
+ * the DistributedCache.
+ *
+ * N.B. that this method at most adds one jar per class given. If there is more than one
+ * jar available containing a class with the same name as a given class, we don't define
+ * which of those jars might be chosen.
+ *
+ * @param conf The Hadoop Configuration to modify
+ * @param classes will add just those dependencies needed to find the given classes
+ * @throws IOException if an underlying library call fails.
+ */
+ @InterfaceAudience.Private
+ public static void addDependencyJarsForClasses(Configuration conf,
+ Class<?>... classes) throws IOException {
FileSystem localFs = FileSystem.getLocal(conf);
Set<String> jars = new HashSet<String>();
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
index 7ffd222..377b6ea 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
@@ -284,7 +284,7 @@ public class WALPlayer extends Configured implements Tool {
RegionLocator regionLocator = conn.getRegionLocator(tableName)) {
HFileOutputFormat2.configureIncrementalLoad(job, table.getTableDescriptor(), regionLocator);
}
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
com.google.common.base.Preconditions.class);
} else {
// output to live cluster
@@ -297,7 +297,7 @@ public class WALPlayer extends Configured implements Tool {
}
String codecCls = WALCellCodec.getWALCellCodecClass(conf);
try {
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(), Class.forName(codecCls));
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(), Class.forName(codecCls));
} catch (Exception e) {
throw new IOException("Cannot determine wal codec class " + codecCls, e);
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
index 40ddc39..16ea209 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
@@ -498,7 +498,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
TextOutputFormat.setOutputPath(job, new Path(inputDir.getParent(), "outputs"));
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
Histogram.class, // yammer metrics
ObjectMapper.class); // jackson-mapper-asl
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableSnapshotInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableSnapshotInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableSnapshotInputFormat.java
index c3771c5..60f19a2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableSnapshotInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableSnapshotInputFormat.java
@@ -242,7 +242,7 @@ public class TestTableSnapshotInputFormat extends TableSnapshotInputFormatTestBa
JobConf jobConf = new JobConf(util.getConfiguration());
jobConf.setJarByClass(util.getClass());
- org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(jobConf,
+ org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJarsForClasses(jobConf,
TestTableSnapshotInputFormat.class);
TableMapReduceUtil.initTableSnapshotMapJob(snapshotName, COLUMNS,
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java
index 1b80590..349f96e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java
@@ -275,7 +275,7 @@ public class TestTableSnapshotInputFormat extends TableSnapshotInputFormatTestBa
Scan scan = new Scan(startRow, endRow); // limit the scan
job.setJarByClass(util.getClass());
- TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
TestTableSnapshotInputFormat.class);
TableMapReduceUtil.initTableSnapshotMapperJob(snapshotName,
http://git-wip-us.apache.org/repos/asf/hbase/blob/6b233c43/src/main/asciidoc/_chapters/mapreduce.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/mapreduce.adoc b/src/main/asciidoc/_chapters/mapreduce.adoc
index 2a42af2..0792c04 100644
--- a/src/main/asciidoc/_chapters/mapreduce.adoc
+++ b/src/main/asciidoc/_chapters/mapreduce.adoc
@@ -71,7 +71,7 @@ This example assumes you use a BASH-compatible shell.
$ HADOOP_CLASSPATH=`${HBASE_HOME}/bin/hbase classpath` ${HADOOP_HOME}/bin/hadoop jar ${HBASE_HOME}/lib/hbase-server-VERSION.jar rowcounter usertable
----
-When the command runs, internally, the HBase JAR finds the dependencies it needs for ZooKeeper, Guava, and its other dependencies on the passed `HADOOP_CLASSPATH` and adds the JARs to the MapReduce job configuration.
+When the command runs, internally, the HBase JAR finds the dependencies it needs and adds them to the MapReduce job configuration.
See the source at `TableMapReduceUtil#addDependencyJars(org.apache.hadoop.mapreduce.Job)` for how this is done.
The command `hbase mapredcp` can also help you dump the CLASSPATH entries required by MapReduce, which are the same jars `TableMapReduceUtil#addDependencyJars` would add.
[2/3] hbase git commit: HBASE-16340 exclude Xerces iplementation jars
from coming in transitively.
Posted by bu...@apache.org.
HBASE-16340 exclude Xerces iplementation jars from coming in transitively.
Signed-off-by: Esteban Gutierrez <es...@apache.org>
Signed-off-by: stack <st...@apache.org>
Conflicts:
hbase-spark/pom.xml
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3d4b533f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3d4b533f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3d4b533f
Branch: refs/heads/branch-1
Commit: 3d4b533fc5b716795485c5486ec748e1e5cfaaf1
Parents: a5f98c3
Author: Sean Busbey <bu...@apache.org>
Authored: Tue Aug 2 11:36:51 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 5 14:08:50 2016 -0500
----------------------------------------------------------------------
pom.xml | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/3d4b533f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cc672db..b7cded7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -803,7 +803,7 @@
<!-- version set by parent -->
<executions>
<execution>
- <id>min-maven-and-java</id>
+ <id>min-maven-min-java-banned-xerces</id>
<goals>
<goal>enforce</goal>
</goals>
@@ -829,6 +829,12 @@
See the reference guide on building for more information: http://hbase.apache.org/book.html#build
</message>
</requireJavaVersion>
+ <bannedDependencies>
+ <excludes>
+ <exclude>xerces:xercesImpl</exclude>
+ </excludes>
+ <message>We avoid adding our own Xerces jars to the classpath, see HBASE-16340.</message>
+ </bannedDependencies>
</rules>
</configuration>
</execution>
@@ -2018,6 +2024,10 @@
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
</exclusions>
<version>${hadoop-two.version}</version>
</dependency>
@@ -2044,6 +2054,10 @@
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -2196,6 +2210,10 @@
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
</exclusions>
<version>${hadoop-three.version}</version>
</dependency>
@@ -2218,6 +2236,10 @@
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
[3/3] hbase git commit: HBASE-16321 ensure no findbugs-jsr305
Posted by bu...@apache.org.
HBASE-16321 ensure no findbugs-jsr305
Signed-off-by: Esteban Gutierrez <es...@apache.org>
Conflicts:
hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
hbase-rsgroup/pom.xml
hbase-server/pom.xml
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ObserverContext.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
hbase-spark/pom.xml
src/main/asciidoc/_chapters/developer.adoc
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a5f98c3f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a5f98c3f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a5f98c3f
Branch: refs/heads/branch-1
Commit: a5f98c3f9ede67f3a5fb76bd00450f17ca233207
Parents: b1c6094
Author: Sean Busbey <bu...@apache.org>
Authored: Tue Aug 2 01:17:59 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 5 14:08:50 2016 -0500
----------------------------------------------------------------------
hbase-client/pom.xml | 8 +-
.../hbase/protobuf/ResponseConverter.java | 2 +-
.../apache/hadoop/hbase/codec/BaseDecoder.java | 5 +-
hbase-server/pom.xml | 5 ++
.../hadoop/hbase/master/LoadBalancer.java | 1 +
.../hbase/client/TestMetaWithReplicas.java | 3 +-
.../TestMultiTableSnapshotInputFormat.java | 2 +-
pom.xml | 87 ++++++++++++++------
8 files changed, 75 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-client/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index dae9c67..2d661b4 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -247,8 +247,8 @@
</activation>
<dependencies>
<dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
+ <groupId>com.github.stephenc.findbugs</groupId>
+ <artifactId>findbugs-annotations</artifactId>
<optional>true</optional>
</dependency>
<dependency>
@@ -260,10 +260,6 @@
<artifactId>hadoop-common</artifactId>
<exclusions>
<exclusion>
- <groupId>com.github.stephenc.findbugs</groupId>
- <artifactId>findbugs-annotations</artifactId>
- </exclusion>
- <exclusion>
<groupId>net.java.dev.jets3t</groupId>
<artifactId>jets3t</artifactId>
</exclusion>
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
index 0c7cbd7..91d30fd 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
@@ -17,13 +17,13 @@
*/
package org.apache.hadoop.hbase.protobuf;
-import javax.annotation.Nullable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import edu.umd.cs.findbugs.annotations.Nullable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java
index 86f8678..485b88a 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java
@@ -22,8 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.PushbackInputStream;
-import javax.annotation.Nonnull;
-
+import edu.umd.cs.findbugs.annotations.NonNull;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.Cell;
@@ -99,7 +98,7 @@ public abstract class BaseDecoder implements Codec.Decoder {
* thrown if EOF is reached prematurely. Does not return null.
* @throws IOException
*/
- @Nonnull
+ @NonNull
protected abstract Cell parseCell() throws IOException;
@Override
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-server/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml
index 205f845..3d97c59 100644
--- a/hbase-server/pom.xml
+++ b/hbase-server/pom.xml
@@ -440,6 +440,11 @@
</dependency>
<!-- General dependencies -->
<dependency>
+ <groupId>com.github.stephenc.findbugs</groupId>
+ <artifactId>findbugs-annotations</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>com.yammer.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
index e293d60..c581b08 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.master;
import java.util.List;
import java.util.Map;
+import edu.umd.cs.findbugs.annotations.Nullable;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.conf.ConfigurationObserver;
import org.apache.hadoop.conf.Configurable;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
index 0ef9890..061e6c3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
@@ -33,8 +33,7 @@ import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutorService;
-import javax.annotation.Nullable;
-
+import edu.umd.cs.findbugs.annotations.Nullable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
index f3e6d8d..93bb820 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.mapreduce;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimaps;
+import edu.umd.cs.findbugs.annotations.Nullable;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Scan;
@@ -34,7 +35,6 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
-import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/hbase/blob/a5f98c3f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fc49af5..cc672db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -801,36 +801,52 @@
</dependency>
</dependencies>
<!-- version set by parent -->
- <configuration>
- <rules>
- <!-- The earliest maven version we verify builds for via ASF Jenkins -->
- <requireMavenVersion>
- <version>[${maven.min.version},)</version>
- <message>Maven is out of date.
+ <executions>
+ <execution>
+ <id>min-maven-and-java</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <!-- The earliest maven version we verify builds for via ASF Jenkins -->
+ <requireMavenVersion>
+ <version>[${maven.min.version},)</version>
+ <message>Maven is out of date.
HBase requires at least version ${maven.min.version} of Maven to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.
See the reference guide on building for more information: http://hbase.apache.org/book.html#build
- </message>
- </requireMavenVersion>
- <!-- The earliest JVM version we verify builds for via ASF Jenkins -->
- <requireJavaVersion>
- <version>[${java.min.version},)</version>
- <message>Java is out of date.
+ </message>
+ </requireMavenVersion>
+ <!-- The earliest JVM version we verify builds for via ASF Jenkins -->
+ <requireJavaVersion>
+ <version>[${java.min.version},)</version>
+ <message>Java is out of date.
HBase requirs at least version ${java.min.version} of the JDK to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.
See the reference guide on building for more information: http://hbase.apache.org/book.html#build
- </message>
- </requireJavaVersion>
- </rules>
- </configuration>
- <executions>
+ </message>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
<execution>
- <id>enforce</id>
+ <id>banned-jsr305</id>
<goals>
<goal>enforce</goal>
</goals>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <excludes>
+ <exclude>com.google.code.findbugs:jsr305</exclude>
+ </excludes>
+ <message>We don't allow the JSR305 jar from the Findbugs project, see HBASE-16321.</message>
+ </bannedDependencies>
+ </rules>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -1152,7 +1168,6 @@
<httpcore.version>4.4.4</httpcore.version>
<metrics-core.version>2.2.0</metrics-core.version>
<guava.version>12.0.1</guava.version>
- <jsr305.version>1.3.9</jsr305.version>
<jackson.version>1.9.13</jackson.version>
<jasper.version>5.5.23</jasper.version>
<jaxb-api.version>2.2.2</jaxb-api.version>
@@ -1397,6 +1412,12 @@
</dependency>
<!-- General dependencies -->
<dependency>
+ <groupId>com.github.stephenc.findbugs</groupId>
+ <artifactId>findbugs-annotations</artifactId>
+ <version>${findbugs-annotations}</version>
+ </dependency>
+ <!-- General dependencies -->
+ <dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>${jettison.version}</version>
@@ -1422,11 +1443,12 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <version>${jsr305.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
@@ -1742,7 +1764,6 @@
<dependency>
<groupId>com.github.stephenc.findbugs</groupId>
<artifactId>findbugs-annotations</artifactId>
- <version>${findbugs-annotations}</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -2051,6 +2072,10 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -2081,6 +2106,10 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -2217,6 +2246,10 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -2252,6 +2285,10 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>