HBASE-18698 MapreduceDependencyClasspathTool does not include hbase-server as a dependency
Move Driver to be the main-class in hbase-mapreduce jar rather than in the hbase-server jar. Reference the hbase-server and shaded protobuf so they get bundled when you do 'hbase mapredcp'.
This commit is contained in:
parent
bc5478f947
commit
8c9087e6c5
|
@ -52,6 +52,20 @@
|
|||
<skipAssembly>true</skipAssembly>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<!--Include the Driver class as the 'main'.
|
||||
Executing the jar will then show a list of the basic MR jobs.
|
||||
-->
|
||||
<mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Testing plugins -->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
@ -362,8 +362,6 @@ public class TableMapReduceUtil {
|
|||
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addHBaseDependencyJars(job);
|
||||
org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJarsForClasses(
|
||||
job,
|
||||
// when making changes here, consider also mapreduce.TableMapReduceUtil
|
||||
// pull job classes
|
||||
job.getMapOutputKeyClass(),
|
||||
job.getMapOutputValueClass(),
|
||||
job.getOutputKeyClass(),
|
||||
|
|
|
@ -51,9 +51,9 @@ public class Driver {
|
|||
pgd.addClass(CopyTable.NAME, CopyTable.class,
|
||||
"Export a table from local cluster to peer cluster.");
|
||||
pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" +
|
||||
" the data from tables in two different clusters. WARNING: It" +
|
||||
" doesn't work for incrementColumnValues'd cells since the" +
|
||||
" timestamp is changed after being appended to the log.");
|
||||
" data from tables in two different clusters. It" +
|
||||
" doesn't work for incrementColumnValues'd cells since" +
|
||||
" timestamp is changed after appending to WAL.");
|
||||
pgd.addClass(WALPlayer.NAME, WALPlayer.class, "Replay WAL files.");
|
||||
pgd.addClass(ExportSnapshot.NAME, ExportSnapshot.class, "Export" +
|
||||
" the specific snapshot to a given FileSystem.");
|
||||
|
|
|
@ -784,6 +784,7 @@ public class TableMapReduceUtil {
|
|||
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.class, // hbase-protocol
|
||||
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.class, // hbase-protocol-shaded
|
||||
org.apache.hadoop.hbase.client.Put.class, // hbase-client
|
||||
org.apache.hadoop.hbase.ipc.RpcServer.class, // hbase-server
|
||||
org.apache.hadoop.hbase.CompatibilityFactory.class, // hbase-hadoop-compat
|
||||
org.apache.hadoop.hbase.mapreduce.JobUtil.class, // hbase-hadoop2-compat
|
||||
org.apache.hadoop.hbase.mapreduce.TableMapper.class, // hbase-server
|
||||
|
@ -794,6 +795,7 @@ public class TableMapReduceUtil {
|
|||
org.apache.zookeeper.ZooKeeper.class,
|
||||
org.apache.hadoop.hbase.shaded.io.netty.channel.Channel.class,
|
||||
com.google.protobuf.Message.class,
|
||||
org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations.class,
|
||||
org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists.class,
|
||||
org.apache.htrace.Trace.class,
|
||||
com.codahale.metrics.MetricRegistry.class);
|
||||
|
|
|
@ -117,11 +117,6 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<!-- Exclude these 2 packages, because their dependency _binary_ files
|
||||
include the sources, and Maven 2.2 appears to add them to the sources to compile,
|
||||
weird -->
|
||||
|
|
Loading…
Reference in New Issue