HBASE-3264 Remove unnecessary Guava Dependency

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1038299 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-11-23 19:47:09 +00:00
parent a717152ddf
commit a7b528a712
4 changed files with 11 additions and 9 deletions

View File

@ -15,8 +15,8 @@
pom not being found. To fix, I've downloaded apache's pom
from here https://repository.apache.org/content/repositories/releases/org/apache/apache/7/apache-7.pom
saving it as 'pom.xml' into a directory named 'apache-7.pom'. I then uncommented the below.
<relativePath>../apache-7.pom/</relativePath>
-->
<relativePath>../apache-7.pom/</relativePath>
</parent>
<groupId>org.apache.hbase</groupId>

View File

@ -53,8 +53,6 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.google.common.base.Preconditions;
/**
* Writes HFiles. Passed KeyValues must arrive in order.
* Currently, can only write files to a single column family at a
@ -183,7 +181,9 @@ public class HFileOutputFormat extends FileOutputFormat<ImmutableBytesWritable,
*/
private static void writePartitions(Configuration conf, Path partitionsPath,
List<ImmutableBytesWritable> startKeys) throws IOException {
Preconditions.checkArgument(!startKeys.isEmpty(), "No regions passed");
if (startKeys.isEmpty()) {
throw new IllegalArgumentException("No regions passed");
}
// We're generating a list of split points, and we don't ever
// have keys < the first region (which has an empty start key)
@ -193,10 +193,11 @@ public class HFileOutputFormat extends FileOutputFormat<ImmutableBytesWritable,
new TreeSet<ImmutableBytesWritable>(startKeys);
ImmutableBytesWritable first = sorted.first();
Preconditions.checkArgument(
first.equals(HConstants.EMPTY_BYTE_ARRAY),
"First region of table should have empty start key. Instead has: %s",
Bytes.toStringBinary(first.get()));
if (!first.equals(HConstants.EMPTY_BYTE_ARRAY)) {
throw new IllegalArgumentException(
"First region of table should have empty start key. Instead has: "
+ Bytes.toStringBinary(first.get()));
}
sorted.remove(first);
// Write the actual file

View File

@ -296,6 +296,8 @@ public class ImportTsv {
}
TableMapReduceUtil.addDependencyJars(job);
TableMapReduceUtil.addDependencyJars(job.getConfiguration(),
com.google.common.base.Function.class /* Guava used by TsvParser */);
return job;
}

View File

@ -315,7 +315,6 @@ public class TableMapReduceUtil {
try {
addDependencyJars(job.getConfiguration(),
org.apache.zookeeper.ZooKeeper.class,
com.google.common.base.Function.class,
job.getMapOutputKeyClass(),
job.getMapOutputValueClass(),
job.getInputFormatClass(),